From a5478262614ec2a37d6defc2a8e5d59369181a97 Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Thu, 7 Aug 2025 13:46:00 -0700 Subject: [PATCH 1/8] chore: update gapic files (#1171) --- .../bigtable_instance_admin/async_client.py | 871 ++ .../bigtable_instance_admin/client.py | 871 ++ .../bigtable_table_admin/async_client.py | 971 ++ .../services/bigtable_table_admin/client.py | 971 ++ .../cloud/bigtable_admin_v2/types/instance.py | 19 + .../services/bigtable/async_client.py | 48 +- .../bigtable_v2/services/bigtable/client.py | 48 +- google/cloud/bigtable_v2/types/types.py | 66 + owlbot.py | 21 +- ...instance_admin_create_app_profile_async.py | 57 + ..._instance_admin_create_app_profile_sync.py | 57 + ...ble_instance_admin_create_cluster_async.py | 57 + ...able_instance_admin_create_cluster_sync.py | 57 + ...le_instance_admin_create_instance_async.py | 61 + ...ble_instance_admin_create_instance_sync.py | 61 + ...nstance_admin_create_logical_view_async.py | 61 + ...instance_admin_create_logical_view_sync.py | 61 + ...ce_admin_create_materialized_view_async.py | 61 + ...nce_admin_create_materialized_view_sync.py | 61 + ...instance_admin_delete_app_profile_async.py | 51 + ..._instance_admin_delete_app_profile_sync.py | 51 + ...ble_instance_admin_delete_cluster_async.py | 50 + ...able_instance_admin_delete_cluster_sync.py | 50 + ...le_instance_admin_delete_instance_async.py | 50 + ...ble_instance_admin_delete_instance_sync.py | 50 + ...nstance_admin_delete_logical_view_async.py | 50 + ...instance_admin_delete_logical_view_sync.py | 50 + ...ce_admin_delete_materialized_view_async.py | 50 + ...nce_admin_delete_materialized_view_sync.py | 50 + ...le_instance_admin_get_app_profile_async.py | 52 + ...ble_instance_admin_get_app_profile_sync.py | 52 + ...gtable_instance_admin_get_cluster_async.py | 52 + ...igtable_instance_admin_get_cluster_sync.py | 52 + ...ble_instance_admin_get_iam_policy_async.py | 53 + ...able_instance_admin_get_iam_policy_sync.py | 53 + ...table_instance_admin_get_instance_async.py | 52 + ...gtable_instance_admin_get_instance_sync.py | 52 + ...e_instance_admin_get_logical_view_async.py | 52 + ...le_instance_admin_get_logical_view_sync.py | 52 + ...tance_admin_get_materialized_view_async.py | 52 + ...stance_admin_get_materialized_view_sync.py | 52 + ..._instance_admin_list_app_profiles_async.py | 53 + ...e_instance_admin_list_app_profiles_sync.py | 53 + ...able_instance_admin_list_clusters_async.py | 52 + ...table_instance_admin_list_clusters_sync.py | 52 + ...e_instance_admin_list_hot_tablets_async.py | 53 + ...le_instance_admin_list_hot_tablets_sync.py | 53 + ...ble_instance_admin_list_instances_async.py | 52 + ...able_instance_admin_list_instances_sync.py | 52 + ...instance_admin_list_logical_views_async.py | 53 + ..._instance_admin_list_logical_views_sync.py | 53 + ...nce_admin_list_materialized_views_async.py | 53 + ...ance_admin_list_materialized_views_sync.py | 53 + ...ance_admin_partial_update_cluster_async.py | 55 + ...tance_admin_partial_update_cluster_sync.py | 55 + ...nce_admin_partial_update_instance_async.py | 59 + ...ance_admin_partial_update_instance_sync.py | 59 + ...ble_instance_admin_set_iam_policy_async.py | 53 + ...able_instance_admin_set_iam_policy_sync.py | 53 + ...stance_admin_test_iam_permissions_async.py | 54 + ...nstance_admin_test_iam_permissions_sync.py | 54 + ...instance_admin_update_app_profile_async.py | 59 + ..._instance_admin_update_app_profile_sync.py | 59 + ...ble_instance_admin_update_cluster_async.py | 55 + ...able_instance_admin_update_cluster_sync.py | 55 + ...le_instance_admin_update_instance_async.py | 52 + ...ble_instance_admin_update_instance_sync.py | 52 + ...nstance_admin_update_logical_view_async.py | 59 + ...instance_admin_update_logical_view_sync.py | 59 + ...ce_admin_update_materialized_view_async.py | 59 + ...nce_admin_update_materialized_view_sync.py | 59 + ...ble_table_admin_check_consistency_async.py | 53 + ...able_table_admin_check_consistency_sync.py | 53 + ..._bigtable_table_admin_copy_backup_async.py | 58 + ...d_bigtable_table_admin_copy_backup_sync.py | 58 + ...able_admin_create_authorized_view_async.py | 57 + ...table_admin_create_authorized_view_sync.py | 57 + ...igtable_table_admin_create_backup_async.py | 61 + ...bigtable_table_admin_create_backup_sync.py | 61 + ..._table_admin_create_schema_bundle_async.py | 61 + ...e_table_admin_create_schema_bundle_sync.py | 61 + ...bigtable_table_admin_create_table_async.py | 53 + ..._admin_create_table_from_snapshot_async.py | 58 + ...e_admin_create_table_from_snapshot_sync.py | 58 + ..._bigtable_table_admin_create_table_sync.py | 53 + ...able_admin_delete_authorized_view_async.py | 50 + ...table_admin_delete_authorized_view_sync.py | 50 + ...igtable_table_admin_delete_backup_async.py | 50 + ...bigtable_table_admin_delete_backup_sync.py | 50 + ..._table_admin_delete_schema_bundle_async.py | 50 + ...e_table_admin_delete_schema_bundle_sync.py | 50 + ...table_table_admin_delete_snapshot_async.py | 50 + ...gtable_table_admin_delete_snapshot_sync.py | 50 + ...bigtable_table_admin_delete_table_async.py | 50 + ..._bigtable_table_admin_delete_table_sync.py | 50 + ...gtable_table_admin_drop_row_range_async.py | 51 + ...igtable_table_admin_drop_row_range_sync.py | 51 + ..._admin_generate_consistency_token_async.py | 52 + ...e_admin_generate_consistency_token_sync.py | 52 + ...e_table_admin_get_authorized_view_async.py | 52 + ...le_table_admin_get_authorized_view_sync.py | 52 + ...d_bigtable_table_admin_get_backup_async.py | 52 + ...ed_bigtable_table_admin_get_backup_sync.py | 52 + ...gtable_table_admin_get_iam_policy_async.py | 53 + ...igtable_table_admin_get_iam_policy_sync.py | 53 + ...ble_table_admin_get_schema_bundle_async.py | 52 + ...able_table_admin_get_schema_bundle_sync.py | 52 + ...bigtable_table_admin_get_snapshot_async.py | 52 + ..._bigtable_table_admin_get_snapshot_sync.py | 52 + ...ed_bigtable_table_admin_get_table_async.py | 52 + ...ted_bigtable_table_admin_get_table_sync.py | 52 + ...table_admin_list_authorized_views_async.py | 53 + ..._table_admin_list_authorized_views_sync.py | 53 + ...bigtable_table_admin_list_backups_async.py | 53 + ..._bigtable_table_admin_list_backups_sync.py | 53 + ...e_table_admin_list_schema_bundles_async.py | 53 + ...le_table_admin_list_schema_bundles_sync.py | 53 + ...gtable_table_admin_list_snapshots_async.py | 53 + ...igtable_table_admin_list_snapshots_sync.py | 53 + ..._bigtable_table_admin_list_tables_async.py | 53 + ...d_bigtable_table_admin_list_tables_sync.py | 53 + ...able_admin_modify_column_families_async.py | 52 + ...table_admin_modify_column_families_sync.py | 52 + ...able_admin_restore_table_async_internal.py | 58 + ...table_admin_restore_table_sync_internal.py | 58 + ...gtable_table_admin_set_iam_policy_async.py | 53 + ...igtable_table_admin_set_iam_policy_sync.py | 53 + ...gtable_table_admin_snapshot_table_async.py | 58 + ...igtable_table_admin_snapshot_table_sync.py | 58 + ..._table_admin_test_iam_permissions_async.py | 54 + ...e_table_admin_test_iam_permissions_sync.py | 54 + ...gtable_table_admin_undelete_table_async.py | 56 + ...igtable_table_admin_undelete_table_sync.py | 56 + ...able_admin_update_authorized_view_async.py | 55 + ...table_admin_update_authorized_view_sync.py | 55 + ...igtable_table_admin_update_backup_async.py | 55 + ...bigtable_table_admin_update_backup_sync.py | 55 + ..._table_admin_update_schema_bundle_async.py | 59 + ...e_table_admin_update_schema_bundle_sync.py | 59 + ...bigtable_table_admin_update_table_async.py | 55 + ..._bigtable_table_admin_update_table_sync.py | 55 + ...pet_metadata_google.bigtable.admin.v2.json | 10871 ++++++++++++++++ scripts/fixup_bigtable_admin_v2_keywords.py | 2 +- tests/unit/data/_async/test_client.py | 16 +- tests/unit/data/_sync_autogen/test_client.py | 12 +- .../test_bigtable_instance_admin.py | 1 + tests/unit/gapic/bigtable_v2/test_bigtable.py | 657 +- 147 files changed, 22240 insertions(+), 343 deletions(-) create mode 100644 samples/generated_samples/bigtableadmin_v2_generated_bigtable_instance_admin_create_app_profile_async.py create mode 100644 samples/generated_samples/bigtableadmin_v2_generated_bigtable_instance_admin_create_app_profile_sync.py create mode 100644 samples/generated_samples/bigtableadmin_v2_generated_bigtable_instance_admin_create_cluster_async.py create mode 100644 samples/generated_samples/bigtableadmin_v2_generated_bigtable_instance_admin_create_cluster_sync.py create mode 100644 samples/generated_samples/bigtableadmin_v2_generated_bigtable_instance_admin_create_instance_async.py create mode 100644 samples/generated_samples/bigtableadmin_v2_generated_bigtable_instance_admin_create_instance_sync.py create mode 100644 samples/generated_samples/bigtableadmin_v2_generated_bigtable_instance_admin_create_logical_view_async.py create mode 100644 samples/generated_samples/bigtableadmin_v2_generated_bigtable_instance_admin_create_logical_view_sync.py create mode 100644 samples/generated_samples/bigtableadmin_v2_generated_bigtable_instance_admin_create_materialized_view_async.py create mode 100644 samples/generated_samples/bigtableadmin_v2_generated_bigtable_instance_admin_create_materialized_view_sync.py create mode 100644 samples/generated_samples/bigtableadmin_v2_generated_bigtable_instance_admin_delete_app_profile_async.py create mode 100644 samples/generated_samples/bigtableadmin_v2_generated_bigtable_instance_admin_delete_app_profile_sync.py create mode 100644 samples/generated_samples/bigtableadmin_v2_generated_bigtable_instance_admin_delete_cluster_async.py create mode 100644 samples/generated_samples/bigtableadmin_v2_generated_bigtable_instance_admin_delete_cluster_sync.py create mode 100644 samples/generated_samples/bigtableadmin_v2_generated_bigtable_instance_admin_delete_instance_async.py create mode 100644 samples/generated_samples/bigtableadmin_v2_generated_bigtable_instance_admin_delete_instance_sync.py create mode 100644 samples/generated_samples/bigtableadmin_v2_generated_bigtable_instance_admin_delete_logical_view_async.py create mode 100644 samples/generated_samples/bigtableadmin_v2_generated_bigtable_instance_admin_delete_logical_view_sync.py create mode 100644 samples/generated_samples/bigtableadmin_v2_generated_bigtable_instance_admin_delete_materialized_view_async.py create mode 100644 samples/generated_samples/bigtableadmin_v2_generated_bigtable_instance_admin_delete_materialized_view_sync.py create mode 100644 samples/generated_samples/bigtableadmin_v2_generated_bigtable_instance_admin_get_app_profile_async.py create mode 100644 samples/generated_samples/bigtableadmin_v2_generated_bigtable_instance_admin_get_app_profile_sync.py create mode 100644 samples/generated_samples/bigtableadmin_v2_generated_bigtable_instance_admin_get_cluster_async.py create mode 100644 samples/generated_samples/bigtableadmin_v2_generated_bigtable_instance_admin_get_cluster_sync.py create mode 100644 samples/generated_samples/bigtableadmin_v2_generated_bigtable_instance_admin_get_iam_policy_async.py create mode 100644 samples/generated_samples/bigtableadmin_v2_generated_bigtable_instance_admin_get_iam_policy_sync.py create mode 100644 samples/generated_samples/bigtableadmin_v2_generated_bigtable_instance_admin_get_instance_async.py create mode 100644 samples/generated_samples/bigtableadmin_v2_generated_bigtable_instance_admin_get_instance_sync.py create mode 100644 samples/generated_samples/bigtableadmin_v2_generated_bigtable_instance_admin_get_logical_view_async.py create mode 100644 samples/generated_samples/bigtableadmin_v2_generated_bigtable_instance_admin_get_logical_view_sync.py create mode 100644 samples/generated_samples/bigtableadmin_v2_generated_bigtable_instance_admin_get_materialized_view_async.py create mode 100644 samples/generated_samples/bigtableadmin_v2_generated_bigtable_instance_admin_get_materialized_view_sync.py create mode 100644 samples/generated_samples/bigtableadmin_v2_generated_bigtable_instance_admin_list_app_profiles_async.py create mode 100644 samples/generated_samples/bigtableadmin_v2_generated_bigtable_instance_admin_list_app_profiles_sync.py create mode 100644 samples/generated_samples/bigtableadmin_v2_generated_bigtable_instance_admin_list_clusters_async.py create mode 100644 samples/generated_samples/bigtableadmin_v2_generated_bigtable_instance_admin_list_clusters_sync.py create mode 100644 samples/generated_samples/bigtableadmin_v2_generated_bigtable_instance_admin_list_hot_tablets_async.py create mode 100644 samples/generated_samples/bigtableadmin_v2_generated_bigtable_instance_admin_list_hot_tablets_sync.py create mode 100644 samples/generated_samples/bigtableadmin_v2_generated_bigtable_instance_admin_list_instances_async.py create mode 100644 samples/generated_samples/bigtableadmin_v2_generated_bigtable_instance_admin_list_instances_sync.py create mode 100644 samples/generated_samples/bigtableadmin_v2_generated_bigtable_instance_admin_list_logical_views_async.py create mode 100644 samples/generated_samples/bigtableadmin_v2_generated_bigtable_instance_admin_list_logical_views_sync.py create mode 100644 samples/generated_samples/bigtableadmin_v2_generated_bigtable_instance_admin_list_materialized_views_async.py create mode 100644 samples/generated_samples/bigtableadmin_v2_generated_bigtable_instance_admin_list_materialized_views_sync.py create mode 100644 samples/generated_samples/bigtableadmin_v2_generated_bigtable_instance_admin_partial_update_cluster_async.py create mode 100644 samples/generated_samples/bigtableadmin_v2_generated_bigtable_instance_admin_partial_update_cluster_sync.py create mode 100644 samples/generated_samples/bigtableadmin_v2_generated_bigtable_instance_admin_partial_update_instance_async.py create mode 100644 samples/generated_samples/bigtableadmin_v2_generated_bigtable_instance_admin_partial_update_instance_sync.py create mode 100644 samples/generated_samples/bigtableadmin_v2_generated_bigtable_instance_admin_set_iam_policy_async.py create mode 100644 samples/generated_samples/bigtableadmin_v2_generated_bigtable_instance_admin_set_iam_policy_sync.py create mode 100644 samples/generated_samples/bigtableadmin_v2_generated_bigtable_instance_admin_test_iam_permissions_async.py create mode 100644 samples/generated_samples/bigtableadmin_v2_generated_bigtable_instance_admin_test_iam_permissions_sync.py create mode 100644 samples/generated_samples/bigtableadmin_v2_generated_bigtable_instance_admin_update_app_profile_async.py create mode 100644 samples/generated_samples/bigtableadmin_v2_generated_bigtable_instance_admin_update_app_profile_sync.py create mode 100644 samples/generated_samples/bigtableadmin_v2_generated_bigtable_instance_admin_update_cluster_async.py create mode 100644 samples/generated_samples/bigtableadmin_v2_generated_bigtable_instance_admin_update_cluster_sync.py create mode 100644 samples/generated_samples/bigtableadmin_v2_generated_bigtable_instance_admin_update_instance_async.py create mode 100644 samples/generated_samples/bigtableadmin_v2_generated_bigtable_instance_admin_update_instance_sync.py create mode 100644 samples/generated_samples/bigtableadmin_v2_generated_bigtable_instance_admin_update_logical_view_async.py create mode 100644 samples/generated_samples/bigtableadmin_v2_generated_bigtable_instance_admin_update_logical_view_sync.py create mode 100644 samples/generated_samples/bigtableadmin_v2_generated_bigtable_instance_admin_update_materialized_view_async.py create mode 100644 samples/generated_samples/bigtableadmin_v2_generated_bigtable_instance_admin_update_materialized_view_sync.py create mode 100644 samples/generated_samples/bigtableadmin_v2_generated_bigtable_table_admin_check_consistency_async.py create mode 100644 samples/generated_samples/bigtableadmin_v2_generated_bigtable_table_admin_check_consistency_sync.py create mode 100644 samples/generated_samples/bigtableadmin_v2_generated_bigtable_table_admin_copy_backup_async.py create mode 100644 samples/generated_samples/bigtableadmin_v2_generated_bigtable_table_admin_copy_backup_sync.py create mode 100644 samples/generated_samples/bigtableadmin_v2_generated_bigtable_table_admin_create_authorized_view_async.py create mode 100644 samples/generated_samples/bigtableadmin_v2_generated_bigtable_table_admin_create_authorized_view_sync.py create mode 100644 samples/generated_samples/bigtableadmin_v2_generated_bigtable_table_admin_create_backup_async.py create mode 100644 samples/generated_samples/bigtableadmin_v2_generated_bigtable_table_admin_create_backup_sync.py create mode 100644 samples/generated_samples/bigtableadmin_v2_generated_bigtable_table_admin_create_schema_bundle_async.py create mode 100644 samples/generated_samples/bigtableadmin_v2_generated_bigtable_table_admin_create_schema_bundle_sync.py create mode 100644 samples/generated_samples/bigtableadmin_v2_generated_bigtable_table_admin_create_table_async.py create mode 100644 samples/generated_samples/bigtableadmin_v2_generated_bigtable_table_admin_create_table_from_snapshot_async.py create mode 100644 samples/generated_samples/bigtableadmin_v2_generated_bigtable_table_admin_create_table_from_snapshot_sync.py create mode 100644 samples/generated_samples/bigtableadmin_v2_generated_bigtable_table_admin_create_table_sync.py create mode 100644 samples/generated_samples/bigtableadmin_v2_generated_bigtable_table_admin_delete_authorized_view_async.py create mode 100644 samples/generated_samples/bigtableadmin_v2_generated_bigtable_table_admin_delete_authorized_view_sync.py create mode 100644 samples/generated_samples/bigtableadmin_v2_generated_bigtable_table_admin_delete_backup_async.py create mode 100644 samples/generated_samples/bigtableadmin_v2_generated_bigtable_table_admin_delete_backup_sync.py create mode 100644 samples/generated_samples/bigtableadmin_v2_generated_bigtable_table_admin_delete_schema_bundle_async.py create mode 100644 samples/generated_samples/bigtableadmin_v2_generated_bigtable_table_admin_delete_schema_bundle_sync.py create mode 100644 samples/generated_samples/bigtableadmin_v2_generated_bigtable_table_admin_delete_snapshot_async.py create mode 100644 samples/generated_samples/bigtableadmin_v2_generated_bigtable_table_admin_delete_snapshot_sync.py create mode 100644 samples/generated_samples/bigtableadmin_v2_generated_bigtable_table_admin_delete_table_async.py create mode 100644 samples/generated_samples/bigtableadmin_v2_generated_bigtable_table_admin_delete_table_sync.py create mode 100644 samples/generated_samples/bigtableadmin_v2_generated_bigtable_table_admin_drop_row_range_async.py create mode 100644 samples/generated_samples/bigtableadmin_v2_generated_bigtable_table_admin_drop_row_range_sync.py create mode 100644 samples/generated_samples/bigtableadmin_v2_generated_bigtable_table_admin_generate_consistency_token_async.py create mode 100644 samples/generated_samples/bigtableadmin_v2_generated_bigtable_table_admin_generate_consistency_token_sync.py create mode 100644 samples/generated_samples/bigtableadmin_v2_generated_bigtable_table_admin_get_authorized_view_async.py create mode 100644 samples/generated_samples/bigtableadmin_v2_generated_bigtable_table_admin_get_authorized_view_sync.py create mode 100644 samples/generated_samples/bigtableadmin_v2_generated_bigtable_table_admin_get_backup_async.py create mode 100644 samples/generated_samples/bigtableadmin_v2_generated_bigtable_table_admin_get_backup_sync.py create mode 100644 samples/generated_samples/bigtableadmin_v2_generated_bigtable_table_admin_get_iam_policy_async.py create mode 100644 samples/generated_samples/bigtableadmin_v2_generated_bigtable_table_admin_get_iam_policy_sync.py create mode 100644 samples/generated_samples/bigtableadmin_v2_generated_bigtable_table_admin_get_schema_bundle_async.py create mode 100644 samples/generated_samples/bigtableadmin_v2_generated_bigtable_table_admin_get_schema_bundle_sync.py create mode 100644 samples/generated_samples/bigtableadmin_v2_generated_bigtable_table_admin_get_snapshot_async.py create mode 100644 samples/generated_samples/bigtableadmin_v2_generated_bigtable_table_admin_get_snapshot_sync.py create mode 100644 samples/generated_samples/bigtableadmin_v2_generated_bigtable_table_admin_get_table_async.py create mode 100644 samples/generated_samples/bigtableadmin_v2_generated_bigtable_table_admin_get_table_sync.py create mode 100644 samples/generated_samples/bigtableadmin_v2_generated_bigtable_table_admin_list_authorized_views_async.py create mode 100644 samples/generated_samples/bigtableadmin_v2_generated_bigtable_table_admin_list_authorized_views_sync.py create mode 100644 samples/generated_samples/bigtableadmin_v2_generated_bigtable_table_admin_list_backups_async.py create mode 100644 samples/generated_samples/bigtableadmin_v2_generated_bigtable_table_admin_list_backups_sync.py create mode 100644 samples/generated_samples/bigtableadmin_v2_generated_bigtable_table_admin_list_schema_bundles_async.py create mode 100644 samples/generated_samples/bigtableadmin_v2_generated_bigtable_table_admin_list_schema_bundles_sync.py create mode 100644 samples/generated_samples/bigtableadmin_v2_generated_bigtable_table_admin_list_snapshots_async.py create mode 100644 samples/generated_samples/bigtableadmin_v2_generated_bigtable_table_admin_list_snapshots_sync.py create mode 100644 samples/generated_samples/bigtableadmin_v2_generated_bigtable_table_admin_list_tables_async.py create mode 100644 samples/generated_samples/bigtableadmin_v2_generated_bigtable_table_admin_list_tables_sync.py create mode 100644 samples/generated_samples/bigtableadmin_v2_generated_bigtable_table_admin_modify_column_families_async.py create mode 100644 samples/generated_samples/bigtableadmin_v2_generated_bigtable_table_admin_modify_column_families_sync.py create mode 100644 samples/generated_samples/bigtableadmin_v2_generated_bigtable_table_admin_restore_table_async_internal.py create mode 100644 samples/generated_samples/bigtableadmin_v2_generated_bigtable_table_admin_restore_table_sync_internal.py create mode 100644 samples/generated_samples/bigtableadmin_v2_generated_bigtable_table_admin_set_iam_policy_async.py create mode 100644 samples/generated_samples/bigtableadmin_v2_generated_bigtable_table_admin_set_iam_policy_sync.py create mode 100644 samples/generated_samples/bigtableadmin_v2_generated_bigtable_table_admin_snapshot_table_async.py create mode 100644 samples/generated_samples/bigtableadmin_v2_generated_bigtable_table_admin_snapshot_table_sync.py create mode 100644 samples/generated_samples/bigtableadmin_v2_generated_bigtable_table_admin_test_iam_permissions_async.py create mode 100644 samples/generated_samples/bigtableadmin_v2_generated_bigtable_table_admin_test_iam_permissions_sync.py create mode 100644 samples/generated_samples/bigtableadmin_v2_generated_bigtable_table_admin_undelete_table_async.py create mode 100644 samples/generated_samples/bigtableadmin_v2_generated_bigtable_table_admin_undelete_table_sync.py create mode 100644 samples/generated_samples/bigtableadmin_v2_generated_bigtable_table_admin_update_authorized_view_async.py create mode 100644 samples/generated_samples/bigtableadmin_v2_generated_bigtable_table_admin_update_authorized_view_sync.py create mode 100644 samples/generated_samples/bigtableadmin_v2_generated_bigtable_table_admin_update_backup_async.py create mode 100644 samples/generated_samples/bigtableadmin_v2_generated_bigtable_table_admin_update_backup_sync.py create mode 100644 samples/generated_samples/bigtableadmin_v2_generated_bigtable_table_admin_update_schema_bundle_async.py create mode 100644 samples/generated_samples/bigtableadmin_v2_generated_bigtable_table_admin_update_schema_bundle_sync.py create mode 100644 samples/generated_samples/bigtableadmin_v2_generated_bigtable_table_admin_update_table_async.py create mode 100644 samples/generated_samples/bigtableadmin_v2_generated_bigtable_table_admin_update_table_sync.py create mode 100644 samples/generated_samples/snippet_metadata_google.bigtable.admin.v2.json diff --git a/google/cloud/bigtable_admin_v2/services/bigtable_instance_admin/async_client.py b/google/cloud/bigtable_admin_v2/services/bigtable_instance_admin/async_client.py index b150b7123..a1aee2370 100644 --- a/google/cloud/bigtable_admin_v2/services/bigtable_instance_admin/async_client.py +++ b/google/cloud/bigtable_admin_v2/services/bigtable_instance_admin/async_client.py @@ -354,6 +354,41 @@ async def create_instance( scaled. If cluster_config.cluster_autoscaling_config is non-empty, then autoscaling is enabled. + .. code-block:: python + + # 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. + # - It may require specifying regional endpoints when creating the service + # client as shown in: + # https://googleapis.dev/python/google-api-core/latest/client_options.html + from google.cloud import bigtable_admin_v2 + + async def sample_create_instance(): + # Create a client + client = bigtable_admin_v2.BigtableInstanceAdminAsyncClient() + + # Initialize request argument(s) + instance = bigtable_admin_v2.Instance() + instance.display_name = "display_name_value" + + request = bigtable_admin_v2.CreateInstanceRequest( + parent="parent_value", + instance_id="instance_id_value", + instance=instance, + ) + + # Make the request + operation = client.create_instance(request=request) + + print("Waiting for operation to complete...") + + response = (await operation).result() + + # Handle the response + print(response) + Args: request (Optional[Union[google.cloud.bigtable_admin_v2.types.CreateInstanceRequest, dict]]): The request object. Request message for @@ -487,6 +522,32 @@ async def get_instance( ) -> instance.Instance: r"""Gets information about an instance. + .. code-block:: python + + # 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. + # - It may require specifying regional endpoints when creating the service + # client as shown in: + # https://googleapis.dev/python/google-api-core/latest/client_options.html + from google.cloud import bigtable_admin_v2 + + async def sample_get_instance(): + # Create a client + client = bigtable_admin_v2.BigtableInstanceAdminAsyncClient() + + # Initialize request argument(s) + request = bigtable_admin_v2.GetInstanceRequest( + name="name_value", + ) + + # Make the request + response = await client.get_instance(request=request) + + # Handle the response + print(response) + Args: request (Optional[Union[google.cloud.bigtable_admin_v2.types.GetInstanceRequest, dict]]): The request object. Request message for @@ -578,6 +639,32 @@ async def list_instances( ) -> bigtable_instance_admin.ListInstancesResponse: r"""Lists information about instances in a project. + .. code-block:: python + + # 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. + # - It may require specifying regional endpoints when creating the service + # client as shown in: + # https://googleapis.dev/python/google-api-core/latest/client_options.html + from google.cloud import bigtable_admin_v2 + + async def sample_list_instances(): + # Create a client + client = bigtable_admin_v2.BigtableInstanceAdminAsyncClient() + + # Initialize request argument(s) + request = bigtable_admin_v2.ListInstancesRequest( + parent="parent_value", + ) + + # Make the request + response = await client.list_instances(request=request) + + # Handle the response + print(response) + Args: request (Optional[Union[google.cloud.bigtable_admin_v2.types.ListInstancesRequest, dict]]): The request object. Request message for @@ -666,6 +753,32 @@ async def update_instance( To update other Instance properties, such as labels, use PartialUpdateInstance. + .. code-block:: python + + # 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. + # - It may require specifying regional endpoints when creating the service + # client as shown in: + # https://googleapis.dev/python/google-api-core/latest/client_options.html + from google.cloud import bigtable_admin_v2 + + async def sample_update_instance(): + # Create a client + client = bigtable_admin_v2.BigtableInstanceAdminAsyncClient() + + # Initialize request argument(s) + request = bigtable_admin_v2.Instance( + display_name="display_name_value", + ) + + # Make the request + response = await client.update_instance(request=request) + + # Handle the response + print(response) + Args: request (Optional[Union[google.cloud.bigtable_admin_v2.types.Instance, dict]]): The request object. A collection of Bigtable @@ -739,6 +852,39 @@ async def partial_update_instance( method can modify all fields of an Instance and is the preferred way to update an Instance. + .. code-block:: python + + # 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. + # - It may require specifying regional endpoints when creating the service + # client as shown in: + # https://googleapis.dev/python/google-api-core/latest/client_options.html + from google.cloud import bigtable_admin_v2 + + async def sample_partial_update_instance(): + # Create a client + client = bigtable_admin_v2.BigtableInstanceAdminAsyncClient() + + # Initialize request argument(s) + instance = bigtable_admin_v2.Instance() + instance.display_name = "display_name_value" + + request = bigtable_admin_v2.PartialUpdateInstanceRequest( + instance=instance, + ) + + # Make the request + operation = client.partial_update_instance(request=request) + + print("Waiting for operation to complete...") + + response = (await operation).result() + + # Handle the response + print(response) + Args: request (Optional[Union[google.cloud.bigtable_admin_v2.types.PartialUpdateInstanceRequest, dict]]): The request object. Request message for @@ -853,6 +999,29 @@ async def delete_instance( ) -> None: r"""Delete an instance from a project. + .. code-block:: python + + # 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. + # - It may require specifying regional endpoints when creating the service + # client as shown in: + # https://googleapis.dev/python/google-api-core/latest/client_options.html + from google.cloud import bigtable_admin_v2 + + async def sample_delete_instance(): + # Create a client + client = bigtable_admin_v2.BigtableInstanceAdminAsyncClient() + + # Initialize request argument(s) + request = bigtable_admin_v2.DeleteInstanceRequest( + name="name_value", + ) + + # Make the request + await client.delete_instance(request=request) + Args: request (Optional[Union[google.cloud.bigtable_admin_v2.types.DeleteInstanceRequest, dict]]): The request object. Request message for @@ -940,6 +1109,37 @@ async def create_cluster( scaled. If cluster_config.cluster_autoscaling_config is non-empty, then autoscaling is enabled. + .. code-block:: python + + # 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. + # - It may require specifying regional endpoints when creating the service + # client as shown in: + # https://googleapis.dev/python/google-api-core/latest/client_options.html + from google.cloud import bigtable_admin_v2 + + async def sample_create_cluster(): + # Create a client + client = bigtable_admin_v2.BigtableInstanceAdminAsyncClient() + + # Initialize request argument(s) + request = bigtable_admin_v2.CreateClusterRequest( + parent="parent_value", + cluster_id="cluster_id_value", + ) + + # Make the request + operation = client.create_cluster(request=request) + + print("Waiting for operation to complete...") + + response = (await operation).result() + + # Handle the response + print(response) + Args: request (Optional[Union[google.cloud.bigtable_admin_v2.types.CreateClusterRequest, dict]]): The request object. Request message for @@ -1060,6 +1260,32 @@ async def get_cluster( ) -> instance.Cluster: r"""Gets information about a cluster. + .. code-block:: python + + # 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. + # - It may require specifying regional endpoints when creating the service + # client as shown in: + # https://googleapis.dev/python/google-api-core/latest/client_options.html + from google.cloud import bigtable_admin_v2 + + async def sample_get_cluster(): + # Create a client + client = bigtable_admin_v2.BigtableInstanceAdminAsyncClient() + + # Initialize request argument(s) + request = bigtable_admin_v2.GetClusterRequest( + name="name_value", + ) + + # Make the request + response = await client.get_cluster(request=request) + + # Handle the response + print(response) + Args: request (Optional[Union[google.cloud.bigtable_admin_v2.types.GetClusterRequest, dict]]): The request object. Request message for @@ -1150,6 +1376,32 @@ async def list_clusters( ) -> bigtable_instance_admin.ListClustersResponse: r"""Lists information about clusters in an instance. + .. code-block:: python + + # 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. + # - It may require specifying regional endpoints when creating the service + # client as shown in: + # https://googleapis.dev/python/google-api-core/latest/client_options.html + from google.cloud import bigtable_admin_v2 + + async def sample_list_clusters(): + # Create a client + client = bigtable_admin_v2.BigtableInstanceAdminAsyncClient() + + # Initialize request argument(s) + request = bigtable_admin_v2.ListClustersRequest( + parent="parent_value", + ) + + # Make the request + response = await client.list_clusters(request=request) + + # Handle the response + print(response) + Args: request (Optional[Union[google.cloud.bigtable_admin_v2.types.ListClustersRequest, dict]]): The request object. Request message for @@ -1241,6 +1493,35 @@ async def update_cluster( cluster_config.cluster_autoscaling_config. In order to update it, you must use PartialUpdateCluster. + .. code-block:: python + + # 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. + # - It may require specifying regional endpoints when creating the service + # client as shown in: + # https://googleapis.dev/python/google-api-core/latest/client_options.html + from google.cloud import bigtable_admin_v2 + + async def sample_update_cluster(): + # Create a client + client = bigtable_admin_v2.BigtableInstanceAdminAsyncClient() + + # Initialize request argument(s) + request = bigtable_admin_v2.Cluster( + ) + + # Make the request + operation = client.update_cluster(request=request) + + print("Waiting for operation to complete...") + + response = (await operation).result() + + # Handle the response + print(response) + Args: request (Optional[Union[google.cloud.bigtable_admin_v2.types.Cluster, dict]]): The request object. A resizable group of nodes in a particular cloud @@ -1332,6 +1613,35 @@ async def partial_update_cluster( cluster_config.cluster_autoscaling_config, and explicitly set a serve_node count via the update_mask. + .. code-block:: python + + # 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. + # - It may require specifying regional endpoints when creating the service + # client as shown in: + # https://googleapis.dev/python/google-api-core/latest/client_options.html + from google.cloud import bigtable_admin_v2 + + async def sample_partial_update_cluster(): + # Create a client + client = bigtable_admin_v2.BigtableInstanceAdminAsyncClient() + + # Initialize request argument(s) + request = bigtable_admin_v2.PartialUpdateClusterRequest( + ) + + # Make the request + operation = client.partial_update_cluster(request=request) + + print("Waiting for operation to complete...") + + response = (await operation).result() + + # Handle the response + print(response) + Args: request (Optional[Union[google.cloud.bigtable_admin_v2.types.PartialUpdateClusterRequest, dict]]): The request object. Request message for @@ -1442,6 +1752,29 @@ async def delete_cluster( ) -> None: r"""Deletes a cluster from an instance. + .. code-block:: python + + # 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. + # - It may require specifying regional endpoints when creating the service + # client as shown in: + # https://googleapis.dev/python/google-api-core/latest/client_options.html + from google.cloud import bigtable_admin_v2 + + async def sample_delete_cluster(): + # Create a client + client = bigtable_admin_v2.BigtableInstanceAdminAsyncClient() + + # Initialize request argument(s) + request = bigtable_admin_v2.DeleteClusterRequest( + name="name_value", + ) + + # Make the request + await client.delete_cluster(request=request) + Args: request (Optional[Union[google.cloud.bigtable_admin_v2.types.DeleteClusterRequest, dict]]): The request object. Request message for @@ -1523,6 +1856,37 @@ async def create_app_profile( ) -> instance.AppProfile: r"""Creates an app profile within an instance. + .. code-block:: python + + # 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. + # - It may require specifying regional endpoints when creating the service + # client as shown in: + # https://googleapis.dev/python/google-api-core/latest/client_options.html + from google.cloud import bigtable_admin_v2 + + async def sample_create_app_profile(): + # Create a client + client = bigtable_admin_v2.BigtableInstanceAdminAsyncClient() + + # Initialize request argument(s) + app_profile = bigtable_admin_v2.AppProfile() + app_profile.priority = "PRIORITY_HIGH" + + request = bigtable_admin_v2.CreateAppProfileRequest( + parent="parent_value", + app_profile_id="app_profile_id_value", + app_profile=app_profile, + ) + + # Make the request + response = await client.create_app_profile(request=request) + + # Handle the response + print(response) + Args: request (Optional[Union[google.cloud.bigtable_admin_v2.types.CreateAppProfileRequest, dict]]): The request object. Request message for @@ -1632,6 +1996,32 @@ async def get_app_profile( ) -> instance.AppProfile: r"""Gets information about an app profile. + .. code-block:: python + + # 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. + # - It may require specifying regional endpoints when creating the service + # client as shown in: + # https://googleapis.dev/python/google-api-core/latest/client_options.html + from google.cloud import bigtable_admin_v2 + + async def sample_get_app_profile(): + # Create a client + client = bigtable_admin_v2.BigtableInstanceAdminAsyncClient() + + # Initialize request argument(s) + request = bigtable_admin_v2.GetAppProfileRequest( + name="name_value", + ) + + # Make the request + response = await client.get_app_profile(request=request) + + # Handle the response + print(response) + Args: request (Optional[Union[google.cloud.bigtable_admin_v2.types.GetAppProfileRequest, dict]]): The request object. Request message for @@ -1721,6 +2111,33 @@ async def list_app_profiles( ) -> pagers.ListAppProfilesAsyncPager: r"""Lists information about app profiles in an instance. + .. code-block:: python + + # 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. + # - It may require specifying regional endpoints when creating the service + # client as shown in: + # https://googleapis.dev/python/google-api-core/latest/client_options.html + from google.cloud import bigtable_admin_v2 + + async def sample_list_app_profiles(): + # Create a client + client = bigtable_admin_v2.BigtableInstanceAdminAsyncClient() + + # Initialize request argument(s) + request = bigtable_admin_v2.ListAppProfilesRequest( + parent="parent_value", + ) + + # Make the request + page_result = client.list_app_profiles(request=request) + + # Handle the response + async for response in page_result: + print(response) + Args: request (Optional[Union[google.cloud.bigtable_admin_v2.types.ListAppProfilesRequest, dict]]): The request object. Request message for @@ -1827,6 +2244,39 @@ async def update_app_profile( ) -> operation_async.AsyncOperation: r"""Updates an app profile within an instance. + .. code-block:: python + + # 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. + # - It may require specifying regional endpoints when creating the service + # client as shown in: + # https://googleapis.dev/python/google-api-core/latest/client_options.html + from google.cloud import bigtable_admin_v2 + + async def sample_update_app_profile(): + # Create a client + client = bigtable_admin_v2.BigtableInstanceAdminAsyncClient() + + # Initialize request argument(s) + app_profile = bigtable_admin_v2.AppProfile() + app_profile.priority = "PRIORITY_HIGH" + + request = bigtable_admin_v2.UpdateAppProfileRequest( + app_profile=app_profile, + ) + + # Make the request + operation = client.update_app_profile(request=request) + + print("Waiting for operation to complete...") + + response = (await operation).result() + + # Handle the response + print(response) + Args: request (Optional[Union[google.cloud.bigtable_admin_v2.types.UpdateAppProfileRequest, dict]]): The request object. Request message for @@ -1937,6 +2387,30 @@ async def delete_app_profile( ) -> None: r"""Deletes an app profile from an instance. + .. code-block:: python + + # 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. + # - It may require specifying regional endpoints when creating the service + # client as shown in: + # https://googleapis.dev/python/google-api-core/latest/client_options.html + from google.cloud import bigtable_admin_v2 + + async def sample_delete_app_profile(): + # Create a client + client = bigtable_admin_v2.BigtableInstanceAdminAsyncClient() + + # Initialize request argument(s) + request = bigtable_admin_v2.DeleteAppProfileRequest( + name="name_value", + ignore_warnings=True, + ) + + # Make the request + await client.delete_app_profile(request=request) + Args: request (Optional[Union[google.cloud.bigtable_admin_v2.types.DeleteAppProfileRequest, dict]]): The request object. Request message for @@ -2025,6 +2499,33 @@ async def get_iam_policy( resource. Returns an empty policy if an instance exists but does not have a policy set. + .. code-block:: python + + # 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. + # - It may require specifying regional endpoints when creating the service + # client as shown in: + # https://googleapis.dev/python/google-api-core/latest/client_options.html + from google.cloud import bigtable_admin_v2 + from google.iam.v1 import iam_policy_pb2 # type: ignore + + async def sample_get_iam_policy(): + # Create a client + client = bigtable_admin_v2.BigtableInstanceAdminAsyncClient() + + # Initialize request argument(s) + request = iam_policy_pb2.GetIamPolicyRequest( + resource="resource_value", + ) + + # Make the request + response = await client.get_iam_policy(request=request) + + # Handle the response + print(response) + Args: request (Optional[Union[google.iam.v1.iam_policy_pb2.GetIamPolicyRequest, dict]]): The request object. Request message for ``GetIamPolicy`` method. @@ -2137,6 +2638,33 @@ async def set_iam_policy( r"""Sets the access control policy on an instance resource. Replaces any existing policy. + .. code-block:: python + + # 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. + # - It may require specifying regional endpoints when creating the service + # client as shown in: + # https://googleapis.dev/python/google-api-core/latest/client_options.html + from google.cloud import bigtable_admin_v2 + from google.iam.v1 import iam_policy_pb2 # type: ignore + + async def sample_set_iam_policy(): + # Create a client + client = bigtable_admin_v2.BigtableInstanceAdminAsyncClient() + + # Initialize request argument(s) + request = iam_policy_pb2.SetIamPolicyRequest( + resource="resource_value", + ) + + # Make the request + response = await client.set_iam_policy(request=request) + + # Handle the response + print(response) + Args: request (Optional[Union[google.iam.v1.iam_policy_pb2.SetIamPolicyRequest, dict]]): The request object. Request message for ``SetIamPolicy`` method. @@ -2250,6 +2778,34 @@ async def test_iam_permissions( r"""Returns permissions that the caller has on the specified instance resource. + .. code-block:: python + + # 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. + # - It may require specifying regional endpoints when creating the service + # client as shown in: + # https://googleapis.dev/python/google-api-core/latest/client_options.html + from google.cloud import bigtable_admin_v2 + from google.iam.v1 import iam_policy_pb2 # type: ignore + + async def sample_test_iam_permissions(): + # Create a client + client = bigtable_admin_v2.BigtableInstanceAdminAsyncClient() + + # Initialize request argument(s) + request = iam_policy_pb2.TestIamPermissionsRequest( + resource="resource_value", + permissions=['permissions_value1', 'permissions_value2'], + ) + + # Make the request + response = await client.test_iam_permissions(request=request) + + # Handle the response + print(response) + Args: request (Optional[Union[google.iam.v1.iam_policy_pb2.TestIamPermissionsRequest, dict]]): The request object. Request message for ``TestIamPermissions`` method. @@ -2345,6 +2901,33 @@ async def list_hot_tablets( r"""Lists hot tablets in a cluster, within the time range provided. Hot tablets are ordered based on CPU usage. + .. code-block:: python + + # 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. + # - It may require specifying regional endpoints when creating the service + # client as shown in: + # https://googleapis.dev/python/google-api-core/latest/client_options.html + from google.cloud import bigtable_admin_v2 + + async def sample_list_hot_tablets(): + # Create a client + client = bigtable_admin_v2.BigtableInstanceAdminAsyncClient() + + # Initialize request argument(s) + request = bigtable_admin_v2.ListHotTabletsRequest( + parent="parent_value", + ) + + # Make the request + page_result = client.list_hot_tablets(request=request) + + # Handle the response + async for response in page_result: + print(response) + Args: request (Optional[Union[google.cloud.bigtable_admin_v2.types.ListHotTabletsRequest, dict]]): The request object. Request message for @@ -2449,6 +3032,41 @@ async def create_logical_view( ) -> operation_async.AsyncOperation: r"""Creates a logical view within an instance. + .. code-block:: python + + # 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. + # - It may require specifying regional endpoints when creating the service + # client as shown in: + # https://googleapis.dev/python/google-api-core/latest/client_options.html + from google.cloud import bigtable_admin_v2 + + async def sample_create_logical_view(): + # Create a client + client = bigtable_admin_v2.BigtableInstanceAdminAsyncClient() + + # Initialize request argument(s) + logical_view = bigtable_admin_v2.LogicalView() + logical_view.query = "query_value" + + request = bigtable_admin_v2.CreateLogicalViewRequest( + parent="parent_value", + logical_view_id="logical_view_id_value", + logical_view=logical_view, + ) + + # Make the request + operation = client.create_logical_view(request=request) + + print("Waiting for operation to complete...") + + response = (await operation).result() + + # Handle the response + print(response) + Args: request (Optional[Union[google.cloud.bigtable_admin_v2.types.CreateLogicalViewRequest, dict]]): The request object. Request message for @@ -2567,6 +3185,32 @@ async def get_logical_view( ) -> instance.LogicalView: r"""Gets information about a logical view. + .. code-block:: python + + # 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. + # - It may require specifying regional endpoints when creating the service + # client as shown in: + # https://googleapis.dev/python/google-api-core/latest/client_options.html + from google.cloud import bigtable_admin_v2 + + async def sample_get_logical_view(): + # Create a client + client = bigtable_admin_v2.BigtableInstanceAdminAsyncClient() + + # Initialize request argument(s) + request = bigtable_admin_v2.GetLogicalViewRequest( + name="name_value", + ) + + # Make the request + response = await client.get_logical_view(request=request) + + # Handle the response + print(response) + Args: request (Optional[Union[google.cloud.bigtable_admin_v2.types.GetLogicalViewRequest, dict]]): The request object. Request message for @@ -2655,6 +3299,33 @@ async def list_logical_views( ) -> pagers.ListLogicalViewsAsyncPager: r"""Lists information about logical views in an instance. + .. code-block:: python + + # 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. + # - It may require specifying regional endpoints when creating the service + # client as shown in: + # https://googleapis.dev/python/google-api-core/latest/client_options.html + from google.cloud import bigtable_admin_v2 + + async def sample_list_logical_views(): + # Create a client + client = bigtable_admin_v2.BigtableInstanceAdminAsyncClient() + + # Initialize request argument(s) + request = bigtable_admin_v2.ListLogicalViewsRequest( + parent="parent_value", + ) + + # Make the request + page_result = client.list_logical_views(request=request) + + # Handle the response + async for response in page_result: + print(response) + Args: request (Optional[Union[google.cloud.bigtable_admin_v2.types.ListLogicalViewsRequest, dict]]): The request object. Request message for @@ -2758,6 +3429,39 @@ async def update_logical_view( ) -> operation_async.AsyncOperation: r"""Updates a logical view within an instance. + .. code-block:: python + + # 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. + # - It may require specifying regional endpoints when creating the service + # client as shown in: + # https://googleapis.dev/python/google-api-core/latest/client_options.html + from google.cloud import bigtable_admin_v2 + + async def sample_update_logical_view(): + # Create a client + client = bigtable_admin_v2.BigtableInstanceAdminAsyncClient() + + # Initialize request argument(s) + logical_view = bigtable_admin_v2.LogicalView() + logical_view.query = "query_value" + + request = bigtable_admin_v2.UpdateLogicalViewRequest( + logical_view=logical_view, + ) + + # Make the request + operation = client.update_logical_view(request=request) + + print("Waiting for operation to complete...") + + response = (await operation).result() + + # Handle the response + print(response) + Args: request (Optional[Union[google.cloud.bigtable_admin_v2.types.UpdateLogicalViewRequest, dict]]): The request object. Request message for @@ -2871,6 +3575,29 @@ async def delete_logical_view( ) -> None: r"""Deletes a logical view from an instance. + .. code-block:: python + + # 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. + # - It may require specifying regional endpoints when creating the service + # client as shown in: + # https://googleapis.dev/python/google-api-core/latest/client_options.html + from google.cloud import bigtable_admin_v2 + + async def sample_delete_logical_view(): + # Create a client + client = bigtable_admin_v2.BigtableInstanceAdminAsyncClient() + + # Initialize request argument(s) + request = bigtable_admin_v2.DeleteLogicalViewRequest( + name="name_value", + ) + + # Make the request + await client.delete_logical_view(request=request) + Args: request (Optional[Union[google.cloud.bigtable_admin_v2.types.DeleteLogicalViewRequest, dict]]): The request object. Request message for @@ -2952,6 +3679,41 @@ async def create_materialized_view( ) -> operation_async.AsyncOperation: r"""Creates a materialized view within an instance. + .. code-block:: python + + # 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. + # - It may require specifying regional endpoints when creating the service + # client as shown in: + # https://googleapis.dev/python/google-api-core/latest/client_options.html + from google.cloud import bigtable_admin_v2 + + async def sample_create_materialized_view(): + # Create a client + client = bigtable_admin_v2.BigtableInstanceAdminAsyncClient() + + # Initialize request argument(s) + materialized_view = bigtable_admin_v2.MaterializedView() + materialized_view.query = "query_value" + + request = bigtable_admin_v2.CreateMaterializedViewRequest( + parent="parent_value", + materialized_view_id="materialized_view_id_value", + materialized_view=materialized_view, + ) + + # Make the request + operation = client.create_materialized_view(request=request) + + print("Waiting for operation to complete...") + + response = (await operation).result() + + # Handle the response + print(response) + Args: request (Optional[Union[google.cloud.bigtable_admin_v2.types.CreateMaterializedViewRequest, dict]]): The request object. Request message for @@ -3074,6 +3836,32 @@ async def get_materialized_view( ) -> instance.MaterializedView: r"""Gets information about a materialized view. + .. code-block:: python + + # 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. + # - It may require specifying regional endpoints when creating the service + # client as shown in: + # https://googleapis.dev/python/google-api-core/latest/client_options.html + from google.cloud import bigtable_admin_v2 + + async def sample_get_materialized_view(): + # Create a client + client = bigtable_admin_v2.BigtableInstanceAdminAsyncClient() + + # Initialize request argument(s) + request = bigtable_admin_v2.GetMaterializedViewRequest( + name="name_value", + ) + + # Make the request + response = await client.get_materialized_view(request=request) + + # Handle the response + print(response) + Args: request (Optional[Union[google.cloud.bigtable_admin_v2.types.GetMaterializedViewRequest, dict]]): The request object. Request message for @@ -3163,6 +3951,33 @@ async def list_materialized_views( r"""Lists information about materialized views in an instance. + .. code-block:: python + + # 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. + # - It may require specifying regional endpoints when creating the service + # client as shown in: + # https://googleapis.dev/python/google-api-core/latest/client_options.html + from google.cloud import bigtable_admin_v2 + + async def sample_list_materialized_views(): + # Create a client + client = bigtable_admin_v2.BigtableInstanceAdminAsyncClient() + + # Initialize request argument(s) + request = bigtable_admin_v2.ListMaterializedViewsRequest( + parent="parent_value", + ) + + # Make the request + page_result = client.list_materialized_views(request=request) + + # Handle the response + async for response in page_result: + print(response) + Args: request (Optional[Union[google.cloud.bigtable_admin_v2.types.ListMaterializedViewsRequest, dict]]): The request object. Request message for @@ -3268,6 +4083,39 @@ async def update_materialized_view( ) -> operation_async.AsyncOperation: r"""Updates a materialized view within an instance. + .. code-block:: python + + # 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. + # - It may require specifying regional endpoints when creating the service + # client as shown in: + # https://googleapis.dev/python/google-api-core/latest/client_options.html + from google.cloud import bigtable_admin_v2 + + async def sample_update_materialized_view(): + # Create a client + client = bigtable_admin_v2.BigtableInstanceAdminAsyncClient() + + # Initialize request argument(s) + materialized_view = bigtable_admin_v2.MaterializedView() + materialized_view.query = "query_value" + + request = bigtable_admin_v2.UpdateMaterializedViewRequest( + materialized_view=materialized_view, + ) + + # Make the request + operation = client.update_materialized_view(request=request) + + print("Waiting for operation to complete...") + + response = (await operation).result() + + # Handle the response + print(response) + Args: request (Optional[Union[google.cloud.bigtable_admin_v2.types.UpdateMaterializedViewRequest, dict]]): The request object. Request message for @@ -3383,6 +4231,29 @@ async def delete_materialized_view( ) -> None: r"""Deletes a materialized view from an instance. + .. code-block:: python + + # 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. + # - It may require specifying regional endpoints when creating the service + # client as shown in: + # https://googleapis.dev/python/google-api-core/latest/client_options.html + from google.cloud import bigtable_admin_v2 + + async def sample_delete_materialized_view(): + # Create a client + client = bigtable_admin_v2.BigtableInstanceAdminAsyncClient() + + # Initialize request argument(s) + request = bigtable_admin_v2.DeleteMaterializedViewRequest( + name="name_value", + ) + + # Make the request + await client.delete_materialized_view(request=request) + Args: request (Optional[Union[google.cloud.bigtable_admin_v2.types.DeleteMaterializedViewRequest, dict]]): The request object. Request message for diff --git a/google/cloud/bigtable_admin_v2/services/bigtable_instance_admin/client.py b/google/cloud/bigtable_admin_v2/services/bigtable_instance_admin/client.py index accaa1e03..84df01058 100644 --- a/google/cloud/bigtable_admin_v2/services/bigtable_instance_admin/client.py +++ b/google/cloud/bigtable_admin_v2/services/bigtable_instance_admin/client.py @@ -906,6 +906,41 @@ def create_instance( scaled. If cluster_config.cluster_autoscaling_config is non-empty, then autoscaling is enabled. + .. code-block:: python + + # 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. + # - It may require specifying regional endpoints when creating the service + # client as shown in: + # https://googleapis.dev/python/google-api-core/latest/client_options.html + from google.cloud import bigtable_admin_v2 + + def sample_create_instance(): + # Create a client + client = bigtable_admin_v2.BigtableInstanceAdminClient() + + # Initialize request argument(s) + instance = bigtable_admin_v2.Instance() + instance.display_name = "display_name_value" + + request = bigtable_admin_v2.CreateInstanceRequest( + parent="parent_value", + instance_id="instance_id_value", + instance=instance, + ) + + # Make the request + operation = client.create_instance(request=request) + + print("Waiting for operation to complete...") + + response = operation.result() + + # Handle the response + print(response) + Args: request (Union[google.cloud.bigtable_admin_v2.types.CreateInstanceRequest, dict]): The request object. Request message for @@ -1035,6 +1070,32 @@ def get_instance( ) -> instance.Instance: r"""Gets information about an instance. + .. code-block:: python + + # 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. + # - It may require specifying regional endpoints when creating the service + # client as shown in: + # https://googleapis.dev/python/google-api-core/latest/client_options.html + from google.cloud import bigtable_admin_v2 + + def sample_get_instance(): + # Create a client + client = bigtable_admin_v2.BigtableInstanceAdminClient() + + # Initialize request argument(s) + request = bigtable_admin_v2.GetInstanceRequest( + name="name_value", + ) + + # Make the request + response = client.get_instance(request=request) + + # Handle the response + print(response) + Args: request (Union[google.cloud.bigtable_admin_v2.types.GetInstanceRequest, dict]): The request object. Request message for @@ -1123,6 +1184,32 @@ def list_instances( ) -> bigtable_instance_admin.ListInstancesResponse: r"""Lists information about instances in a project. + .. code-block:: python + + # 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. + # - It may require specifying regional endpoints when creating the service + # client as shown in: + # https://googleapis.dev/python/google-api-core/latest/client_options.html + from google.cloud import bigtable_admin_v2 + + def sample_list_instances(): + # Create a client + client = bigtable_admin_v2.BigtableInstanceAdminClient() + + # Initialize request argument(s) + request = bigtable_admin_v2.ListInstancesRequest( + parent="parent_value", + ) + + # Make the request + response = client.list_instances(request=request) + + # Handle the response + print(response) + Args: request (Union[google.cloud.bigtable_admin_v2.types.ListInstancesRequest, dict]): The request object. Request message for @@ -1208,6 +1295,32 @@ def update_instance( To update other Instance properties, such as labels, use PartialUpdateInstance. + .. code-block:: python + + # 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. + # - It may require specifying regional endpoints when creating the service + # client as shown in: + # https://googleapis.dev/python/google-api-core/latest/client_options.html + from google.cloud import bigtable_admin_v2 + + def sample_update_instance(): + # Create a client + client = bigtable_admin_v2.BigtableInstanceAdminClient() + + # Initialize request argument(s) + request = bigtable_admin_v2.Instance( + display_name="display_name_value", + ) + + # Make the request + response = client.update_instance(request=request) + + # Handle the response + print(response) + Args: request (Union[google.cloud.bigtable_admin_v2.types.Instance, dict]): The request object. A collection of Bigtable @@ -1279,6 +1392,39 @@ def partial_update_instance( method can modify all fields of an Instance and is the preferred way to update an Instance. + .. code-block:: python + + # 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. + # - It may require specifying regional endpoints when creating the service + # client as shown in: + # https://googleapis.dev/python/google-api-core/latest/client_options.html + from google.cloud import bigtable_admin_v2 + + def sample_partial_update_instance(): + # Create a client + client = bigtable_admin_v2.BigtableInstanceAdminClient() + + # Initialize request argument(s) + instance = bigtable_admin_v2.Instance() + instance.display_name = "display_name_value" + + request = bigtable_admin_v2.PartialUpdateInstanceRequest( + instance=instance, + ) + + # Make the request + operation = client.partial_update_instance(request=request) + + print("Waiting for operation to complete...") + + response = operation.result() + + # Handle the response + print(response) + Args: request (Union[google.cloud.bigtable_admin_v2.types.PartialUpdateInstanceRequest, dict]): The request object. Request message for @@ -1390,6 +1536,29 @@ def delete_instance( ) -> None: r"""Delete an instance from a project. + .. code-block:: python + + # 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. + # - It may require specifying regional endpoints when creating the service + # client as shown in: + # https://googleapis.dev/python/google-api-core/latest/client_options.html + from google.cloud import bigtable_admin_v2 + + def sample_delete_instance(): + # Create a client + client = bigtable_admin_v2.BigtableInstanceAdminClient() + + # Initialize request argument(s) + request = bigtable_admin_v2.DeleteInstanceRequest( + name="name_value", + ) + + # Make the request + client.delete_instance(request=request) + Args: request (Union[google.cloud.bigtable_admin_v2.types.DeleteInstanceRequest, dict]): The request object. Request message for @@ -1474,6 +1643,37 @@ def create_cluster( scaled. If cluster_config.cluster_autoscaling_config is non-empty, then autoscaling is enabled. + .. code-block:: python + + # 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. + # - It may require specifying regional endpoints when creating the service + # client as shown in: + # https://googleapis.dev/python/google-api-core/latest/client_options.html + from google.cloud import bigtable_admin_v2 + + def sample_create_cluster(): + # Create a client + client = bigtable_admin_v2.BigtableInstanceAdminClient() + + # Initialize request argument(s) + request = bigtable_admin_v2.CreateClusterRequest( + parent="parent_value", + cluster_id="cluster_id_value", + ) + + # Make the request + operation = client.create_cluster(request=request) + + print("Waiting for operation to complete...") + + response = operation.result() + + # Handle the response + print(response) + Args: request (Union[google.cloud.bigtable_admin_v2.types.CreateClusterRequest, dict]): The request object. Request message for @@ -1591,6 +1791,32 @@ def get_cluster( ) -> instance.Cluster: r"""Gets information about a cluster. + .. code-block:: python + + # 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. + # - It may require specifying regional endpoints when creating the service + # client as shown in: + # https://googleapis.dev/python/google-api-core/latest/client_options.html + from google.cloud import bigtable_admin_v2 + + def sample_get_cluster(): + # Create a client + client = bigtable_admin_v2.BigtableInstanceAdminClient() + + # Initialize request argument(s) + request = bigtable_admin_v2.GetClusterRequest( + name="name_value", + ) + + # Make the request + response = client.get_cluster(request=request) + + # Handle the response + print(response) + Args: request (Union[google.cloud.bigtable_admin_v2.types.GetClusterRequest, dict]): The request object. Request message for @@ -1678,6 +1904,32 @@ def list_clusters( ) -> bigtable_instance_admin.ListClustersResponse: r"""Lists information about clusters in an instance. + .. code-block:: python + + # 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. + # - It may require specifying regional endpoints when creating the service + # client as shown in: + # https://googleapis.dev/python/google-api-core/latest/client_options.html + from google.cloud import bigtable_admin_v2 + + def sample_list_clusters(): + # Create a client + client = bigtable_admin_v2.BigtableInstanceAdminClient() + + # Initialize request argument(s) + request = bigtable_admin_v2.ListClustersRequest( + parent="parent_value", + ) + + # Make the request + response = client.list_clusters(request=request) + + # Handle the response + print(response) + Args: request (Union[google.cloud.bigtable_admin_v2.types.ListClustersRequest, dict]): The request object. Request message for @@ -1766,6 +2018,35 @@ def update_cluster( cluster_config.cluster_autoscaling_config. In order to update it, you must use PartialUpdateCluster. + .. code-block:: python + + # 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. + # - It may require specifying regional endpoints when creating the service + # client as shown in: + # https://googleapis.dev/python/google-api-core/latest/client_options.html + from google.cloud import bigtable_admin_v2 + + def sample_update_cluster(): + # Create a client + client = bigtable_admin_v2.BigtableInstanceAdminClient() + + # Initialize request argument(s) + request = bigtable_admin_v2.Cluster( + ) + + # Make the request + operation = client.update_cluster(request=request) + + print("Waiting for operation to complete...") + + response = operation.result() + + # Handle the response + print(response) + Args: request (Union[google.cloud.bigtable_admin_v2.types.Cluster, dict]): The request object. A resizable group of nodes in a particular cloud @@ -1855,6 +2136,35 @@ def partial_update_cluster( cluster_config.cluster_autoscaling_config, and explicitly set a serve_node count via the update_mask. + .. code-block:: python + + # 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. + # - It may require specifying regional endpoints when creating the service + # client as shown in: + # https://googleapis.dev/python/google-api-core/latest/client_options.html + from google.cloud import bigtable_admin_v2 + + def sample_partial_update_cluster(): + # Create a client + client = bigtable_admin_v2.BigtableInstanceAdminClient() + + # Initialize request argument(s) + request = bigtable_admin_v2.PartialUpdateClusterRequest( + ) + + # Make the request + operation = client.partial_update_cluster(request=request) + + print("Waiting for operation to complete...") + + response = operation.result() + + # Handle the response + print(response) + Args: request (Union[google.cloud.bigtable_admin_v2.types.PartialUpdateClusterRequest, dict]): The request object. Request message for @@ -1962,6 +2272,29 @@ def delete_cluster( ) -> None: r"""Deletes a cluster from an instance. + .. code-block:: python + + # 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. + # - It may require specifying regional endpoints when creating the service + # client as shown in: + # https://googleapis.dev/python/google-api-core/latest/client_options.html + from google.cloud import bigtable_admin_v2 + + def sample_delete_cluster(): + # Create a client + client = bigtable_admin_v2.BigtableInstanceAdminClient() + + # Initialize request argument(s) + request = bigtable_admin_v2.DeleteClusterRequest( + name="name_value", + ) + + # Make the request + client.delete_cluster(request=request) + Args: request (Union[google.cloud.bigtable_admin_v2.types.DeleteClusterRequest, dict]): The request object. Request message for @@ -2040,6 +2373,37 @@ def create_app_profile( ) -> instance.AppProfile: r"""Creates an app profile within an instance. + .. code-block:: python + + # 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. + # - It may require specifying regional endpoints when creating the service + # client as shown in: + # https://googleapis.dev/python/google-api-core/latest/client_options.html + from google.cloud import bigtable_admin_v2 + + def sample_create_app_profile(): + # Create a client + client = bigtable_admin_v2.BigtableInstanceAdminClient() + + # Initialize request argument(s) + app_profile = bigtable_admin_v2.AppProfile() + app_profile.priority = "PRIORITY_HIGH" + + request = bigtable_admin_v2.CreateAppProfileRequest( + parent="parent_value", + app_profile_id="app_profile_id_value", + app_profile=app_profile, + ) + + # Make the request + response = client.create_app_profile(request=request) + + # Handle the response + print(response) + Args: request (Union[google.cloud.bigtable_admin_v2.types.CreateAppProfileRequest, dict]): The request object. Request message for @@ -2146,6 +2510,32 @@ def get_app_profile( ) -> instance.AppProfile: r"""Gets information about an app profile. + .. code-block:: python + + # 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. + # - It may require specifying regional endpoints when creating the service + # client as shown in: + # https://googleapis.dev/python/google-api-core/latest/client_options.html + from google.cloud import bigtable_admin_v2 + + def sample_get_app_profile(): + # Create a client + client = bigtable_admin_v2.BigtableInstanceAdminClient() + + # Initialize request argument(s) + request = bigtable_admin_v2.GetAppProfileRequest( + name="name_value", + ) + + # Make the request + response = client.get_app_profile(request=request) + + # Handle the response + print(response) + Args: request (Union[google.cloud.bigtable_admin_v2.types.GetAppProfileRequest, dict]): The request object. Request message for @@ -2232,6 +2622,33 @@ def list_app_profiles( ) -> pagers.ListAppProfilesPager: r"""Lists information about app profiles in an instance. + .. code-block:: python + + # 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. + # - It may require specifying regional endpoints when creating the service + # client as shown in: + # https://googleapis.dev/python/google-api-core/latest/client_options.html + from google.cloud import bigtable_admin_v2 + + def sample_list_app_profiles(): + # Create a client + client = bigtable_admin_v2.BigtableInstanceAdminClient() + + # Initialize request argument(s) + request = bigtable_admin_v2.ListAppProfilesRequest( + parent="parent_value", + ) + + # Make the request + page_result = client.list_app_profiles(request=request) + + # Handle the response + for response in page_result: + print(response) + Args: request (Union[google.cloud.bigtable_admin_v2.types.ListAppProfilesRequest, dict]): The request object. Request message for @@ -2335,6 +2752,39 @@ def update_app_profile( ) -> operation.Operation: r"""Updates an app profile within an instance. + .. code-block:: python + + # 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. + # - It may require specifying regional endpoints when creating the service + # client as shown in: + # https://googleapis.dev/python/google-api-core/latest/client_options.html + from google.cloud import bigtable_admin_v2 + + def sample_update_app_profile(): + # Create a client + client = bigtable_admin_v2.BigtableInstanceAdminClient() + + # Initialize request argument(s) + app_profile = bigtable_admin_v2.AppProfile() + app_profile.priority = "PRIORITY_HIGH" + + request = bigtable_admin_v2.UpdateAppProfileRequest( + app_profile=app_profile, + ) + + # Make the request + operation = client.update_app_profile(request=request) + + print("Waiting for operation to complete...") + + response = operation.result() + + # Handle the response + print(response) + Args: request (Union[google.cloud.bigtable_admin_v2.types.UpdateAppProfileRequest, dict]): The request object. Request message for @@ -2442,6 +2892,30 @@ def delete_app_profile( ) -> None: r"""Deletes an app profile from an instance. + .. code-block:: python + + # 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. + # - It may require specifying regional endpoints when creating the service + # client as shown in: + # https://googleapis.dev/python/google-api-core/latest/client_options.html + from google.cloud import bigtable_admin_v2 + + def sample_delete_app_profile(): + # Create a client + client = bigtable_admin_v2.BigtableInstanceAdminClient() + + # Initialize request argument(s) + request = bigtable_admin_v2.DeleteAppProfileRequest( + name="name_value", + ignore_warnings=True, + ) + + # Make the request + client.delete_app_profile(request=request) + Args: request (Union[google.cloud.bigtable_admin_v2.types.DeleteAppProfileRequest, dict]): The request object. Request message for @@ -2527,6 +3001,33 @@ def get_iam_policy( resource. Returns an empty policy if an instance exists but does not have a policy set. + .. code-block:: python + + # 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. + # - It may require specifying regional endpoints when creating the service + # client as shown in: + # https://googleapis.dev/python/google-api-core/latest/client_options.html + from google.cloud import bigtable_admin_v2 + from google.iam.v1 import iam_policy_pb2 # type: ignore + + def sample_get_iam_policy(): + # Create a client + client = bigtable_admin_v2.BigtableInstanceAdminClient() + + # Initialize request argument(s) + request = iam_policy_pb2.GetIamPolicyRequest( + resource="resource_value", + ) + + # Make the request + response = client.get_iam_policy(request=request) + + # Handle the response + print(response) + Args: request (Union[google.iam.v1.iam_policy_pb2.GetIamPolicyRequest, dict]): The request object. Request message for ``GetIamPolicy`` method. @@ -2640,6 +3141,33 @@ def set_iam_policy( r"""Sets the access control policy on an instance resource. Replaces any existing policy. + .. code-block:: python + + # 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. + # - It may require specifying regional endpoints when creating the service + # client as shown in: + # https://googleapis.dev/python/google-api-core/latest/client_options.html + from google.cloud import bigtable_admin_v2 + from google.iam.v1 import iam_policy_pb2 # type: ignore + + def sample_set_iam_policy(): + # Create a client + client = bigtable_admin_v2.BigtableInstanceAdminClient() + + # Initialize request argument(s) + request = iam_policy_pb2.SetIamPolicyRequest( + resource="resource_value", + ) + + # Make the request + response = client.set_iam_policy(request=request) + + # Handle the response + print(response) + Args: request (Union[google.iam.v1.iam_policy_pb2.SetIamPolicyRequest, dict]): The request object. Request message for ``SetIamPolicy`` method. @@ -2754,6 +3282,34 @@ def test_iam_permissions( r"""Returns permissions that the caller has on the specified instance resource. + .. code-block:: python + + # 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. + # - It may require specifying regional endpoints when creating the service + # client as shown in: + # https://googleapis.dev/python/google-api-core/latest/client_options.html + from google.cloud import bigtable_admin_v2 + from google.iam.v1 import iam_policy_pb2 # type: ignore + + def sample_test_iam_permissions(): + # Create a client + client = bigtable_admin_v2.BigtableInstanceAdminClient() + + # Initialize request argument(s) + request = iam_policy_pb2.TestIamPermissionsRequest( + resource="resource_value", + permissions=['permissions_value1', 'permissions_value2'], + ) + + # Make the request + response = client.test_iam_permissions(request=request) + + # Handle the response + print(response) + Args: request (Union[google.iam.v1.iam_policy_pb2.TestIamPermissionsRequest, dict]): The request object. Request message for ``TestIamPermissions`` method. @@ -2850,6 +3406,33 @@ def list_hot_tablets( r"""Lists hot tablets in a cluster, within the time range provided. Hot tablets are ordered based on CPU usage. + .. code-block:: python + + # 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. + # - It may require specifying regional endpoints when creating the service + # client as shown in: + # https://googleapis.dev/python/google-api-core/latest/client_options.html + from google.cloud import bigtable_admin_v2 + + def sample_list_hot_tablets(): + # Create a client + client = bigtable_admin_v2.BigtableInstanceAdminClient() + + # Initialize request argument(s) + request = bigtable_admin_v2.ListHotTabletsRequest( + parent="parent_value", + ) + + # Make the request + page_result = client.list_hot_tablets(request=request) + + # Handle the response + for response in page_result: + print(response) + Args: request (Union[google.cloud.bigtable_admin_v2.types.ListHotTabletsRequest, dict]): The request object. Request message for @@ -2951,6 +3534,41 @@ def create_logical_view( ) -> operation.Operation: r"""Creates a logical view within an instance. + .. code-block:: python + + # 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. + # - It may require specifying regional endpoints when creating the service + # client as shown in: + # https://googleapis.dev/python/google-api-core/latest/client_options.html + from google.cloud import bigtable_admin_v2 + + def sample_create_logical_view(): + # Create a client + client = bigtable_admin_v2.BigtableInstanceAdminClient() + + # Initialize request argument(s) + logical_view = bigtable_admin_v2.LogicalView() + logical_view.query = "query_value" + + request = bigtable_admin_v2.CreateLogicalViewRequest( + parent="parent_value", + logical_view_id="logical_view_id_value", + logical_view=logical_view, + ) + + # Make the request + operation = client.create_logical_view(request=request) + + print("Waiting for operation to complete...") + + response = operation.result() + + # Handle the response + print(response) + Args: request (Union[google.cloud.bigtable_admin_v2.types.CreateLogicalViewRequest, dict]): The request object. Request message for @@ -3066,6 +3684,32 @@ def get_logical_view( ) -> instance.LogicalView: r"""Gets information about a logical view. + .. code-block:: python + + # 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. + # - It may require specifying regional endpoints when creating the service + # client as shown in: + # https://googleapis.dev/python/google-api-core/latest/client_options.html + from google.cloud import bigtable_admin_v2 + + def sample_get_logical_view(): + # Create a client + client = bigtable_admin_v2.BigtableInstanceAdminClient() + + # Initialize request argument(s) + request = bigtable_admin_v2.GetLogicalViewRequest( + name="name_value", + ) + + # Make the request + response = client.get_logical_view(request=request) + + # Handle the response + print(response) + Args: request (Union[google.cloud.bigtable_admin_v2.types.GetLogicalViewRequest, dict]): The request object. Request message for @@ -3151,6 +3795,33 @@ def list_logical_views( ) -> pagers.ListLogicalViewsPager: r"""Lists information about logical views in an instance. + .. code-block:: python + + # 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. + # - It may require specifying regional endpoints when creating the service + # client as shown in: + # https://googleapis.dev/python/google-api-core/latest/client_options.html + from google.cloud import bigtable_admin_v2 + + def sample_list_logical_views(): + # Create a client + client = bigtable_admin_v2.BigtableInstanceAdminClient() + + # Initialize request argument(s) + request = bigtable_admin_v2.ListLogicalViewsRequest( + parent="parent_value", + ) + + # Make the request + page_result = client.list_logical_views(request=request) + + # Handle the response + for response in page_result: + print(response) + Args: request (Union[google.cloud.bigtable_admin_v2.types.ListLogicalViewsRequest, dict]): The request object. Request message for @@ -3251,6 +3922,39 @@ def update_logical_view( ) -> operation.Operation: r"""Updates a logical view within an instance. + .. code-block:: python + + # 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. + # - It may require specifying regional endpoints when creating the service + # client as shown in: + # https://googleapis.dev/python/google-api-core/latest/client_options.html + from google.cloud import bigtable_admin_v2 + + def sample_update_logical_view(): + # Create a client + client = bigtable_admin_v2.BigtableInstanceAdminClient() + + # Initialize request argument(s) + logical_view = bigtable_admin_v2.LogicalView() + logical_view.query = "query_value" + + request = bigtable_admin_v2.UpdateLogicalViewRequest( + logical_view=logical_view, + ) + + # Make the request + operation = client.update_logical_view(request=request) + + print("Waiting for operation to complete...") + + response = operation.result() + + # Handle the response + print(response) + Args: request (Union[google.cloud.bigtable_admin_v2.types.UpdateLogicalViewRequest, dict]): The request object. Request message for @@ -3361,6 +4065,29 @@ def delete_logical_view( ) -> None: r"""Deletes a logical view from an instance. + .. code-block:: python + + # 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. + # - It may require specifying regional endpoints when creating the service + # client as shown in: + # https://googleapis.dev/python/google-api-core/latest/client_options.html + from google.cloud import bigtable_admin_v2 + + def sample_delete_logical_view(): + # Create a client + client = bigtable_admin_v2.BigtableInstanceAdminClient() + + # Initialize request argument(s) + request = bigtable_admin_v2.DeleteLogicalViewRequest( + name="name_value", + ) + + # Make the request + client.delete_logical_view(request=request) + Args: request (Union[google.cloud.bigtable_admin_v2.types.DeleteLogicalViewRequest, dict]): The request object. Request message for @@ -3439,6 +4166,41 @@ def create_materialized_view( ) -> operation.Operation: r"""Creates a materialized view within an instance. + .. code-block:: python + + # 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. + # - It may require specifying regional endpoints when creating the service + # client as shown in: + # https://googleapis.dev/python/google-api-core/latest/client_options.html + from google.cloud import bigtable_admin_v2 + + def sample_create_materialized_view(): + # Create a client + client = bigtable_admin_v2.BigtableInstanceAdminClient() + + # Initialize request argument(s) + materialized_view = bigtable_admin_v2.MaterializedView() + materialized_view.query = "query_value" + + request = bigtable_admin_v2.CreateMaterializedViewRequest( + parent="parent_value", + materialized_view_id="materialized_view_id_value", + materialized_view=materialized_view, + ) + + # Make the request + operation = client.create_materialized_view(request=request) + + print("Waiting for operation to complete...") + + response = operation.result() + + # Handle the response + print(response) + Args: request (Union[google.cloud.bigtable_admin_v2.types.CreateMaterializedViewRequest, dict]): The request object. Request message for @@ -3558,6 +4320,32 @@ def get_materialized_view( ) -> instance.MaterializedView: r"""Gets information about a materialized view. + .. code-block:: python + + # 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. + # - It may require specifying regional endpoints when creating the service + # client as shown in: + # https://googleapis.dev/python/google-api-core/latest/client_options.html + from google.cloud import bigtable_admin_v2 + + def sample_get_materialized_view(): + # Create a client + client = bigtable_admin_v2.BigtableInstanceAdminClient() + + # Initialize request argument(s) + request = bigtable_admin_v2.GetMaterializedViewRequest( + name="name_value", + ) + + # Make the request + response = client.get_materialized_view(request=request) + + # Handle the response + print(response) + Args: request (Union[google.cloud.bigtable_admin_v2.types.GetMaterializedViewRequest, dict]): The request object. Request message for @@ -3644,6 +4432,33 @@ def list_materialized_views( r"""Lists information about materialized views in an instance. + .. code-block:: python + + # 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. + # - It may require specifying regional endpoints when creating the service + # client as shown in: + # https://googleapis.dev/python/google-api-core/latest/client_options.html + from google.cloud import bigtable_admin_v2 + + def sample_list_materialized_views(): + # Create a client + client = bigtable_admin_v2.BigtableInstanceAdminClient() + + # Initialize request argument(s) + request = bigtable_admin_v2.ListMaterializedViewsRequest( + parent="parent_value", + ) + + # Make the request + page_result = client.list_materialized_views(request=request) + + # Handle the response + for response in page_result: + print(response) + Args: request (Union[google.cloud.bigtable_admin_v2.types.ListMaterializedViewsRequest, dict]): The request object. Request message for @@ -3746,6 +4561,39 @@ def update_materialized_view( ) -> operation.Operation: r"""Updates a materialized view within an instance. + .. code-block:: python + + # 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. + # - It may require specifying regional endpoints when creating the service + # client as shown in: + # https://googleapis.dev/python/google-api-core/latest/client_options.html + from google.cloud import bigtable_admin_v2 + + def sample_update_materialized_view(): + # Create a client + client = bigtable_admin_v2.BigtableInstanceAdminClient() + + # Initialize request argument(s) + materialized_view = bigtable_admin_v2.MaterializedView() + materialized_view.query = "query_value" + + request = bigtable_admin_v2.UpdateMaterializedViewRequest( + materialized_view=materialized_view, + ) + + # Make the request + operation = client.update_materialized_view(request=request) + + print("Waiting for operation to complete...") + + response = operation.result() + + # Handle the response + print(response) + Args: request (Union[google.cloud.bigtable_admin_v2.types.UpdateMaterializedViewRequest, dict]): The request object. Request message for @@ -3858,6 +4706,29 @@ def delete_materialized_view( ) -> None: r"""Deletes a materialized view from an instance. + .. code-block:: python + + # 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. + # - It may require specifying regional endpoints when creating the service + # client as shown in: + # https://googleapis.dev/python/google-api-core/latest/client_options.html + from google.cloud import bigtable_admin_v2 + + def sample_delete_materialized_view(): + # Create a client + client = bigtable_admin_v2.BigtableInstanceAdminClient() + + # Initialize request argument(s) + request = bigtable_admin_v2.DeleteMaterializedViewRequest( + name="name_value", + ) + + # Make the request + client.delete_materialized_view(request=request) + Args: request (Union[google.cloud.bigtable_admin_v2.types.DeleteMaterializedViewRequest, dict]): The request object. Request message for diff --git a/google/cloud/bigtable_admin_v2/services/bigtable_table_admin/async_client.py b/google/cloud/bigtable_admin_v2/services/bigtable_table_admin/async_client.py index c3047b3cf..d79d1b088 100644 --- a/google/cloud/bigtable_admin_v2/services/bigtable_table_admin/async_client.py +++ b/google/cloud/bigtable_admin_v2/services/bigtable_table_admin/async_client.py @@ -346,6 +346,33 @@ async def create_table( The table can be created with a full set of initial column families, specified in the request. + .. code-block:: python + + # 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. + # - It may require specifying regional endpoints when creating the service + # client as shown in: + # https://googleapis.dev/python/google-api-core/latest/client_options.html + from google.cloud import bigtable_admin_v2 + + async def sample_create_table(): + # Create a client + client = bigtable_admin_v2.BigtableTableAdminAsyncClient() + + # Initialize request argument(s) + request = bigtable_admin_v2.CreateTableRequest( + parent="parent_value", + table_id="table_id_value", + ) + + # Make the request + response = await client.create_table(request=request) + + # Handle the response + print(response) + Args: request (Optional[Union[google.cloud.bigtable_admin_v2.types.CreateTableRequest, dict]]): The request object. Request message for @@ -465,6 +492,38 @@ async def create_table_from_snapshot( recommended for production use. It is not subject to any SLA or deprecation policy. + .. code-block:: python + + # 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. + # - It may require specifying regional endpoints when creating the service + # client as shown in: + # https://googleapis.dev/python/google-api-core/latest/client_options.html + from google.cloud import bigtable_admin_v2 + + async def sample_create_table_from_snapshot(): + # Create a client + client = bigtable_admin_v2.BigtableTableAdminAsyncClient() + + # Initialize request argument(s) + request = bigtable_admin_v2.CreateTableFromSnapshotRequest( + parent="parent_value", + table_id="table_id_value", + source_snapshot="source_snapshot_value", + ) + + # Make the request + operation = client.create_table_from_snapshot(request=request) + + print("Waiting for operation to complete...") + + response = (await operation).result() + + # Handle the response + print(response) + Args: request (Optional[Union[google.cloud.bigtable_admin_v2.types.CreateTableFromSnapshotRequest, dict]]): The request object. Request message for @@ -590,6 +649,33 @@ async def list_tables( ) -> pagers.ListTablesAsyncPager: r"""Lists all tables served from a specified instance. + .. code-block:: python + + # 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. + # - It may require specifying regional endpoints when creating the service + # client as shown in: + # https://googleapis.dev/python/google-api-core/latest/client_options.html + from google.cloud import bigtable_admin_v2 + + async def sample_list_tables(): + # Create a client + client = bigtable_admin_v2.BigtableTableAdminAsyncClient() + + # Initialize request argument(s) + request = bigtable_admin_v2.ListTablesRequest( + parent="parent_value", + ) + + # Make the request + page_result = client.list_tables(request=request) + + # Handle the response + async for response in page_result: + print(response) + Args: request (Optional[Union[google.cloud.bigtable_admin_v2.types.ListTablesRequest, dict]]): The request object. Request message for @@ -690,6 +776,32 @@ async def get_table( ) -> table.Table: r"""Gets metadata information about the specified table. + .. code-block:: python + + # 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. + # - It may require specifying regional endpoints when creating the service + # client as shown in: + # https://googleapis.dev/python/google-api-core/latest/client_options.html + from google.cloud import bigtable_admin_v2 + + async def sample_get_table(): + # Create a client + client = bigtable_admin_v2.BigtableTableAdminAsyncClient() + + # Initialize request argument(s) + request = bigtable_admin_v2.GetTableRequest( + name="name_value", + ) + + # Make the request + response = await client.get_table(request=request) + + # Handle the response + print(response) + Args: request (Optional[Union[google.cloud.bigtable_admin_v2.types.GetTableRequest, dict]]): The request object. Request message for @@ -779,6 +891,35 @@ async def update_table( ) -> operation_async.AsyncOperation: r"""Updates a specified table. + .. code-block:: python + + # 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. + # - It may require specifying regional endpoints when creating the service + # client as shown in: + # https://googleapis.dev/python/google-api-core/latest/client_options.html + from google.cloud import bigtable_admin_v2 + + async def sample_update_table(): + # Create a client + client = bigtable_admin_v2.BigtableTableAdminAsyncClient() + + # Initialize request argument(s) + request = bigtable_admin_v2.UpdateTableRequest( + ) + + # Make the request + operation = client.update_table(request=request) + + print("Waiting for operation to complete...") + + response = (await operation).result() + + # Handle the response + print(response) + Args: request (Optional[Union[google.cloud.bigtable_admin_v2.types.UpdateTableRequest, dict]]): The request object. The request for @@ -900,6 +1041,29 @@ async def delete_table( r"""Permanently deletes a specified table and all of its data. + .. code-block:: python + + # 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. + # - It may require specifying regional endpoints when creating the service + # client as shown in: + # https://googleapis.dev/python/google-api-core/latest/client_options.html + from google.cloud import bigtable_admin_v2 + + async def sample_delete_table(): + # Create a client + client = bigtable_admin_v2.BigtableTableAdminAsyncClient() + + # Initialize request argument(s) + request = bigtable_admin_v2.DeleteTableRequest( + name="name_value", + ) + + # Make the request + await client.delete_table(request=request) + Args: request (Optional[Union[google.cloud.bigtable_admin_v2.types.DeleteTableRequest, dict]]): The request object. Request message for @@ -980,6 +1144,36 @@ async def undelete_table( r"""Restores a specified table which was accidentally deleted. + .. code-block:: python + + # 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. + # - It may require specifying regional endpoints when creating the service + # client as shown in: + # https://googleapis.dev/python/google-api-core/latest/client_options.html + from google.cloud import bigtable_admin_v2 + + async def sample_undelete_table(): + # Create a client + client = bigtable_admin_v2.BigtableTableAdminAsyncClient() + + # Initialize request argument(s) + request = bigtable_admin_v2.UndeleteTableRequest( + name="name_value", + ) + + # Make the request + operation = client.undelete_table(request=request) + + print("Waiting for operation to complete...") + + response = (await operation).result() + + # Handle the response + print(response) + Args: request (Optional[Union[google.cloud.bigtable_admin_v2.types.UndeleteTableRequest, dict]]): The request object. Request message for @@ -1081,6 +1275,37 @@ async def create_authorized_view( ) -> operation_async.AsyncOperation: r"""Creates a new AuthorizedView in a table. + .. code-block:: python + + # 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. + # - It may require specifying regional endpoints when creating the service + # client as shown in: + # https://googleapis.dev/python/google-api-core/latest/client_options.html + from google.cloud import bigtable_admin_v2 + + async def sample_create_authorized_view(): + # Create a client + client = bigtable_admin_v2.BigtableTableAdminAsyncClient() + + # Initialize request argument(s) + request = bigtable_admin_v2.CreateAuthorizedViewRequest( + parent="parent_value", + authorized_view_id="authorized_view_id_value", + ) + + # Make the request + operation = client.create_authorized_view(request=request) + + print("Waiting for operation to complete...") + + response = (await operation).result() + + # Handle the response + print(response) + Args: request (Optional[Union[google.cloud.bigtable_admin_v2.types.CreateAuthorizedViewRequest, dict]]): The request object. The request for @@ -1202,6 +1427,33 @@ async def list_authorized_views( ) -> pagers.ListAuthorizedViewsAsyncPager: r"""Lists all AuthorizedViews from a specific table. + .. code-block:: python + + # 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. + # - It may require specifying regional endpoints when creating the service + # client as shown in: + # https://googleapis.dev/python/google-api-core/latest/client_options.html + from google.cloud import bigtable_admin_v2 + + async def sample_list_authorized_views(): + # Create a client + client = bigtable_admin_v2.BigtableTableAdminAsyncClient() + + # Initialize request argument(s) + request = bigtable_admin_v2.ListAuthorizedViewsRequest( + parent="parent_value", + ) + + # Make the request + page_result = client.list_authorized_views(request=request) + + # Handle the response + async for response in page_result: + print(response) + Args: request (Optional[Union[google.cloud.bigtable_admin_v2.types.ListAuthorizedViewsRequest, dict]]): The request object. Request message for @@ -1304,6 +1556,32 @@ async def get_authorized_view( ) -> table.AuthorizedView: r"""Gets information from a specified AuthorizedView. + .. code-block:: python + + # 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. + # - It may require specifying regional endpoints when creating the service + # client as shown in: + # https://googleapis.dev/python/google-api-core/latest/client_options.html + from google.cloud import bigtable_admin_v2 + + async def sample_get_authorized_view(): + # Create a client + client = bigtable_admin_v2.BigtableTableAdminAsyncClient() + + # Initialize request argument(s) + request = bigtable_admin_v2.GetAuthorizedViewRequest( + name="name_value", + ) + + # Make the request + response = await client.get_authorized_view(request=request) + + # Handle the response + print(response) + Args: request (Optional[Union[google.cloud.bigtable_admin_v2.types.GetAuthorizedViewRequest, dict]]): The request object. Request message for @@ -1397,6 +1675,35 @@ async def update_authorized_view( ) -> operation_async.AsyncOperation: r"""Updates an AuthorizedView in a table. + .. code-block:: python + + # 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. + # - It may require specifying regional endpoints when creating the service + # client as shown in: + # https://googleapis.dev/python/google-api-core/latest/client_options.html + from google.cloud import bigtable_admin_v2 + + async def sample_update_authorized_view(): + # Create a client + client = bigtable_admin_v2.BigtableTableAdminAsyncClient() + + # Initialize request argument(s) + request = bigtable_admin_v2.UpdateAuthorizedViewRequest( + ) + + # Make the request + operation = client.update_authorized_view(request=request) + + print("Waiting for operation to complete...") + + response = (await operation).result() + + # Handle the response + print(response) + Args: request (Optional[Union[google.cloud.bigtable_admin_v2.types.UpdateAuthorizedViewRequest, dict]]): The request object. The request for @@ -1515,6 +1822,29 @@ async def delete_authorized_view( ) -> None: r"""Permanently deletes a specified AuthorizedView. + .. code-block:: python + + # 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. + # - It may require specifying regional endpoints when creating the service + # client as shown in: + # https://googleapis.dev/python/google-api-core/latest/client_options.html + from google.cloud import bigtable_admin_v2 + + async def sample_delete_authorized_view(): + # Create a client + client = bigtable_admin_v2.BigtableTableAdminAsyncClient() + + # Initialize request argument(s) + request = bigtable_admin_v2.DeleteAuthorizedViewRequest( + name="name_value", + ) + + # Make the request + await client.delete_authorized_view(request=request) + Args: request (Optional[Union[google.cloud.bigtable_admin_v2.types.DeleteAuthorizedViewRequest, dict]]): The request object. Request message for @@ -1603,6 +1933,32 @@ async def modify_column_families( data requests received prior to that point may see a table where only some modifications have taken effect. + .. code-block:: python + + # 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. + # - It may require specifying regional endpoints when creating the service + # client as shown in: + # https://googleapis.dev/python/google-api-core/latest/client_options.html + from google.cloud import bigtable_admin_v2 + + async def sample_modify_column_families(): + # Create a client + client = bigtable_admin_v2.BigtableTableAdminAsyncClient() + + # Initialize request argument(s) + request = bigtable_admin_v2.ModifyColumnFamiliesRequest( + name="name_value", + ) + + # Make the request + response = await client.modify_column_families(request=request) + + # Handle the response + print(response) + Args: request (Optional[Union[google.cloud.bigtable_admin_v2.types.ModifyColumnFamiliesRequest, dict]]): The request object. Request message for @@ -1707,6 +2063,30 @@ async def drop_row_range( rows in a table, or only those that match a particular prefix. + .. code-block:: python + + # 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. + # - It may require specifying regional endpoints when creating the service + # client as shown in: + # https://googleapis.dev/python/google-api-core/latest/client_options.html + from google.cloud import bigtable_admin_v2 + + async def sample_drop_row_range(): + # Create a client + client = bigtable_admin_v2.BigtableTableAdminAsyncClient() + + # Initialize request argument(s) + request = bigtable_admin_v2.DropRowRangeRequest( + row_key_prefix=b'row_key_prefix_blob', + name="name_value", + ) + + # Make the request + await client.drop_row_range(request=request) + Args: request (Optional[Union[google.cloud.bigtable_admin_v2.types.DropRowRangeRequest, dict]]): The request object. Request message for @@ -1765,6 +2145,32 @@ async def generate_consistency_token( been replicated. The tokens will be available for 90 days. + .. code-block:: python + + # 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. + # - It may require specifying regional endpoints when creating the service + # client as shown in: + # https://googleapis.dev/python/google-api-core/latest/client_options.html + from google.cloud import bigtable_admin_v2 + + async def sample_generate_consistency_token(): + # Create a client + client = bigtable_admin_v2.BigtableTableAdminAsyncClient() + + # Initialize request argument(s) + request = bigtable_admin_v2.GenerateConsistencyTokenRequest( + name="name_value", + ) + + # Make the request + response = await client.generate_consistency_token(request=request) + + # Handle the response + print(response) + Args: request (Optional[Union[google.cloud.bigtable_admin_v2.types.GenerateConsistencyTokenRequest, dict]]): The request object. Request message for @@ -1859,6 +2265,33 @@ async def check_consistency( the conditions specified in the token and the check request. + .. code-block:: python + + # 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. + # - It may require specifying regional endpoints when creating the service + # client as shown in: + # https://googleapis.dev/python/google-api-core/latest/client_options.html + from google.cloud import bigtable_admin_v2 + + async def sample_check_consistency(): + # Create a client + client = bigtable_admin_v2.BigtableTableAdminAsyncClient() + + # Initialize request argument(s) + request = bigtable_admin_v2.CheckConsistencyRequest( + name="name_value", + consistency_token="consistency_token_value", + ) + + # Make the request + response = await client.check_consistency(request=request) + + # Handle the response + print(response) + Args: request (Optional[Union[google.cloud.bigtable_admin_v2.types.CheckConsistencyRequest, dict]]): The request object. Request message for @@ -1968,6 +2401,38 @@ async def snapshot_table( recommended for production use. It is not subject to any SLA or deprecation policy. + .. code-block:: python + + # 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. + # - It may require specifying regional endpoints when creating the service + # client as shown in: + # https://googleapis.dev/python/google-api-core/latest/client_options.html + from google.cloud import bigtable_admin_v2 + + async def sample_snapshot_table(): + # Create a client + client = bigtable_admin_v2.BigtableTableAdminAsyncClient() + + # Initialize request argument(s) + request = bigtable_admin_v2.SnapshotTableRequest( + name="name_value", + cluster="cluster_value", + snapshot_id="snapshot_id_value", + ) + + # Make the request + operation = client.snapshot_table(request=request) + + print("Waiting for operation to complete...") + + response = (await operation).result() + + # Handle the response + print(response) + Args: request (Optional[Union[google.cloud.bigtable_admin_v2.types.SnapshotTableRequest, dict]]): The request object. Request message for @@ -2115,6 +2580,32 @@ async def get_snapshot( recommended for production use. It is not subject to any SLA or deprecation policy. + .. code-block:: python + + # 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. + # - It may require specifying regional endpoints when creating the service + # client as shown in: + # https://googleapis.dev/python/google-api-core/latest/client_options.html + from google.cloud import bigtable_admin_v2 + + async def sample_get_snapshot(): + # Create a client + client = bigtable_admin_v2.BigtableTableAdminAsyncClient() + + # Initialize request argument(s) + request = bigtable_admin_v2.GetSnapshotRequest( + name="name_value", + ) + + # Make the request + response = await client.get_snapshot(request=request) + + # Handle the response + print(response) + Args: request (Optional[Union[google.cloud.bigtable_admin_v2.types.GetSnapshotRequest, dict]]): The request object. Request message for @@ -2228,6 +2719,33 @@ async def list_snapshots( recommended for production use. It is not subject to any SLA or deprecation policy. + .. code-block:: python + + # 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. + # - It may require specifying regional endpoints when creating the service + # client as shown in: + # https://googleapis.dev/python/google-api-core/latest/client_options.html + from google.cloud import bigtable_admin_v2 + + async def sample_list_snapshots(): + # Create a client + client = bigtable_admin_v2.BigtableTableAdminAsyncClient() + + # Initialize request argument(s) + request = bigtable_admin_v2.ListSnapshotsRequest( + parent="parent_value", + ) + + # Make the request + page_result = client.list_snapshots(request=request) + + # Handle the response + async for response in page_result: + print(response) + Args: request (Optional[Union[google.cloud.bigtable_admin_v2.types.ListSnapshotsRequest, dict]]): The request object. Request message for @@ -2354,6 +2872,29 @@ async def delete_snapshot( recommended for production use. It is not subject to any SLA or deprecation policy. + .. code-block:: python + + # 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. + # - It may require specifying regional endpoints when creating the service + # client as shown in: + # https://googleapis.dev/python/google-api-core/latest/client_options.html + from google.cloud import bigtable_admin_v2 + + async def sample_delete_snapshot(): + # Create a client + client = bigtable_admin_v2.BigtableTableAdminAsyncClient() + + # Initialize request argument(s) + request = bigtable_admin_v2.DeleteSnapshotRequest( + name="name_value", + ) + + # Make the request + await client.delete_snapshot(request=request) + Args: request (Optional[Union[google.cloud.bigtable_admin_v2.types.DeleteSnapshotRequest, dict]]): The request object. Request message for @@ -2448,6 +2989,41 @@ async def create_backup( Cancelling the returned operation will stop the creation and delete the backup. + .. code-block:: python + + # 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. + # - It may require specifying regional endpoints when creating the service + # client as shown in: + # https://googleapis.dev/python/google-api-core/latest/client_options.html + from google.cloud import bigtable_admin_v2 + + async def sample_create_backup(): + # Create a client + client = bigtable_admin_v2.BigtableTableAdminAsyncClient() + + # Initialize request argument(s) + backup = bigtable_admin_v2.Backup() + backup.source_table = "source_table_value" + + request = bigtable_admin_v2.CreateBackupRequest( + parent="parent_value", + backup_id="backup_id_value", + backup=backup, + ) + + # Make the request + operation = client.create_backup(request=request) + + print("Waiting for operation to complete...") + + response = (await operation).result() + + # Handle the response + print(response) + Args: request (Optional[Union[google.cloud.bigtable_admin_v2.types.CreateBackupRequest, dict]]): The request object. The request for @@ -2568,6 +3144,32 @@ async def get_backup( r"""Gets metadata on a pending or completed Cloud Bigtable Backup. + .. code-block:: python + + # 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. + # - It may require specifying regional endpoints when creating the service + # client as shown in: + # https://googleapis.dev/python/google-api-core/latest/client_options.html + from google.cloud import bigtable_admin_v2 + + async def sample_get_backup(): + # Create a client + client = bigtable_admin_v2.BigtableTableAdminAsyncClient() + + # Initialize request argument(s) + request = bigtable_admin_v2.GetBackupRequest( + name="name_value", + ) + + # Make the request + response = await client.get_backup(request=request) + + # Handle the response + print(response) + Args: request (Optional[Union[google.cloud.bigtable_admin_v2.types.GetBackupRequest, dict]]): The request object. The request for @@ -2652,6 +3254,35 @@ async def update_backup( ) -> table.Backup: r"""Updates a pending or completed Cloud Bigtable Backup. + .. code-block:: python + + # 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. + # - It may require specifying regional endpoints when creating the service + # client as shown in: + # https://googleapis.dev/python/google-api-core/latest/client_options.html + from google.cloud import bigtable_admin_v2 + + async def sample_update_backup(): + # Create a client + client = bigtable_admin_v2.BigtableTableAdminAsyncClient() + + # Initialize request argument(s) + backup = bigtable_admin_v2.Backup() + backup.source_table = "source_table_value" + + request = bigtable_admin_v2.UpdateBackupRequest( + backup=backup, + ) + + # Make the request + response = await client.update_backup(request=request) + + # Handle the response + print(response) + Args: request (Optional[Union[google.cloud.bigtable_admin_v2.types.UpdateBackupRequest, dict]]): The request object. The request for @@ -2755,6 +3386,29 @@ async def delete_backup( ) -> None: r"""Deletes a pending or completed Cloud Bigtable backup. + .. code-block:: python + + # 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. + # - It may require specifying regional endpoints when creating the service + # client as shown in: + # https://googleapis.dev/python/google-api-core/latest/client_options.html + from google.cloud import bigtable_admin_v2 + + async def sample_delete_backup(): + # Create a client + client = bigtable_admin_v2.BigtableTableAdminAsyncClient() + + # Initialize request argument(s) + request = bigtable_admin_v2.DeleteBackupRequest( + name="name_value", + ) + + # Make the request + await client.delete_backup(request=request) + Args: request (Optional[Union[google.cloud.bigtable_admin_v2.types.DeleteBackupRequest, dict]]): The request object. The request for @@ -2833,6 +3487,33 @@ async def list_backups( r"""Lists Cloud Bigtable backups. Returns both completed and pending backups. + .. code-block:: python + + # 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. + # - It may require specifying regional endpoints when creating the service + # client as shown in: + # https://googleapis.dev/python/google-api-core/latest/client_options.html + from google.cloud import bigtable_admin_v2 + + async def sample_list_backups(): + # Create a client + client = bigtable_admin_v2.BigtableTableAdminAsyncClient() + + # Initialize request argument(s) + request = bigtable_admin_v2.ListBackupsRequest( + parent="parent_value", + ) + + # Make the request + page_result = client.list_backups(request=request) + + # Handle the response + async for response in page_result: + print(response) + Args: request (Optional[Union[google.cloud.bigtable_admin_v2.types.ListBackupsRequest, dict]]): The request object. The request for @@ -2942,6 +3623,38 @@ async def _restore_table( The [response][google.longrunning.Operation.response] type is [Table][google.bigtable.admin.v2.Table], if successful. + .. code-block:: python + + # 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. + # - It may require specifying regional endpoints when creating the service + # client as shown in: + # https://googleapis.dev/python/google-api-core/latest/client_options.html + from google.cloud import bigtable_admin_v2 + + async def sample_restore_table(): + # Create a client + client = bigtable_admin_v2.BigtableTableAdminAsyncClient() + + # Initialize request argument(s) + request = bigtable_admin_v2.RestoreTableRequest( + backup="backup_value", + parent="parent_value", + table_id="table_id_value", + ) + + # Make the request + operation = client._restore_table(request=request) + + print("Waiting for operation to complete...") + + response = (await operation).result() + + # Handle the response + print(response) + Args: request (Optional[Union[google.cloud.bigtable_admin_v2.types.RestoreTableRequest, dict]]): The request object. The request for @@ -3019,6 +3732,38 @@ async def copy_backup( destination cluster located in the destination instance and project. + .. code-block:: python + + # 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. + # - It may require specifying regional endpoints when creating the service + # client as shown in: + # https://googleapis.dev/python/google-api-core/latest/client_options.html + from google.cloud import bigtable_admin_v2 + + async def sample_copy_backup(): + # Create a client + client = bigtable_admin_v2.BigtableTableAdminAsyncClient() + + # Initialize request argument(s) + request = bigtable_admin_v2.CopyBackupRequest( + parent="parent_value", + backup_id="backup_id_value", + source_backup="source_backup_value", + ) + + # Make the request + operation = client.copy_backup(request=request) + + print("Waiting for operation to complete...") + + response = (await operation).result() + + # Handle the response + print(response) + Args: request (Optional[Union[google.cloud.bigtable_admin_v2.types.CopyBackupRequest, dict]]): The request object. The request for @@ -3160,6 +3905,33 @@ async def get_iam_policy( resource. Returns an empty policy if the resource exists but does not have a policy set. + .. code-block:: python + + # 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. + # - It may require specifying regional endpoints when creating the service + # client as shown in: + # https://googleapis.dev/python/google-api-core/latest/client_options.html + from google.cloud import bigtable_admin_v2 + from google.iam.v1 import iam_policy_pb2 # type: ignore + + async def sample_get_iam_policy(): + # Create a client + client = bigtable_admin_v2.BigtableTableAdminAsyncClient() + + # Initialize request argument(s) + request = iam_policy_pb2.GetIamPolicyRequest( + resource="resource_value", + ) + + # Make the request + response = await client.get_iam_policy(request=request) + + # Handle the response + print(response) + Args: request (Optional[Union[google.iam.v1.iam_policy_pb2.GetIamPolicyRequest, dict]]): The request object. Request message for ``GetIamPolicy`` method. @@ -3272,6 +4044,33 @@ async def set_iam_policy( r"""Sets the access control policy on a Bigtable resource. Replaces any existing policy. + .. code-block:: python + + # 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. + # - It may require specifying regional endpoints when creating the service + # client as shown in: + # https://googleapis.dev/python/google-api-core/latest/client_options.html + from google.cloud import bigtable_admin_v2 + from google.iam.v1 import iam_policy_pb2 # type: ignore + + async def sample_set_iam_policy(): + # Create a client + client = bigtable_admin_v2.BigtableTableAdminAsyncClient() + + # Initialize request argument(s) + request = iam_policy_pb2.SetIamPolicyRequest( + resource="resource_value", + ) + + # Make the request + response = await client.set_iam_policy(request=request) + + # Handle the response + print(response) + Args: request (Optional[Union[google.iam.v1.iam_policy_pb2.SetIamPolicyRequest, dict]]): The request object. Request message for ``SetIamPolicy`` method. @@ -3385,6 +4184,34 @@ async def test_iam_permissions( r"""Returns permissions that the caller has on the specified Bigtable resource. + .. code-block:: python + + # 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. + # - It may require specifying regional endpoints when creating the service + # client as shown in: + # https://googleapis.dev/python/google-api-core/latest/client_options.html + from google.cloud import bigtable_admin_v2 + from google.iam.v1 import iam_policy_pb2 # type: ignore + + async def sample_test_iam_permissions(): + # Create a client + client = bigtable_admin_v2.BigtableTableAdminAsyncClient() + + # Initialize request argument(s) + request = iam_policy_pb2.TestIamPermissionsRequest( + resource="resource_value", + permissions=['permissions_value1', 'permissions_value2'], + ) + + # Make the request + response = await client.test_iam_permissions(request=request) + + # Handle the response + print(response) + Args: request (Optional[Union[google.iam.v1.iam_policy_pb2.TestIamPermissionsRequest, dict]]): The request object. Request message for ``TestIamPermissions`` method. @@ -3481,6 +4308,41 @@ async def create_schema_bundle( ) -> operation_async.AsyncOperation: r"""Creates a new schema bundle in the specified table. + .. code-block:: python + + # 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. + # - It may require specifying regional endpoints when creating the service + # client as shown in: + # https://googleapis.dev/python/google-api-core/latest/client_options.html + from google.cloud import bigtable_admin_v2 + + async def sample_create_schema_bundle(): + # Create a client + client = bigtable_admin_v2.BigtableTableAdminAsyncClient() + + # Initialize request argument(s) + schema_bundle = bigtable_admin_v2.SchemaBundle() + schema_bundle.proto_schema.proto_descriptors = b'proto_descriptors_blob' + + request = bigtable_admin_v2.CreateSchemaBundleRequest( + parent="parent_value", + schema_bundle_id="schema_bundle_id_value", + schema_bundle=schema_bundle, + ) + + # Make the request + operation = client.create_schema_bundle(request=request) + + print("Waiting for operation to complete...") + + response = (await operation).result() + + # Handle the response + print(response) + Args: request (Optional[Union[google.cloud.bigtable_admin_v2.types.CreateSchemaBundleRequest, dict]]): The request object. The request for @@ -3601,6 +4463,39 @@ async def update_schema_bundle( ) -> operation_async.AsyncOperation: r"""Updates a schema bundle in the specified table. + .. code-block:: python + + # 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. + # - It may require specifying regional endpoints when creating the service + # client as shown in: + # https://googleapis.dev/python/google-api-core/latest/client_options.html + from google.cloud import bigtable_admin_v2 + + async def sample_update_schema_bundle(): + # Create a client + client = bigtable_admin_v2.BigtableTableAdminAsyncClient() + + # Initialize request argument(s) + schema_bundle = bigtable_admin_v2.SchemaBundle() + schema_bundle.proto_schema.proto_descriptors = b'proto_descriptors_blob' + + request = bigtable_admin_v2.UpdateSchemaBundleRequest( + schema_bundle=schema_bundle, + ) + + # Make the request + operation = client.update_schema_bundle(request=request) + + print("Waiting for operation to complete...") + + response = (await operation).result() + + # Handle the response + print(response) + Args: request (Optional[Union[google.cloud.bigtable_admin_v2.types.UpdateSchemaBundleRequest, dict]]): The request object. The request for @@ -3714,6 +4609,32 @@ async def get_schema_bundle( r"""Gets metadata information about the specified schema bundle. + .. code-block:: python + + # 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. + # - It may require specifying regional endpoints when creating the service + # client as shown in: + # https://googleapis.dev/python/google-api-core/latest/client_options.html + from google.cloud import bigtable_admin_v2 + + async def sample_get_schema_bundle(): + # Create a client + client = bigtable_admin_v2.BigtableTableAdminAsyncClient() + + # Initialize request argument(s) + request = bigtable_admin_v2.GetSchemaBundleRequest( + name="name_value", + ) + + # Make the request + response = await client.get_schema_bundle(request=request) + + # Handle the response + print(response) + Args: request (Optional[Union[google.cloud.bigtable_admin_v2.types.GetSchemaBundleRequest, dict]]): The request object. The request for @@ -3803,6 +4724,33 @@ async def list_schema_bundles( r"""Lists all schema bundles associated with the specified table. + .. code-block:: python + + # 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. + # - It may require specifying regional endpoints when creating the service + # client as shown in: + # https://googleapis.dev/python/google-api-core/latest/client_options.html + from google.cloud import bigtable_admin_v2 + + async def sample_list_schema_bundles(): + # Create a client + client = bigtable_admin_v2.BigtableTableAdminAsyncClient() + + # Initialize request argument(s) + request = bigtable_admin_v2.ListSchemaBundlesRequest( + parent="parent_value", + ) + + # Make the request + page_result = client.list_schema_bundles(request=request) + + # Handle the response + async for response in page_result: + print(response) + Args: request (Optional[Union[google.cloud.bigtable_admin_v2.types.ListSchemaBundlesRequest, dict]]): The request object. The request for @@ -3905,6 +4853,29 @@ async def delete_schema_bundle( ) -> None: r"""Deletes a schema bundle in the specified table. + .. code-block:: python + + # 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. + # - It may require specifying regional endpoints when creating the service + # client as shown in: + # https://googleapis.dev/python/google-api-core/latest/client_options.html + from google.cloud import bigtable_admin_v2 + + async def sample_delete_schema_bundle(): + # Create a client + client = bigtable_admin_v2.BigtableTableAdminAsyncClient() + + # Initialize request argument(s) + request = bigtable_admin_v2.DeleteSchemaBundleRequest( + name="name_value", + ) + + # Make the request + await client.delete_schema_bundle(request=request) + Args: request (Optional[Union[google.cloud.bigtable_admin_v2.types.DeleteSchemaBundleRequest, dict]]): The request object. The request for diff --git a/google/cloud/bigtable_admin_v2/services/bigtable_table_admin/client.py b/google/cloud/bigtable_admin_v2/services/bigtable_table_admin/client.py index c1f5a3e64..d0030af92 100644 --- a/google/cloud/bigtable_admin_v2/services/bigtable_table_admin/client.py +++ b/google/cloud/bigtable_admin_v2/services/bigtable_table_admin/client.py @@ -906,6 +906,33 @@ def create_table( The table can be created with a full set of initial column families, specified in the request. + .. code-block:: python + + # 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. + # - It may require specifying regional endpoints when creating the service + # client as shown in: + # https://googleapis.dev/python/google-api-core/latest/client_options.html + from google.cloud import bigtable_admin_v2 + + def sample_create_table(): + # Create a client + client = bigtable_admin_v2.BigtableTableAdminClient() + + # Initialize request argument(s) + request = bigtable_admin_v2.CreateTableRequest( + parent="parent_value", + table_id="table_id_value", + ) + + # Make the request + response = client.create_table(request=request) + + # Handle the response + print(response) + Args: request (Union[google.cloud.bigtable_admin_v2.types.CreateTableRequest, dict]): The request object. Request message for @@ -1022,6 +1049,38 @@ def create_table_from_snapshot( recommended for production use. It is not subject to any SLA or deprecation policy. + .. code-block:: python + + # 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. + # - It may require specifying regional endpoints when creating the service + # client as shown in: + # https://googleapis.dev/python/google-api-core/latest/client_options.html + from google.cloud import bigtable_admin_v2 + + def sample_create_table_from_snapshot(): + # Create a client + client = bigtable_admin_v2.BigtableTableAdminClient() + + # Initialize request argument(s) + request = bigtable_admin_v2.CreateTableFromSnapshotRequest( + parent="parent_value", + table_id="table_id_value", + source_snapshot="source_snapshot_value", + ) + + # Make the request + operation = client.create_table_from_snapshot(request=request) + + print("Waiting for operation to complete...") + + response = operation.result() + + # Handle the response + print(response) + Args: request (Union[google.cloud.bigtable_admin_v2.types.CreateTableFromSnapshotRequest, dict]): The request object. Request message for @@ -1146,6 +1205,33 @@ def list_tables( ) -> pagers.ListTablesPager: r"""Lists all tables served from a specified instance. + .. code-block:: python + + # 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. + # - It may require specifying regional endpoints when creating the service + # client as shown in: + # https://googleapis.dev/python/google-api-core/latest/client_options.html + from google.cloud import bigtable_admin_v2 + + def sample_list_tables(): + # Create a client + client = bigtable_admin_v2.BigtableTableAdminClient() + + # Initialize request argument(s) + request = bigtable_admin_v2.ListTablesRequest( + parent="parent_value", + ) + + # Make the request + page_result = client.list_tables(request=request) + + # Handle the response + for response in page_result: + print(response) + Args: request (Union[google.cloud.bigtable_admin_v2.types.ListTablesRequest, dict]): The request object. Request message for @@ -1243,6 +1329,32 @@ def get_table( ) -> table.Table: r"""Gets metadata information about the specified table. + .. code-block:: python + + # 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. + # - It may require specifying regional endpoints when creating the service + # client as shown in: + # https://googleapis.dev/python/google-api-core/latest/client_options.html + from google.cloud import bigtable_admin_v2 + + def sample_get_table(): + # Create a client + client = bigtable_admin_v2.BigtableTableAdminClient() + + # Initialize request argument(s) + request = bigtable_admin_v2.GetTableRequest( + name="name_value", + ) + + # Make the request + response = client.get_table(request=request) + + # Handle the response + print(response) + Args: request (Union[google.cloud.bigtable_admin_v2.types.GetTableRequest, dict]): The request object. Request message for @@ -1329,6 +1441,35 @@ def update_table( ) -> operation.Operation: r"""Updates a specified table. + .. code-block:: python + + # 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. + # - It may require specifying regional endpoints when creating the service + # client as shown in: + # https://googleapis.dev/python/google-api-core/latest/client_options.html + from google.cloud import bigtable_admin_v2 + + def sample_update_table(): + # Create a client + client = bigtable_admin_v2.BigtableTableAdminClient() + + # Initialize request argument(s) + request = bigtable_admin_v2.UpdateTableRequest( + ) + + # Make the request + operation = client.update_table(request=request) + + print("Waiting for operation to complete...") + + response = operation.result() + + # Handle the response + print(response) + Args: request (Union[google.cloud.bigtable_admin_v2.types.UpdateTableRequest, dict]): The request object. The request for @@ -1447,6 +1588,29 @@ def delete_table( r"""Permanently deletes a specified table and all of its data. + .. code-block:: python + + # 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. + # - It may require specifying regional endpoints when creating the service + # client as shown in: + # https://googleapis.dev/python/google-api-core/latest/client_options.html + from google.cloud import bigtable_admin_v2 + + def sample_delete_table(): + # Create a client + client = bigtable_admin_v2.BigtableTableAdminClient() + + # Initialize request argument(s) + request = bigtable_admin_v2.DeleteTableRequest( + name="name_value", + ) + + # Make the request + client.delete_table(request=request) + Args: request (Union[google.cloud.bigtable_admin_v2.types.DeleteTableRequest, dict]): The request object. Request message for @@ -1524,6 +1688,36 @@ def undelete_table( r"""Restores a specified table which was accidentally deleted. + .. code-block:: python + + # 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. + # - It may require specifying regional endpoints when creating the service + # client as shown in: + # https://googleapis.dev/python/google-api-core/latest/client_options.html + from google.cloud import bigtable_admin_v2 + + def sample_undelete_table(): + # Create a client + client = bigtable_admin_v2.BigtableTableAdminClient() + + # Initialize request argument(s) + request = bigtable_admin_v2.UndeleteTableRequest( + name="name_value", + ) + + # Make the request + operation = client.undelete_table(request=request) + + print("Waiting for operation to complete...") + + response = operation.result() + + # Handle the response + print(response) + Args: request (Union[google.cloud.bigtable_admin_v2.types.UndeleteTableRequest, dict]): The request object. Request message for @@ -1622,6 +1816,37 @@ def create_authorized_view( ) -> operation.Operation: r"""Creates a new AuthorizedView in a table. + .. code-block:: python + + # 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. + # - It may require specifying regional endpoints when creating the service + # client as shown in: + # https://googleapis.dev/python/google-api-core/latest/client_options.html + from google.cloud import bigtable_admin_v2 + + def sample_create_authorized_view(): + # Create a client + client = bigtable_admin_v2.BigtableTableAdminClient() + + # Initialize request argument(s) + request = bigtable_admin_v2.CreateAuthorizedViewRequest( + parent="parent_value", + authorized_view_id="authorized_view_id_value", + ) + + # Make the request + operation = client.create_authorized_view(request=request) + + print("Waiting for operation to complete...") + + response = operation.result() + + # Handle the response + print(response) + Args: request (Union[google.cloud.bigtable_admin_v2.types.CreateAuthorizedViewRequest, dict]): The request object. The request for @@ -1740,6 +1965,33 @@ def list_authorized_views( ) -> pagers.ListAuthorizedViewsPager: r"""Lists all AuthorizedViews from a specific table. + .. code-block:: python + + # 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. + # - It may require specifying regional endpoints when creating the service + # client as shown in: + # https://googleapis.dev/python/google-api-core/latest/client_options.html + from google.cloud import bigtable_admin_v2 + + def sample_list_authorized_views(): + # Create a client + client = bigtable_admin_v2.BigtableTableAdminClient() + + # Initialize request argument(s) + request = bigtable_admin_v2.ListAuthorizedViewsRequest( + parent="parent_value", + ) + + # Make the request + page_result = client.list_authorized_views(request=request) + + # Handle the response + for response in page_result: + print(response) + Args: request (Union[google.cloud.bigtable_admin_v2.types.ListAuthorizedViewsRequest, dict]): The request object. Request message for @@ -1839,6 +2091,32 @@ def get_authorized_view( ) -> table.AuthorizedView: r"""Gets information from a specified AuthorizedView. + .. code-block:: python + + # 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. + # - It may require specifying regional endpoints when creating the service + # client as shown in: + # https://googleapis.dev/python/google-api-core/latest/client_options.html + from google.cloud import bigtable_admin_v2 + + def sample_get_authorized_view(): + # Create a client + client = bigtable_admin_v2.BigtableTableAdminClient() + + # Initialize request argument(s) + request = bigtable_admin_v2.GetAuthorizedViewRequest( + name="name_value", + ) + + # Make the request + response = client.get_authorized_view(request=request) + + # Handle the response + print(response) + Args: request (Union[google.cloud.bigtable_admin_v2.types.GetAuthorizedViewRequest, dict]): The request object. Request message for @@ -1929,6 +2207,35 @@ def update_authorized_view( ) -> operation.Operation: r"""Updates an AuthorizedView in a table. + .. code-block:: python + + # 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. + # - It may require specifying regional endpoints when creating the service + # client as shown in: + # https://googleapis.dev/python/google-api-core/latest/client_options.html + from google.cloud import bigtable_admin_v2 + + def sample_update_authorized_view(): + # Create a client + client = bigtable_admin_v2.BigtableTableAdminClient() + + # Initialize request argument(s) + request = bigtable_admin_v2.UpdateAuthorizedViewRequest( + ) + + # Make the request + operation = client.update_authorized_view(request=request) + + print("Waiting for operation to complete...") + + response = operation.result() + + # Handle the response + print(response) + Args: request (Union[google.cloud.bigtable_admin_v2.types.UpdateAuthorizedViewRequest, dict]): The request object. The request for @@ -2044,6 +2351,29 @@ def delete_authorized_view( ) -> None: r"""Permanently deletes a specified AuthorizedView. + .. code-block:: python + + # 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. + # - It may require specifying regional endpoints when creating the service + # client as shown in: + # https://googleapis.dev/python/google-api-core/latest/client_options.html + from google.cloud import bigtable_admin_v2 + + def sample_delete_authorized_view(): + # Create a client + client = bigtable_admin_v2.BigtableTableAdminClient() + + # Initialize request argument(s) + request = bigtable_admin_v2.DeleteAuthorizedViewRequest( + name="name_value", + ) + + # Make the request + client.delete_authorized_view(request=request) + Args: request (Union[google.cloud.bigtable_admin_v2.types.DeleteAuthorizedViewRequest, dict]): The request object. Request message for @@ -2129,6 +2459,32 @@ def modify_column_families( data requests received prior to that point may see a table where only some modifications have taken effect. + .. code-block:: python + + # 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. + # - It may require specifying regional endpoints when creating the service + # client as shown in: + # https://googleapis.dev/python/google-api-core/latest/client_options.html + from google.cloud import bigtable_admin_v2 + + def sample_modify_column_families(): + # Create a client + client = bigtable_admin_v2.BigtableTableAdminClient() + + # Initialize request argument(s) + request = bigtable_admin_v2.ModifyColumnFamiliesRequest( + name="name_value", + ) + + # Make the request + response = client.modify_column_families(request=request) + + # Handle the response + print(response) + Args: request (Union[google.cloud.bigtable_admin_v2.types.ModifyColumnFamiliesRequest, dict]): The request object. Request message for @@ -2230,6 +2586,30 @@ def drop_row_range( rows in a table, or only those that match a particular prefix. + .. code-block:: python + + # 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. + # - It may require specifying regional endpoints when creating the service + # client as shown in: + # https://googleapis.dev/python/google-api-core/latest/client_options.html + from google.cloud import bigtable_admin_v2 + + def sample_drop_row_range(): + # Create a client + client = bigtable_admin_v2.BigtableTableAdminClient() + + # Initialize request argument(s) + request = bigtable_admin_v2.DropRowRangeRequest( + row_key_prefix=b'row_key_prefix_blob', + name="name_value", + ) + + # Make the request + client.drop_row_range(request=request) + Args: request (Union[google.cloud.bigtable_admin_v2.types.DropRowRangeRequest, dict]): The request object. Request message for @@ -2286,6 +2666,32 @@ def generate_consistency_token( been replicated. The tokens will be available for 90 days. + .. code-block:: python + + # 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. + # - It may require specifying regional endpoints when creating the service + # client as shown in: + # https://googleapis.dev/python/google-api-core/latest/client_options.html + from google.cloud import bigtable_admin_v2 + + def sample_generate_consistency_token(): + # Create a client + client = bigtable_admin_v2.BigtableTableAdminClient() + + # Initialize request argument(s) + request = bigtable_admin_v2.GenerateConsistencyTokenRequest( + name="name_value", + ) + + # Make the request + response = client.generate_consistency_token(request=request) + + # Handle the response + print(response) + Args: request (Union[google.cloud.bigtable_admin_v2.types.GenerateConsistencyTokenRequest, dict]): The request object. Request message for @@ -2379,6 +2785,33 @@ def check_consistency( the conditions specified in the token and the check request. + .. code-block:: python + + # 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. + # - It may require specifying regional endpoints when creating the service + # client as shown in: + # https://googleapis.dev/python/google-api-core/latest/client_options.html + from google.cloud import bigtable_admin_v2 + + def sample_check_consistency(): + # Create a client + client = bigtable_admin_v2.BigtableTableAdminClient() + + # Initialize request argument(s) + request = bigtable_admin_v2.CheckConsistencyRequest( + name="name_value", + consistency_token="consistency_token_value", + ) + + # Make the request + response = client.check_consistency(request=request) + + # Handle the response + print(response) + Args: request (Union[google.cloud.bigtable_admin_v2.types.CheckConsistencyRequest, dict]): The request object. Request message for @@ -2485,6 +2918,38 @@ def snapshot_table( recommended for production use. It is not subject to any SLA or deprecation policy. + .. code-block:: python + + # 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. + # - It may require specifying regional endpoints when creating the service + # client as shown in: + # https://googleapis.dev/python/google-api-core/latest/client_options.html + from google.cloud import bigtable_admin_v2 + + def sample_snapshot_table(): + # Create a client + client = bigtable_admin_v2.BigtableTableAdminClient() + + # Initialize request argument(s) + request = bigtable_admin_v2.SnapshotTableRequest( + name="name_value", + cluster="cluster_value", + snapshot_id="snapshot_id_value", + ) + + # Make the request + operation = client.snapshot_table(request=request) + + print("Waiting for operation to complete...") + + response = operation.result() + + # Handle the response + print(response) + Args: request (Union[google.cloud.bigtable_admin_v2.types.SnapshotTableRequest, dict]): The request object. Request message for @@ -2629,6 +3094,32 @@ def get_snapshot( recommended for production use. It is not subject to any SLA or deprecation policy. + .. code-block:: python + + # 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. + # - It may require specifying regional endpoints when creating the service + # client as shown in: + # https://googleapis.dev/python/google-api-core/latest/client_options.html + from google.cloud import bigtable_admin_v2 + + def sample_get_snapshot(): + # Create a client + client = bigtable_admin_v2.BigtableTableAdminClient() + + # Initialize request argument(s) + request = bigtable_admin_v2.GetSnapshotRequest( + name="name_value", + ) + + # Make the request + response = client.get_snapshot(request=request) + + # Handle the response + print(response) + Args: request (Union[google.cloud.bigtable_admin_v2.types.GetSnapshotRequest, dict]): The request object. Request message for @@ -2739,6 +3230,33 @@ def list_snapshots( recommended for production use. It is not subject to any SLA or deprecation policy. + .. code-block:: python + + # 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. + # - It may require specifying regional endpoints when creating the service + # client as shown in: + # https://googleapis.dev/python/google-api-core/latest/client_options.html + from google.cloud import bigtable_admin_v2 + + def sample_list_snapshots(): + # Create a client + client = bigtable_admin_v2.BigtableTableAdminClient() + + # Initialize request argument(s) + request = bigtable_admin_v2.ListSnapshotsRequest( + parent="parent_value", + ) + + # Make the request + page_result = client.list_snapshots(request=request) + + # Handle the response + for response in page_result: + print(response) + Args: request (Union[google.cloud.bigtable_admin_v2.types.ListSnapshotsRequest, dict]): The request object. Request message for @@ -2862,6 +3380,29 @@ def delete_snapshot( recommended for production use. It is not subject to any SLA or deprecation policy. + .. code-block:: python + + # 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. + # - It may require specifying regional endpoints when creating the service + # client as shown in: + # https://googleapis.dev/python/google-api-core/latest/client_options.html + from google.cloud import bigtable_admin_v2 + + def sample_delete_snapshot(): + # Create a client + client = bigtable_admin_v2.BigtableTableAdminClient() + + # Initialize request argument(s) + request = bigtable_admin_v2.DeleteSnapshotRequest( + name="name_value", + ) + + # Make the request + client.delete_snapshot(request=request) + Args: request (Union[google.cloud.bigtable_admin_v2.types.DeleteSnapshotRequest, dict]): The request object. Request message for @@ -2953,6 +3494,41 @@ def create_backup( Cancelling the returned operation will stop the creation and delete the backup. + .. code-block:: python + + # 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. + # - It may require specifying regional endpoints when creating the service + # client as shown in: + # https://googleapis.dev/python/google-api-core/latest/client_options.html + from google.cloud import bigtable_admin_v2 + + def sample_create_backup(): + # Create a client + client = bigtable_admin_v2.BigtableTableAdminClient() + + # Initialize request argument(s) + backup = bigtable_admin_v2.Backup() + backup.source_table = "source_table_value" + + request = bigtable_admin_v2.CreateBackupRequest( + parent="parent_value", + backup_id="backup_id_value", + backup=backup, + ) + + # Make the request + operation = client.create_backup(request=request) + + print("Waiting for operation to complete...") + + response = operation.result() + + # Handle the response + print(response) + Args: request (Union[google.cloud.bigtable_admin_v2.types.CreateBackupRequest, dict]): The request object. The request for @@ -3070,6 +3646,32 @@ def get_backup( r"""Gets metadata on a pending or completed Cloud Bigtable Backup. + .. code-block:: python + + # 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. + # - It may require specifying regional endpoints when creating the service + # client as shown in: + # https://googleapis.dev/python/google-api-core/latest/client_options.html + from google.cloud import bigtable_admin_v2 + + def sample_get_backup(): + # Create a client + client = bigtable_admin_v2.BigtableTableAdminClient() + + # Initialize request argument(s) + request = bigtable_admin_v2.GetBackupRequest( + name="name_value", + ) + + # Make the request + response = client.get_backup(request=request) + + # Handle the response + print(response) + Args: request (Union[google.cloud.bigtable_admin_v2.types.GetBackupRequest, dict]): The request object. The request for @@ -3151,6 +3753,35 @@ def update_backup( ) -> table.Backup: r"""Updates a pending or completed Cloud Bigtable Backup. + .. code-block:: python + + # 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. + # - It may require specifying regional endpoints when creating the service + # client as shown in: + # https://googleapis.dev/python/google-api-core/latest/client_options.html + from google.cloud import bigtable_admin_v2 + + def sample_update_backup(): + # Create a client + client = bigtable_admin_v2.BigtableTableAdminClient() + + # Initialize request argument(s) + backup = bigtable_admin_v2.Backup() + backup.source_table = "source_table_value" + + request = bigtable_admin_v2.UpdateBackupRequest( + backup=backup, + ) + + # Make the request + response = client.update_backup(request=request) + + # Handle the response + print(response) + Args: request (Union[google.cloud.bigtable_admin_v2.types.UpdateBackupRequest, dict]): The request object. The request for @@ -3251,6 +3882,29 @@ def delete_backup( ) -> None: r"""Deletes a pending or completed Cloud Bigtable backup. + .. code-block:: python + + # 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. + # - It may require specifying regional endpoints when creating the service + # client as shown in: + # https://googleapis.dev/python/google-api-core/latest/client_options.html + from google.cloud import bigtable_admin_v2 + + def sample_delete_backup(): + # Create a client + client = bigtable_admin_v2.BigtableTableAdminClient() + + # Initialize request argument(s) + request = bigtable_admin_v2.DeleteBackupRequest( + name="name_value", + ) + + # Make the request + client.delete_backup(request=request) + Args: request (Union[google.cloud.bigtable_admin_v2.types.DeleteBackupRequest, dict]): The request object. The request for @@ -3326,6 +3980,33 @@ def list_backups( r"""Lists Cloud Bigtable backups. Returns both completed and pending backups. + .. code-block:: python + + # 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. + # - It may require specifying regional endpoints when creating the service + # client as shown in: + # https://googleapis.dev/python/google-api-core/latest/client_options.html + from google.cloud import bigtable_admin_v2 + + def sample_list_backups(): + # Create a client + client = bigtable_admin_v2.BigtableTableAdminClient() + + # Initialize request argument(s) + request = bigtable_admin_v2.ListBackupsRequest( + parent="parent_value", + ) + + # Make the request + page_result = client.list_backups(request=request) + + # Handle the response + for response in page_result: + print(response) + Args: request (Union[google.cloud.bigtable_admin_v2.types.ListBackupsRequest, dict]): The request object. The request for @@ -3432,6 +4113,38 @@ def _restore_table( The [response][google.longrunning.Operation.response] type is [Table][google.bigtable.admin.v2.Table], if successful. + .. code-block:: python + + # 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. + # - It may require specifying regional endpoints when creating the service + # client as shown in: + # https://googleapis.dev/python/google-api-core/latest/client_options.html + from google.cloud import bigtable_admin_v2 + + def sample_restore_table(): + # Create a client + client = bigtable_admin_v2.BigtableTableAdminClient() + + # Initialize request argument(s) + request = bigtable_admin_v2.RestoreTableRequest( + backup="backup_value", + parent="parent_value", + table_id="table_id_value", + ) + + # Make the request + operation = client._restore_table(request=request) + + print("Waiting for operation to complete...") + + response = operation.result() + + # Handle the response + print(response) + Args: request (Union[google.cloud.bigtable_admin_v2.types.RestoreTableRequest, dict]): The request object. The request for @@ -3507,6 +4220,38 @@ def copy_backup( destination cluster located in the destination instance and project. + .. code-block:: python + + # 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. + # - It may require specifying regional endpoints when creating the service + # client as shown in: + # https://googleapis.dev/python/google-api-core/latest/client_options.html + from google.cloud import bigtable_admin_v2 + + def sample_copy_backup(): + # Create a client + client = bigtable_admin_v2.BigtableTableAdminClient() + + # Initialize request argument(s) + request = bigtable_admin_v2.CopyBackupRequest( + parent="parent_value", + backup_id="backup_id_value", + source_backup="source_backup_value", + ) + + # Make the request + operation = client.copy_backup(request=request) + + print("Waiting for operation to complete...") + + response = operation.result() + + # Handle the response + print(response) + Args: request (Union[google.cloud.bigtable_admin_v2.types.CopyBackupRequest, dict]): The request object. The request for @@ -3645,6 +4390,33 @@ def get_iam_policy( resource. Returns an empty policy if the resource exists but does not have a policy set. + .. code-block:: python + + # 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. + # - It may require specifying regional endpoints when creating the service + # client as shown in: + # https://googleapis.dev/python/google-api-core/latest/client_options.html + from google.cloud import bigtable_admin_v2 + from google.iam.v1 import iam_policy_pb2 # type: ignore + + def sample_get_iam_policy(): + # Create a client + client = bigtable_admin_v2.BigtableTableAdminClient() + + # Initialize request argument(s) + request = iam_policy_pb2.GetIamPolicyRequest( + resource="resource_value", + ) + + # Make the request + response = client.get_iam_policy(request=request) + + # Handle the response + print(response) + Args: request (Union[google.iam.v1.iam_policy_pb2.GetIamPolicyRequest, dict]): The request object. Request message for ``GetIamPolicy`` method. @@ -3758,6 +4530,33 @@ def set_iam_policy( r"""Sets the access control policy on a Bigtable resource. Replaces any existing policy. + .. code-block:: python + + # 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. + # - It may require specifying regional endpoints when creating the service + # client as shown in: + # https://googleapis.dev/python/google-api-core/latest/client_options.html + from google.cloud import bigtable_admin_v2 + from google.iam.v1 import iam_policy_pb2 # type: ignore + + def sample_set_iam_policy(): + # Create a client + client = bigtable_admin_v2.BigtableTableAdminClient() + + # Initialize request argument(s) + request = iam_policy_pb2.SetIamPolicyRequest( + resource="resource_value", + ) + + # Make the request + response = client.set_iam_policy(request=request) + + # Handle the response + print(response) + Args: request (Union[google.iam.v1.iam_policy_pb2.SetIamPolicyRequest, dict]): The request object. Request message for ``SetIamPolicy`` method. @@ -3872,6 +4671,34 @@ def test_iam_permissions( r"""Returns permissions that the caller has on the specified Bigtable resource. + .. code-block:: python + + # 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. + # - It may require specifying regional endpoints when creating the service + # client as shown in: + # https://googleapis.dev/python/google-api-core/latest/client_options.html + from google.cloud import bigtable_admin_v2 + from google.iam.v1 import iam_policy_pb2 # type: ignore + + def sample_test_iam_permissions(): + # Create a client + client = bigtable_admin_v2.BigtableTableAdminClient() + + # Initialize request argument(s) + request = iam_policy_pb2.TestIamPermissionsRequest( + resource="resource_value", + permissions=['permissions_value1', 'permissions_value2'], + ) + + # Make the request + response = client.test_iam_permissions(request=request) + + # Handle the response + print(response) + Args: request (Union[google.iam.v1.iam_policy_pb2.TestIamPermissionsRequest, dict]): The request object. Request message for ``TestIamPermissions`` method. @@ -3969,6 +4796,41 @@ def create_schema_bundle( ) -> operation.Operation: r"""Creates a new schema bundle in the specified table. + .. code-block:: python + + # 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. + # - It may require specifying regional endpoints when creating the service + # client as shown in: + # https://googleapis.dev/python/google-api-core/latest/client_options.html + from google.cloud import bigtable_admin_v2 + + def sample_create_schema_bundle(): + # Create a client + client = bigtable_admin_v2.BigtableTableAdminClient() + + # Initialize request argument(s) + schema_bundle = bigtable_admin_v2.SchemaBundle() + schema_bundle.proto_schema.proto_descriptors = b'proto_descriptors_blob' + + request = bigtable_admin_v2.CreateSchemaBundleRequest( + parent="parent_value", + schema_bundle_id="schema_bundle_id_value", + schema_bundle=schema_bundle, + ) + + # Make the request + operation = client.create_schema_bundle(request=request) + + print("Waiting for operation to complete...") + + response = operation.result() + + # Handle the response + print(response) + Args: request (Union[google.cloud.bigtable_admin_v2.types.CreateSchemaBundleRequest, dict]): The request object. The request for @@ -4086,6 +4948,39 @@ def update_schema_bundle( ) -> operation.Operation: r"""Updates a schema bundle in the specified table. + .. code-block:: python + + # 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. + # - It may require specifying regional endpoints when creating the service + # client as shown in: + # https://googleapis.dev/python/google-api-core/latest/client_options.html + from google.cloud import bigtable_admin_v2 + + def sample_update_schema_bundle(): + # Create a client + client = bigtable_admin_v2.BigtableTableAdminClient() + + # Initialize request argument(s) + schema_bundle = bigtable_admin_v2.SchemaBundle() + schema_bundle.proto_schema.proto_descriptors = b'proto_descriptors_blob' + + request = bigtable_admin_v2.UpdateSchemaBundleRequest( + schema_bundle=schema_bundle, + ) + + # Make the request + operation = client.update_schema_bundle(request=request) + + print("Waiting for operation to complete...") + + response = operation.result() + + # Handle the response + print(response) + Args: request (Union[google.cloud.bigtable_admin_v2.types.UpdateSchemaBundleRequest, dict]): The request object. The request for @@ -4196,6 +5091,32 @@ def get_schema_bundle( r"""Gets metadata information about the specified schema bundle. + .. code-block:: python + + # 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. + # - It may require specifying regional endpoints when creating the service + # client as shown in: + # https://googleapis.dev/python/google-api-core/latest/client_options.html + from google.cloud import bigtable_admin_v2 + + def sample_get_schema_bundle(): + # Create a client + client = bigtable_admin_v2.BigtableTableAdminClient() + + # Initialize request argument(s) + request = bigtable_admin_v2.GetSchemaBundleRequest( + name="name_value", + ) + + # Make the request + response = client.get_schema_bundle(request=request) + + # Handle the response + print(response) + Args: request (Union[google.cloud.bigtable_admin_v2.types.GetSchemaBundleRequest, dict]): The request object. The request for @@ -4282,6 +5203,33 @@ def list_schema_bundles( r"""Lists all schema bundles associated with the specified table. + .. code-block:: python + + # 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. + # - It may require specifying regional endpoints when creating the service + # client as shown in: + # https://googleapis.dev/python/google-api-core/latest/client_options.html + from google.cloud import bigtable_admin_v2 + + def sample_list_schema_bundles(): + # Create a client + client = bigtable_admin_v2.BigtableTableAdminClient() + + # Initialize request argument(s) + request = bigtable_admin_v2.ListSchemaBundlesRequest( + parent="parent_value", + ) + + # Make the request + page_result = client.list_schema_bundles(request=request) + + # Handle the response + for response in page_result: + print(response) + Args: request (Union[google.cloud.bigtable_admin_v2.types.ListSchemaBundlesRequest, dict]): The request object. The request for @@ -4381,6 +5329,29 @@ def delete_schema_bundle( ) -> None: r"""Deletes a schema bundle in the specified table. + .. code-block:: python + + # 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. + # - It may require specifying regional endpoints when creating the service + # client as shown in: + # https://googleapis.dev/python/google-api-core/latest/client_options.html + from google.cloud import bigtable_admin_v2 + + def sample_delete_schema_bundle(): + # Create a client + client = bigtable_admin_v2.BigtableTableAdminClient() + + # Initialize request argument(s) + request = bigtable_admin_v2.DeleteSchemaBundleRequest( + name="name_value", + ) + + # Make the request + client.delete_schema_bundle(request=request) + Args: request (Union[google.cloud.bigtable_admin_v2.types.DeleteSchemaBundleRequest, dict]): The request object. The request for diff --git a/google/cloud/bigtable_admin_v2/types/instance.py b/google/cloud/bigtable_admin_v2/types/instance.py index 2623b770e..865487f0d 100644 --- a/google/cloud/bigtable_admin_v2/types/instance.py +++ b/google/cloud/bigtable_admin_v2/types/instance.py @@ -89,6 +89,20 @@ class Instance(proto.Message): Output only. Reserved for future use. This field is a member of `oneof`_ ``_satisfies_pzi``. + tags (MutableMapping[str, str]): + Optional. Input only. Immutable. Tag + keys/values directly bound to this resource. For + example: + + - "123/environment": "production", + - "123/costCenter": "marketing" + + Tags and Labels (above) are both used to bind + metadata to resources, with different use-cases. + See + https://cloud.google.com/resource-manager/docs/tags/tags-overview + for an in-depth overview on the difference + between tags and labels. """ class State(proto.Enum): @@ -169,6 +183,11 @@ class Type(proto.Enum): number=11, optional=True, ) + tags: MutableMapping[str, str] = proto.MapField( + proto.STRING, + proto.STRING, + number=12, + ) class AutoscalingTargets(proto.Message): diff --git a/google/cloud/bigtable_v2/services/bigtable/async_client.py b/google/cloud/bigtable_v2/services/bigtable/async_client.py index 5cb3fbaa4..103ff141c 100644 --- a/google/cloud/bigtable_v2/services/bigtable/async_client.py +++ b/google/cloud/bigtable_v2/services/bigtable/async_client.py @@ -391,13 +391,11 @@ def read_rows( header_params["app_profile_id"] = request.app_profile_id routing_param_regex = re.compile( - "^(?Pprojects/[^/]+/instances/[^/]+/tables/[^/]+/authorizedViews/[^/]+)$" + "^(?Pprojects/[^/]+/instances/[^/]+/tables/[^/]+)(?:/.*)?$" ) regex_match = routing_param_regex.match(request.authorized_view_name) - if regex_match and regex_match.group("authorized_view_name"): - header_params["authorized_view_name"] = regex_match.group( - "authorized_view_name" - ) + if regex_match and regex_match.group("table_name"): + header_params["table_name"] = regex_match.group("table_name") if header_params: metadata = tuple(metadata) + ( @@ -515,13 +513,11 @@ def sample_row_keys( header_params["app_profile_id"] = request.app_profile_id routing_param_regex = re.compile( - "^(?Pprojects/[^/]+/instances/[^/]+/tables/[^/]+/authorizedViews/[^/]+)$" + "^(?Pprojects/[^/]+/instances/[^/]+/tables/[^/]+)(?:/.*)?$" ) regex_match = routing_param_regex.match(request.authorized_view_name) - if regex_match and regex_match.group("authorized_view_name"): - header_params["authorized_view_name"] = regex_match.group( - "authorized_view_name" - ) + if regex_match and regex_match.group("table_name"): + header_params["table_name"] = regex_match.group("table_name") if header_params: metadata = tuple(metadata) + ( @@ -660,13 +656,11 @@ async def mutate_row( header_params["app_profile_id"] = request.app_profile_id routing_param_regex = re.compile( - "^(?Pprojects/[^/]+/instances/[^/]+/tables/[^/]+/authorizedViews/[^/]+)$" + "^(?Pprojects/[^/]+/instances/[^/]+/tables/[^/]+)(?:/.*)?$" ) regex_match = routing_param_regex.match(request.authorized_view_name) - if regex_match and regex_match.group("authorized_view_name"): - header_params["authorized_view_name"] = regex_match.group( - "authorized_view_name" - ) + if regex_match and regex_match.group("table_name"): + header_params["table_name"] = regex_match.group("table_name") if header_params: metadata = tuple(metadata) + ( @@ -799,13 +793,11 @@ def mutate_rows( header_params["app_profile_id"] = request.app_profile_id routing_param_regex = re.compile( - "^(?Pprojects/[^/]+/instances/[^/]+/tables/[^/]+/authorizedViews/[^/]+)$" + "^(?Pprojects/[^/]+/instances/[^/]+/tables/[^/]+)(?:/.*)?$" ) regex_match = routing_param_regex.match(request.authorized_view_name) - if regex_match and regex_match.group("authorized_view_name"): - header_params["authorized_view_name"] = regex_match.group( - "authorized_view_name" - ) + if regex_match and regex_match.group("table_name"): + header_params["table_name"] = regex_match.group("table_name") if header_params: metadata = tuple(metadata) + ( @@ -979,13 +971,11 @@ async def check_and_mutate_row( header_params["app_profile_id"] = request.app_profile_id routing_param_regex = re.compile( - "^(?Pprojects/[^/]+/instances/[^/]+/tables/[^/]+/authorizedViews/[^/]+)$" + "^(?Pprojects/[^/]+/instances/[^/]+/tables/[^/]+)(?:/.*)?$" ) regex_match = routing_param_regex.match(request.authorized_view_name) - if regex_match and regex_match.group("authorized_view_name"): - header_params["authorized_view_name"] = regex_match.group( - "authorized_view_name" - ) + if regex_match and regex_match.group("table_name"): + header_params["table_name"] = regex_match.group("table_name") if header_params: metadata = tuple(metadata) + ( @@ -1242,13 +1232,11 @@ async def read_modify_write_row( header_params["app_profile_id"] = request.app_profile_id routing_param_regex = re.compile( - "^(?Pprojects/[^/]+/instances/[^/]+/tables/[^/]+/authorizedViews/[^/]+)$" + "^(?Pprojects/[^/]+/instances/[^/]+/tables/[^/]+)(?:/.*)?$" ) regex_match = routing_param_regex.match(request.authorized_view_name) - if regex_match and regex_match.group("authorized_view_name"): - header_params["authorized_view_name"] = regex_match.group( - "authorized_view_name" - ) + if regex_match and regex_match.group("table_name"): + header_params["table_name"] = regex_match.group("table_name") if header_params: metadata = tuple(metadata) + ( diff --git a/google/cloud/bigtable_v2/services/bigtable/client.py b/google/cloud/bigtable_v2/services/bigtable/client.py index c35ea1514..ffc448c25 100644 --- a/google/cloud/bigtable_v2/services/bigtable/client.py +++ b/google/cloud/bigtable_v2/services/bigtable/client.py @@ -867,13 +867,11 @@ def read_rows( header_params["app_profile_id"] = request.app_profile_id routing_param_regex = re.compile( - "^(?Pprojects/[^/]+/instances/[^/]+/tables/[^/]+/authorizedViews/[^/]+)$" + "^(?Pprojects/[^/]+/instances/[^/]+/tables/[^/]+)(?:/.*)?$" ) regex_match = routing_param_regex.match(request.authorized_view_name) - if regex_match and regex_match.group("authorized_view_name"): - header_params["authorized_view_name"] = regex_match.group( - "authorized_view_name" - ) + if regex_match and regex_match.group("table_name"): + header_params["table_name"] = regex_match.group("table_name") if header_params: metadata = tuple(metadata) + ( @@ -988,13 +986,11 @@ def sample_row_keys( header_params["app_profile_id"] = request.app_profile_id routing_param_regex = re.compile( - "^(?Pprojects/[^/]+/instances/[^/]+/tables/[^/]+/authorizedViews/[^/]+)$" + "^(?Pprojects/[^/]+/instances/[^/]+/tables/[^/]+)(?:/.*)?$" ) regex_match = routing_param_regex.match(request.authorized_view_name) - if regex_match and regex_match.group("authorized_view_name"): - header_params["authorized_view_name"] = regex_match.group( - "authorized_view_name" - ) + if regex_match and regex_match.group("table_name"): + header_params["table_name"] = regex_match.group("table_name") if header_params: metadata = tuple(metadata) + ( @@ -1130,13 +1126,11 @@ def mutate_row( header_params["app_profile_id"] = request.app_profile_id routing_param_regex = re.compile( - "^(?Pprojects/[^/]+/instances/[^/]+/tables/[^/]+/authorizedViews/[^/]+)$" + "^(?Pprojects/[^/]+/instances/[^/]+/tables/[^/]+)(?:/.*)?$" ) regex_match = routing_param_regex.match(request.authorized_view_name) - if regex_match and regex_match.group("authorized_view_name"): - header_params["authorized_view_name"] = regex_match.group( - "authorized_view_name" - ) + if regex_match and regex_match.group("table_name"): + header_params["table_name"] = regex_match.group("table_name") if header_params: metadata = tuple(metadata) + ( @@ -1266,13 +1260,11 @@ def mutate_rows( header_params["app_profile_id"] = request.app_profile_id routing_param_regex = re.compile( - "^(?Pprojects/[^/]+/instances/[^/]+/tables/[^/]+/authorizedViews/[^/]+)$" + "^(?Pprojects/[^/]+/instances/[^/]+/tables/[^/]+)(?:/.*)?$" ) regex_match = routing_param_regex.match(request.authorized_view_name) - if regex_match and regex_match.group("authorized_view_name"): - header_params["authorized_view_name"] = regex_match.group( - "authorized_view_name" - ) + if regex_match and regex_match.group("table_name"): + header_params["table_name"] = regex_match.group("table_name") if header_params: metadata = tuple(metadata) + ( @@ -1443,13 +1435,11 @@ def check_and_mutate_row( header_params["app_profile_id"] = request.app_profile_id routing_param_regex = re.compile( - "^(?Pprojects/[^/]+/instances/[^/]+/tables/[^/]+/authorizedViews/[^/]+)$" + "^(?Pprojects/[^/]+/instances/[^/]+/tables/[^/]+)(?:/.*)?$" ) regex_match = routing_param_regex.match(request.authorized_view_name) - if regex_match and regex_match.group("authorized_view_name"): - header_params["authorized_view_name"] = regex_match.group( - "authorized_view_name" - ) + if regex_match and regex_match.group("table_name"): + header_params["table_name"] = regex_match.group("table_name") if header_params: metadata = tuple(metadata) + ( @@ -1700,13 +1690,11 @@ def read_modify_write_row( header_params["app_profile_id"] = request.app_profile_id routing_param_regex = re.compile( - "^(?Pprojects/[^/]+/instances/[^/]+/tables/[^/]+/authorizedViews/[^/]+)$" + "^(?Pprojects/[^/]+/instances/[^/]+/tables/[^/]+)(?:/.*)?$" ) regex_match = routing_param_regex.match(request.authorized_view_name) - if regex_match and regex_match.group("authorized_view_name"): - header_params["authorized_view_name"] = regex_match.group( - "authorized_view_name" - ) + if regex_match and regex_match.group("table_name"): + header_params["table_name"] = regex_match.group("table_name") if header_params: metadata = tuple(metadata) + ( diff --git a/google/cloud/bigtable_v2/types/types.py b/google/cloud/bigtable_v2/types/types.py index 7f92a15ae..5eae9e526 100644 --- a/google/cloud/bigtable_v2/types/types.py +++ b/google/cloud/bigtable_v2/types/types.py @@ -119,6 +119,14 @@ class Type(proto.Message): map_type (google.cloud.bigtable_v2.types.Type.Map): Map + This field is a member of `oneof`_ ``kind``. + proto_type (google.cloud.bigtable_v2.types.Type.Proto): + Proto + + This field is a member of `oneof`_ ``kind``. + enum_type (google.cloud.bigtable_v2.types.Type.Enum): + Enum + This field is a member of `oneof`_ ``kind``. """ @@ -351,6 +359,52 @@ class Field(proto.Message): message="Type.Struct.Field", ) + class Proto(proto.Message): + r"""A protobuf message type. Values of type ``Proto`` are stored in + ``Value.bytes_value``. + + Attributes: + schema_bundle_id (str): + The ID of the schema bundle that this proto + is defined in. + message_name (str): + The fully qualified name of the protobuf + message, including package. In the format of + "foo.bar.Message". + """ + + schema_bundle_id: str = proto.Field( + proto.STRING, + number=1, + ) + message_name: str = proto.Field( + proto.STRING, + number=2, + ) + + class Enum(proto.Message): + r"""A protobuf enum type. Values of type ``Enum`` are stored in + ``Value.int_value``. + + Attributes: + schema_bundle_id (str): + The ID of the schema bundle that this enum is + defined in. + enum_name (str): + The fully qualified name of the protobuf enum + message, including package. In the format of + "foo.bar.EnumMessage". + """ + + schema_bundle_id: str = proto.Field( + proto.STRING, + number=1, + ) + enum_name: str = proto.Field( + proto.STRING, + number=2, + ) + class Array(proto.Message): r"""An ordered list of elements of a given type. Values of type ``Array`` are stored in ``Value.array_value``. @@ -574,6 +628,18 @@ class HyperLogLogPlusPlusUniqueCount(proto.Message): oneof="kind", message=Map, ) + proto_type: Proto = proto.Field( + proto.MESSAGE, + number=13, + oneof="kind", + message=Proto, + ) + enum_type: Enum = proto.Field( + proto.MESSAGE, + number=14, + oneof="kind", + message=Enum, + ) __all__ = tuple(sorted(__protobuf__.manifest)) diff --git a/owlbot.py b/owlbot.py index 04d871e95..9562b6142 100644 --- a/owlbot.py +++ b/owlbot.py @@ -127,22 +127,17 @@ def get_staging_dirs( # fix tests s.replace( "tests/unit/gapic/bigtable_v2/test_bigtable.py", - 'expected_headers = {"name": "projects/sample1/instances/sample2"}', - 'expected_headers = {"name": "projects/sample1/instances/sample2", "app_profile_id": ""}' + 'assert \(\n\s*gapic_v1\.routing_header\.to_grpc_metadata\(expected_headers\) in kw\["metadata"\]\n.*', + """ + # assert the expected headers are present, in any order + routing_string = next(iter([m[1] for m in kw["metadata"] if m[0] == 'x-goog-request-params'])) + assert all([f"{k}={v}" in routing_string for k,v in expected_headers.items()]) + """ ) s.replace( "tests/unit/gapic/bigtable_v2/test_bigtable.py", - """ - expected_headers = { - "authorized_view_name": "projects/sample1/instances/sample2/tables/sample3/authorizedViews/sample4" - } - """, - """ - expected_headers = { - "app_profile_id": "", - "authorized_view_name": "projects/sample1/instances/sample2/tables/sample3/authorizedViews/sample4" - } - """ + 'expected_headers = {"name": "projects/sample1/instances/sample2"}', + 'expected_headers = {"name": "projects/sample1/instances/sample2", "app_profile_id": ""}' ) s.replace( "tests/unit/gapic/bigtable_v2/test_bigtable.py", diff --git a/samples/generated_samples/bigtableadmin_v2_generated_bigtable_instance_admin_create_app_profile_async.py b/samples/generated_samples/bigtableadmin_v2_generated_bigtable_instance_admin_create_app_profile_async.py new file mode 100644 index 000000000..82dafab44 --- /dev/null +++ b/samples/generated_samples/bigtableadmin_v2_generated_bigtable_instance_admin_create_app_profile_async.py @@ -0,0 +1,57 @@ +# -*- coding: utf-8 -*- +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for CreateAppProfile +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-bigtable-admin + + +# [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. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import bigtable_admin_v2 + + +async def sample_create_app_profile(): + # Create a client + client = bigtable_admin_v2.BigtableInstanceAdminAsyncClient() + + # Initialize request argument(s) + app_profile = bigtable_admin_v2.AppProfile() + app_profile.priority = "PRIORITY_HIGH" + + request = bigtable_admin_v2.CreateAppProfileRequest( + parent="parent_value", + app_profile_id="app_profile_id_value", + app_profile=app_profile, + ) + + # Make the request + response = await client.create_app_profile(request=request) + + # Handle the response + print(response) + +# [END bigtableadmin_v2_generated_BigtableInstanceAdmin_CreateAppProfile_async] diff --git a/samples/generated_samples/bigtableadmin_v2_generated_bigtable_instance_admin_create_app_profile_sync.py b/samples/generated_samples/bigtableadmin_v2_generated_bigtable_instance_admin_create_app_profile_sync.py new file mode 100644 index 000000000..82ff382b7 --- /dev/null +++ b/samples/generated_samples/bigtableadmin_v2_generated_bigtable_instance_admin_create_app_profile_sync.py @@ -0,0 +1,57 @@ +# -*- coding: utf-8 -*- +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for CreateAppProfile +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-bigtable-admin + + +# [START bigtableadmin_v2_generated_BigtableInstanceAdmin_CreateAppProfile_sync] +# 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. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import bigtable_admin_v2 + + +def sample_create_app_profile(): + # Create a client + client = bigtable_admin_v2.BigtableInstanceAdminClient() + + # Initialize request argument(s) + app_profile = bigtable_admin_v2.AppProfile() + app_profile.priority = "PRIORITY_HIGH" + + request = bigtable_admin_v2.CreateAppProfileRequest( + parent="parent_value", + app_profile_id="app_profile_id_value", + app_profile=app_profile, + ) + + # Make the request + response = client.create_app_profile(request=request) + + # Handle the response + print(response) + +# [END bigtableadmin_v2_generated_BigtableInstanceAdmin_CreateAppProfile_sync] diff --git a/samples/generated_samples/bigtableadmin_v2_generated_bigtable_instance_admin_create_cluster_async.py b/samples/generated_samples/bigtableadmin_v2_generated_bigtable_instance_admin_create_cluster_async.py new file mode 100644 index 000000000..fb9fac60f --- /dev/null +++ b/samples/generated_samples/bigtableadmin_v2_generated_bigtable_instance_admin_create_cluster_async.py @@ -0,0 +1,57 @@ +# -*- coding: utf-8 -*- +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for CreateCluster +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-bigtable-admin + + +# [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. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import bigtable_admin_v2 + + +async def sample_create_cluster(): + # Create a client + client = bigtable_admin_v2.BigtableInstanceAdminAsyncClient() + + # Initialize request argument(s) + request = bigtable_admin_v2.CreateClusterRequest( + parent="parent_value", + cluster_id="cluster_id_value", + ) + + # Make the request + operation = client.create_cluster(request=request) + + print("Waiting for operation to complete...") + + response = (await operation).result() + + # Handle the response + print(response) + +# [END bigtableadmin_v2_generated_BigtableInstanceAdmin_CreateCluster_async] diff --git a/samples/generated_samples/bigtableadmin_v2_generated_bigtable_instance_admin_create_cluster_sync.py b/samples/generated_samples/bigtableadmin_v2_generated_bigtable_instance_admin_create_cluster_sync.py new file mode 100644 index 000000000..d8d5f9958 --- /dev/null +++ b/samples/generated_samples/bigtableadmin_v2_generated_bigtable_instance_admin_create_cluster_sync.py @@ -0,0 +1,57 @@ +# -*- coding: utf-8 -*- +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for CreateCluster +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-bigtable-admin + + +# [START bigtableadmin_v2_generated_BigtableInstanceAdmin_CreateCluster_sync] +# 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. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import bigtable_admin_v2 + + +def sample_create_cluster(): + # Create a client + client = bigtable_admin_v2.BigtableInstanceAdminClient() + + # Initialize request argument(s) + request = bigtable_admin_v2.CreateClusterRequest( + parent="parent_value", + cluster_id="cluster_id_value", + ) + + # Make the request + operation = client.create_cluster(request=request) + + print("Waiting for operation to complete...") + + response = operation.result() + + # Handle the response + print(response) + +# [END bigtableadmin_v2_generated_BigtableInstanceAdmin_CreateCluster_sync] diff --git a/samples/generated_samples/bigtableadmin_v2_generated_bigtable_instance_admin_create_instance_async.py b/samples/generated_samples/bigtableadmin_v2_generated_bigtable_instance_admin_create_instance_async.py new file mode 100644 index 000000000..dbde6c4bc --- /dev/null +++ b/samples/generated_samples/bigtableadmin_v2_generated_bigtable_instance_admin_create_instance_async.py @@ -0,0 +1,61 @@ +# -*- coding: utf-8 -*- +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for CreateInstance +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-bigtable-admin + + +# [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. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import bigtable_admin_v2 + + +async def sample_create_instance(): + # Create a client + client = bigtable_admin_v2.BigtableInstanceAdminAsyncClient() + + # Initialize request argument(s) + instance = bigtable_admin_v2.Instance() + instance.display_name = "display_name_value" + + request = bigtable_admin_v2.CreateInstanceRequest( + parent="parent_value", + instance_id="instance_id_value", + instance=instance, + ) + + # Make the request + operation = client.create_instance(request=request) + + print("Waiting for operation to complete...") + + response = (await operation).result() + + # Handle the response + print(response) + +# [END bigtableadmin_v2_generated_BigtableInstanceAdmin_CreateInstance_async] diff --git a/samples/generated_samples/bigtableadmin_v2_generated_bigtable_instance_admin_create_instance_sync.py b/samples/generated_samples/bigtableadmin_v2_generated_bigtable_instance_admin_create_instance_sync.py new file mode 100644 index 000000000..83ec90e53 --- /dev/null +++ b/samples/generated_samples/bigtableadmin_v2_generated_bigtable_instance_admin_create_instance_sync.py @@ -0,0 +1,61 @@ +# -*- coding: utf-8 -*- +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for CreateInstance +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-bigtable-admin + + +# [START bigtableadmin_v2_generated_BigtableInstanceAdmin_CreateInstance_sync] +# 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. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import bigtable_admin_v2 + + +def sample_create_instance(): + # Create a client + client = bigtable_admin_v2.BigtableInstanceAdminClient() + + # Initialize request argument(s) + instance = bigtable_admin_v2.Instance() + instance.display_name = "display_name_value" + + request = bigtable_admin_v2.CreateInstanceRequest( + parent="parent_value", + instance_id="instance_id_value", + instance=instance, + ) + + # Make the request + operation = client.create_instance(request=request) + + print("Waiting for operation to complete...") + + response = operation.result() + + # Handle the response + print(response) + +# [END bigtableadmin_v2_generated_BigtableInstanceAdmin_CreateInstance_sync] diff --git a/samples/generated_samples/bigtableadmin_v2_generated_bigtable_instance_admin_create_logical_view_async.py b/samples/generated_samples/bigtableadmin_v2_generated_bigtable_instance_admin_create_logical_view_async.py new file mode 100644 index 000000000..6dfb1d612 --- /dev/null +++ b/samples/generated_samples/bigtableadmin_v2_generated_bigtable_instance_admin_create_logical_view_async.py @@ -0,0 +1,61 @@ +# -*- coding: utf-8 -*- +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for CreateLogicalView +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-bigtable-admin + + +# [START bigtableadmin_v2_generated_BigtableInstanceAdmin_CreateLogicalView_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import bigtable_admin_v2 + + +async def sample_create_logical_view(): + # Create a client + client = bigtable_admin_v2.BigtableInstanceAdminAsyncClient() + + # Initialize request argument(s) + logical_view = bigtable_admin_v2.LogicalView() + logical_view.query = "query_value" + + request = bigtable_admin_v2.CreateLogicalViewRequest( + parent="parent_value", + logical_view_id="logical_view_id_value", + logical_view=logical_view, + ) + + # Make the request + operation = client.create_logical_view(request=request) + + print("Waiting for operation to complete...") + + response = (await operation).result() + + # Handle the response + print(response) + +# [END bigtableadmin_v2_generated_BigtableInstanceAdmin_CreateLogicalView_async] diff --git a/samples/generated_samples/bigtableadmin_v2_generated_bigtable_instance_admin_create_logical_view_sync.py b/samples/generated_samples/bigtableadmin_v2_generated_bigtable_instance_admin_create_logical_view_sync.py new file mode 100644 index 000000000..f0214acbf --- /dev/null +++ b/samples/generated_samples/bigtableadmin_v2_generated_bigtable_instance_admin_create_logical_view_sync.py @@ -0,0 +1,61 @@ +# -*- coding: utf-8 -*- +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for CreateLogicalView +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-bigtable-admin + + +# [START bigtableadmin_v2_generated_BigtableInstanceAdmin_CreateLogicalView_sync] +# 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. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import bigtable_admin_v2 + + +def sample_create_logical_view(): + # Create a client + client = bigtable_admin_v2.BigtableInstanceAdminClient() + + # Initialize request argument(s) + logical_view = bigtable_admin_v2.LogicalView() + logical_view.query = "query_value" + + request = bigtable_admin_v2.CreateLogicalViewRequest( + parent="parent_value", + logical_view_id="logical_view_id_value", + logical_view=logical_view, + ) + + # Make the request + operation = client.create_logical_view(request=request) + + print("Waiting for operation to complete...") + + response = operation.result() + + # Handle the response + print(response) + +# [END bigtableadmin_v2_generated_BigtableInstanceAdmin_CreateLogicalView_sync] diff --git a/samples/generated_samples/bigtableadmin_v2_generated_bigtable_instance_admin_create_materialized_view_async.py b/samples/generated_samples/bigtableadmin_v2_generated_bigtable_instance_admin_create_materialized_view_async.py new file mode 100644 index 000000000..30481d2f3 --- /dev/null +++ b/samples/generated_samples/bigtableadmin_v2_generated_bigtable_instance_admin_create_materialized_view_async.py @@ -0,0 +1,61 @@ +# -*- coding: utf-8 -*- +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for CreateMaterializedView +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-bigtable-admin + + +# [START bigtableadmin_v2_generated_BigtableInstanceAdmin_CreateMaterializedView_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import bigtable_admin_v2 + + +async def sample_create_materialized_view(): + # Create a client + client = bigtable_admin_v2.BigtableInstanceAdminAsyncClient() + + # Initialize request argument(s) + materialized_view = bigtable_admin_v2.MaterializedView() + materialized_view.query = "query_value" + + request = bigtable_admin_v2.CreateMaterializedViewRequest( + parent="parent_value", + materialized_view_id="materialized_view_id_value", + materialized_view=materialized_view, + ) + + # Make the request + operation = client.create_materialized_view(request=request) + + print("Waiting for operation to complete...") + + response = (await operation).result() + + # Handle the response + print(response) + +# [END bigtableadmin_v2_generated_BigtableInstanceAdmin_CreateMaterializedView_async] diff --git a/samples/generated_samples/bigtableadmin_v2_generated_bigtable_instance_admin_create_materialized_view_sync.py b/samples/generated_samples/bigtableadmin_v2_generated_bigtable_instance_admin_create_materialized_view_sync.py new file mode 100644 index 000000000..45116fb49 --- /dev/null +++ b/samples/generated_samples/bigtableadmin_v2_generated_bigtable_instance_admin_create_materialized_view_sync.py @@ -0,0 +1,61 @@ +# -*- coding: utf-8 -*- +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for CreateMaterializedView +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-bigtable-admin + + +# [START bigtableadmin_v2_generated_BigtableInstanceAdmin_CreateMaterializedView_sync] +# 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. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import bigtable_admin_v2 + + +def sample_create_materialized_view(): + # Create a client + client = bigtable_admin_v2.BigtableInstanceAdminClient() + + # Initialize request argument(s) + materialized_view = bigtable_admin_v2.MaterializedView() + materialized_view.query = "query_value" + + request = bigtable_admin_v2.CreateMaterializedViewRequest( + parent="parent_value", + materialized_view_id="materialized_view_id_value", + materialized_view=materialized_view, + ) + + # Make the request + operation = client.create_materialized_view(request=request) + + print("Waiting for operation to complete...") + + response = operation.result() + + # Handle the response + print(response) + +# [END bigtableadmin_v2_generated_BigtableInstanceAdmin_CreateMaterializedView_sync] diff --git a/samples/generated_samples/bigtableadmin_v2_generated_bigtable_instance_admin_delete_app_profile_async.py b/samples/generated_samples/bigtableadmin_v2_generated_bigtable_instance_admin_delete_app_profile_async.py new file mode 100644 index 000000000..76d272519 --- /dev/null +++ b/samples/generated_samples/bigtableadmin_v2_generated_bigtable_instance_admin_delete_app_profile_async.py @@ -0,0 +1,51 @@ +# -*- coding: utf-8 -*- +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for DeleteAppProfile +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-bigtable-admin + + +# [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. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import bigtable_admin_v2 + + +async def sample_delete_app_profile(): + # Create a client + client = bigtable_admin_v2.BigtableInstanceAdminAsyncClient() + + # Initialize request argument(s) + request = bigtable_admin_v2.DeleteAppProfileRequest( + name="name_value", + ignore_warnings=True, + ) + + # Make the request + await client.delete_app_profile(request=request) + + +# [END bigtableadmin_v2_generated_BigtableInstanceAdmin_DeleteAppProfile_async] diff --git a/samples/generated_samples/bigtableadmin_v2_generated_bigtable_instance_admin_delete_app_profile_sync.py b/samples/generated_samples/bigtableadmin_v2_generated_bigtable_instance_admin_delete_app_profile_sync.py new file mode 100644 index 000000000..47f552fb8 --- /dev/null +++ b/samples/generated_samples/bigtableadmin_v2_generated_bigtable_instance_admin_delete_app_profile_sync.py @@ -0,0 +1,51 @@ +# -*- coding: utf-8 -*- +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for DeleteAppProfile +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-bigtable-admin + + +# [START bigtableadmin_v2_generated_BigtableInstanceAdmin_DeleteAppProfile_sync] +# 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. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import bigtable_admin_v2 + + +def sample_delete_app_profile(): + # Create a client + client = bigtable_admin_v2.BigtableInstanceAdminClient() + + # Initialize request argument(s) + request = bigtable_admin_v2.DeleteAppProfileRequest( + name="name_value", + ignore_warnings=True, + ) + + # Make the request + client.delete_app_profile(request=request) + + +# [END bigtableadmin_v2_generated_BigtableInstanceAdmin_DeleteAppProfile_sync] diff --git a/samples/generated_samples/bigtableadmin_v2_generated_bigtable_instance_admin_delete_cluster_async.py b/samples/generated_samples/bigtableadmin_v2_generated_bigtable_instance_admin_delete_cluster_async.py new file mode 100644 index 000000000..6f97b6a5e --- /dev/null +++ b/samples/generated_samples/bigtableadmin_v2_generated_bigtable_instance_admin_delete_cluster_async.py @@ -0,0 +1,50 @@ +# -*- coding: utf-8 -*- +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for DeleteCluster +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-bigtable-admin + + +# [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. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import bigtable_admin_v2 + + +async def sample_delete_cluster(): + # Create a client + client = bigtable_admin_v2.BigtableInstanceAdminAsyncClient() + + # Initialize request argument(s) + request = bigtable_admin_v2.DeleteClusterRequest( + name="name_value", + ) + + # Make the request + await client.delete_cluster(request=request) + + +# [END bigtableadmin_v2_generated_BigtableInstanceAdmin_DeleteCluster_async] diff --git a/samples/generated_samples/bigtableadmin_v2_generated_bigtable_instance_admin_delete_cluster_sync.py b/samples/generated_samples/bigtableadmin_v2_generated_bigtable_instance_admin_delete_cluster_sync.py new file mode 100644 index 000000000..d058a08e6 --- /dev/null +++ b/samples/generated_samples/bigtableadmin_v2_generated_bigtable_instance_admin_delete_cluster_sync.py @@ -0,0 +1,50 @@ +# -*- coding: utf-8 -*- +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for DeleteCluster +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-bigtable-admin + + +# [START bigtableadmin_v2_generated_BigtableInstanceAdmin_DeleteCluster_sync] +# 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. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import bigtable_admin_v2 + + +def sample_delete_cluster(): + # Create a client + client = bigtable_admin_v2.BigtableInstanceAdminClient() + + # Initialize request argument(s) + request = bigtable_admin_v2.DeleteClusterRequest( + name="name_value", + ) + + # Make the request + client.delete_cluster(request=request) + + +# [END bigtableadmin_v2_generated_BigtableInstanceAdmin_DeleteCluster_sync] diff --git a/samples/generated_samples/bigtableadmin_v2_generated_bigtable_instance_admin_delete_instance_async.py b/samples/generated_samples/bigtableadmin_v2_generated_bigtable_instance_admin_delete_instance_async.py new file mode 100644 index 000000000..ecf5583be --- /dev/null +++ b/samples/generated_samples/bigtableadmin_v2_generated_bigtable_instance_admin_delete_instance_async.py @@ -0,0 +1,50 @@ +# -*- coding: utf-8 -*- +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for DeleteInstance +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-bigtable-admin + + +# [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. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import bigtable_admin_v2 + + +async def sample_delete_instance(): + # Create a client + client = bigtable_admin_v2.BigtableInstanceAdminAsyncClient() + + # Initialize request argument(s) + request = bigtable_admin_v2.DeleteInstanceRequest( + name="name_value", + ) + + # Make the request + await client.delete_instance(request=request) + + +# [END bigtableadmin_v2_generated_BigtableInstanceAdmin_DeleteInstance_async] diff --git a/samples/generated_samples/bigtableadmin_v2_generated_bigtable_instance_admin_delete_instance_sync.py b/samples/generated_samples/bigtableadmin_v2_generated_bigtable_instance_admin_delete_instance_sync.py new file mode 100644 index 000000000..e8f568486 --- /dev/null +++ b/samples/generated_samples/bigtableadmin_v2_generated_bigtable_instance_admin_delete_instance_sync.py @@ -0,0 +1,50 @@ +# -*- coding: utf-8 -*- +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for DeleteInstance +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-bigtable-admin + + +# [START bigtableadmin_v2_generated_BigtableInstanceAdmin_DeleteInstance_sync] +# 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. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import bigtable_admin_v2 + + +def sample_delete_instance(): + # Create a client + client = bigtable_admin_v2.BigtableInstanceAdminClient() + + # Initialize request argument(s) + request = bigtable_admin_v2.DeleteInstanceRequest( + name="name_value", + ) + + # Make the request + client.delete_instance(request=request) + + +# [END bigtableadmin_v2_generated_BigtableInstanceAdmin_DeleteInstance_sync] diff --git a/samples/generated_samples/bigtableadmin_v2_generated_bigtable_instance_admin_delete_logical_view_async.py b/samples/generated_samples/bigtableadmin_v2_generated_bigtable_instance_admin_delete_logical_view_async.py new file mode 100644 index 000000000..93f9d8ce8 --- /dev/null +++ b/samples/generated_samples/bigtableadmin_v2_generated_bigtable_instance_admin_delete_logical_view_async.py @@ -0,0 +1,50 @@ +# -*- coding: utf-8 -*- +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for DeleteLogicalView +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-bigtable-admin + + +# [START bigtableadmin_v2_generated_BigtableInstanceAdmin_DeleteLogicalView_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import bigtable_admin_v2 + + +async def sample_delete_logical_view(): + # Create a client + client = bigtable_admin_v2.BigtableInstanceAdminAsyncClient() + + # Initialize request argument(s) + request = bigtable_admin_v2.DeleteLogicalViewRequest( + name="name_value", + ) + + # Make the request + await client.delete_logical_view(request=request) + + +# [END bigtableadmin_v2_generated_BigtableInstanceAdmin_DeleteLogicalView_async] diff --git a/samples/generated_samples/bigtableadmin_v2_generated_bigtable_instance_admin_delete_logical_view_sync.py b/samples/generated_samples/bigtableadmin_v2_generated_bigtable_instance_admin_delete_logical_view_sync.py new file mode 100644 index 000000000..fdece2bbc --- /dev/null +++ b/samples/generated_samples/bigtableadmin_v2_generated_bigtable_instance_admin_delete_logical_view_sync.py @@ -0,0 +1,50 @@ +# -*- coding: utf-8 -*- +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for DeleteLogicalView +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-bigtable-admin + + +# [START bigtableadmin_v2_generated_BigtableInstanceAdmin_DeleteLogicalView_sync] +# 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. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import bigtable_admin_v2 + + +def sample_delete_logical_view(): + # Create a client + client = bigtable_admin_v2.BigtableInstanceAdminClient() + + # Initialize request argument(s) + request = bigtable_admin_v2.DeleteLogicalViewRequest( + name="name_value", + ) + + # Make the request + client.delete_logical_view(request=request) + + +# [END bigtableadmin_v2_generated_BigtableInstanceAdmin_DeleteLogicalView_sync] diff --git a/samples/generated_samples/bigtableadmin_v2_generated_bigtable_instance_admin_delete_materialized_view_async.py b/samples/generated_samples/bigtableadmin_v2_generated_bigtable_instance_admin_delete_materialized_view_async.py new file mode 100644 index 000000000..22a9f0ad4 --- /dev/null +++ b/samples/generated_samples/bigtableadmin_v2_generated_bigtable_instance_admin_delete_materialized_view_async.py @@ -0,0 +1,50 @@ +# -*- coding: utf-8 -*- +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for DeleteMaterializedView +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-bigtable-admin + + +# [START bigtableadmin_v2_generated_BigtableInstanceAdmin_DeleteMaterializedView_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import bigtable_admin_v2 + + +async def sample_delete_materialized_view(): + # Create a client + client = bigtable_admin_v2.BigtableInstanceAdminAsyncClient() + + # Initialize request argument(s) + request = bigtable_admin_v2.DeleteMaterializedViewRequest( + name="name_value", + ) + + # Make the request + await client.delete_materialized_view(request=request) + + +# [END bigtableadmin_v2_generated_BigtableInstanceAdmin_DeleteMaterializedView_async] diff --git a/samples/generated_samples/bigtableadmin_v2_generated_bigtable_instance_admin_delete_materialized_view_sync.py b/samples/generated_samples/bigtableadmin_v2_generated_bigtable_instance_admin_delete_materialized_view_sync.py new file mode 100644 index 000000000..b6cf3a453 --- /dev/null +++ b/samples/generated_samples/bigtableadmin_v2_generated_bigtable_instance_admin_delete_materialized_view_sync.py @@ -0,0 +1,50 @@ +# -*- coding: utf-8 -*- +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for DeleteMaterializedView +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-bigtable-admin + + +# [START bigtableadmin_v2_generated_BigtableInstanceAdmin_DeleteMaterializedView_sync] +# 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. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import bigtable_admin_v2 + + +def sample_delete_materialized_view(): + # Create a client + client = bigtable_admin_v2.BigtableInstanceAdminClient() + + # Initialize request argument(s) + request = bigtable_admin_v2.DeleteMaterializedViewRequest( + name="name_value", + ) + + # Make the request + client.delete_materialized_view(request=request) + + +# [END bigtableadmin_v2_generated_BigtableInstanceAdmin_DeleteMaterializedView_sync] diff --git a/samples/generated_samples/bigtableadmin_v2_generated_bigtable_instance_admin_get_app_profile_async.py b/samples/generated_samples/bigtableadmin_v2_generated_bigtable_instance_admin_get_app_profile_async.py new file mode 100644 index 000000000..3a59ca599 --- /dev/null +++ b/samples/generated_samples/bigtableadmin_v2_generated_bigtable_instance_admin_get_app_profile_async.py @@ -0,0 +1,52 @@ +# -*- coding: utf-8 -*- +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for GetAppProfile +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-bigtable-admin + + +# [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. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import bigtable_admin_v2 + + +async def sample_get_app_profile(): + # Create a client + client = bigtable_admin_v2.BigtableInstanceAdminAsyncClient() + + # Initialize request argument(s) + request = bigtable_admin_v2.GetAppProfileRequest( + name="name_value", + ) + + # Make the request + response = await client.get_app_profile(request=request) + + # Handle the response + print(response) + +# [END bigtableadmin_v2_generated_BigtableInstanceAdmin_GetAppProfile_async] diff --git a/samples/generated_samples/bigtableadmin_v2_generated_bigtable_instance_admin_get_app_profile_sync.py b/samples/generated_samples/bigtableadmin_v2_generated_bigtable_instance_admin_get_app_profile_sync.py new file mode 100644 index 000000000..2e54bfcad --- /dev/null +++ b/samples/generated_samples/bigtableadmin_v2_generated_bigtable_instance_admin_get_app_profile_sync.py @@ -0,0 +1,52 @@ +# -*- coding: utf-8 -*- +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for GetAppProfile +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-bigtable-admin + + +# [START bigtableadmin_v2_generated_BigtableInstanceAdmin_GetAppProfile_sync] +# 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. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import bigtable_admin_v2 + + +def sample_get_app_profile(): + # Create a client + client = bigtable_admin_v2.BigtableInstanceAdminClient() + + # Initialize request argument(s) + request = bigtable_admin_v2.GetAppProfileRequest( + name="name_value", + ) + + # Make the request + response = client.get_app_profile(request=request) + + # Handle the response + print(response) + +# [END bigtableadmin_v2_generated_BigtableInstanceAdmin_GetAppProfile_sync] diff --git a/samples/generated_samples/bigtableadmin_v2_generated_bigtable_instance_admin_get_cluster_async.py b/samples/generated_samples/bigtableadmin_v2_generated_bigtable_instance_admin_get_cluster_async.py new file mode 100644 index 000000000..b4d89a11d --- /dev/null +++ b/samples/generated_samples/bigtableadmin_v2_generated_bigtable_instance_admin_get_cluster_async.py @@ -0,0 +1,52 @@ +# -*- coding: utf-8 -*- +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for GetCluster +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-bigtable-admin + + +# [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. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import bigtable_admin_v2 + + +async def sample_get_cluster(): + # Create a client + client = bigtable_admin_v2.BigtableInstanceAdminAsyncClient() + + # Initialize request argument(s) + request = bigtable_admin_v2.GetClusterRequest( + name="name_value", + ) + + # Make the request + response = await client.get_cluster(request=request) + + # Handle the response + print(response) + +# [END bigtableadmin_v2_generated_BigtableInstanceAdmin_GetCluster_async] diff --git a/samples/generated_samples/bigtableadmin_v2_generated_bigtable_instance_admin_get_cluster_sync.py b/samples/generated_samples/bigtableadmin_v2_generated_bigtable_instance_admin_get_cluster_sync.py new file mode 100644 index 000000000..25a80a871 --- /dev/null +++ b/samples/generated_samples/bigtableadmin_v2_generated_bigtable_instance_admin_get_cluster_sync.py @@ -0,0 +1,52 @@ +# -*- coding: utf-8 -*- +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for GetCluster +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-bigtable-admin + + +# [START bigtableadmin_v2_generated_BigtableInstanceAdmin_GetCluster_sync] +# 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. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import bigtable_admin_v2 + + +def sample_get_cluster(): + # Create a client + client = bigtable_admin_v2.BigtableInstanceAdminClient() + + # Initialize request argument(s) + request = bigtable_admin_v2.GetClusterRequest( + name="name_value", + ) + + # Make the request + response = client.get_cluster(request=request) + + # Handle the response + print(response) + +# [END bigtableadmin_v2_generated_BigtableInstanceAdmin_GetCluster_sync] diff --git a/samples/generated_samples/bigtableadmin_v2_generated_bigtable_instance_admin_get_iam_policy_async.py b/samples/generated_samples/bigtableadmin_v2_generated_bigtable_instance_admin_get_iam_policy_async.py new file mode 100644 index 000000000..b2e479c11 --- /dev/null +++ b/samples/generated_samples/bigtableadmin_v2_generated_bigtable_instance_admin_get_iam_policy_async.py @@ -0,0 +1,53 @@ +# -*- coding: utf-8 -*- +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for GetIamPolicy +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-bigtable-admin + + +# [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. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import bigtable_admin_v2 +from google.iam.v1 import iam_policy_pb2 # type: ignore + + +async def sample_get_iam_policy(): + # Create a client + client = bigtable_admin_v2.BigtableInstanceAdminAsyncClient() + + # Initialize request argument(s) + request = iam_policy_pb2.GetIamPolicyRequest( + resource="resource_value", + ) + + # Make the request + response = await client.get_iam_policy(request=request) + + # Handle the response + print(response) + +# [END bigtableadmin_v2_generated_BigtableInstanceAdmin_GetIamPolicy_async] diff --git a/samples/generated_samples/bigtableadmin_v2_generated_bigtable_instance_admin_get_iam_policy_sync.py b/samples/generated_samples/bigtableadmin_v2_generated_bigtable_instance_admin_get_iam_policy_sync.py new file mode 100644 index 000000000..ffb2a81b0 --- /dev/null +++ b/samples/generated_samples/bigtableadmin_v2_generated_bigtable_instance_admin_get_iam_policy_sync.py @@ -0,0 +1,53 @@ +# -*- coding: utf-8 -*- +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for GetIamPolicy +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-bigtable-admin + + +# [START bigtableadmin_v2_generated_BigtableInstanceAdmin_GetIamPolicy_sync] +# 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. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import bigtable_admin_v2 +from google.iam.v1 import iam_policy_pb2 # type: ignore + + +def sample_get_iam_policy(): + # Create a client + client = bigtable_admin_v2.BigtableInstanceAdminClient() + + # Initialize request argument(s) + request = iam_policy_pb2.GetIamPolicyRequest( + resource="resource_value", + ) + + # Make the request + response = client.get_iam_policy(request=request) + + # Handle the response + print(response) + +# [END bigtableadmin_v2_generated_BigtableInstanceAdmin_GetIamPolicy_sync] diff --git a/samples/generated_samples/bigtableadmin_v2_generated_bigtable_instance_admin_get_instance_async.py b/samples/generated_samples/bigtableadmin_v2_generated_bigtable_instance_admin_get_instance_async.py new file mode 100644 index 000000000..b76fac83a --- /dev/null +++ b/samples/generated_samples/bigtableadmin_v2_generated_bigtable_instance_admin_get_instance_async.py @@ -0,0 +1,52 @@ +# -*- coding: utf-8 -*- +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for GetInstance +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-bigtable-admin + + +# [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. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import bigtable_admin_v2 + + +async def sample_get_instance(): + # Create a client + client = bigtable_admin_v2.BigtableInstanceAdminAsyncClient() + + # Initialize request argument(s) + request = bigtable_admin_v2.GetInstanceRequest( + name="name_value", + ) + + # Make the request + response = await client.get_instance(request=request) + + # Handle the response + print(response) + +# [END bigtableadmin_v2_generated_BigtableInstanceAdmin_GetInstance_async] diff --git a/samples/generated_samples/bigtableadmin_v2_generated_bigtable_instance_admin_get_instance_sync.py b/samples/generated_samples/bigtableadmin_v2_generated_bigtable_instance_admin_get_instance_sync.py new file mode 100644 index 000000000..711ed99a5 --- /dev/null +++ b/samples/generated_samples/bigtableadmin_v2_generated_bigtable_instance_admin_get_instance_sync.py @@ -0,0 +1,52 @@ +# -*- coding: utf-8 -*- +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for GetInstance +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-bigtable-admin + + +# [START bigtableadmin_v2_generated_BigtableInstanceAdmin_GetInstance_sync] +# 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. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import bigtable_admin_v2 + + +def sample_get_instance(): + # Create a client + client = bigtable_admin_v2.BigtableInstanceAdminClient() + + # Initialize request argument(s) + request = bigtable_admin_v2.GetInstanceRequest( + name="name_value", + ) + + # Make the request + response = client.get_instance(request=request) + + # Handle the response + print(response) + +# [END bigtableadmin_v2_generated_BigtableInstanceAdmin_GetInstance_sync] diff --git a/samples/generated_samples/bigtableadmin_v2_generated_bigtable_instance_admin_get_logical_view_async.py b/samples/generated_samples/bigtableadmin_v2_generated_bigtable_instance_admin_get_logical_view_async.py new file mode 100644 index 000000000..4ce25cdda --- /dev/null +++ b/samples/generated_samples/bigtableadmin_v2_generated_bigtable_instance_admin_get_logical_view_async.py @@ -0,0 +1,52 @@ +# -*- coding: utf-8 -*- +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for GetLogicalView +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-bigtable-admin + + +# [START bigtableadmin_v2_generated_BigtableInstanceAdmin_GetLogicalView_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import bigtable_admin_v2 + + +async def sample_get_logical_view(): + # Create a client + client = bigtable_admin_v2.BigtableInstanceAdminAsyncClient() + + # Initialize request argument(s) + request = bigtable_admin_v2.GetLogicalViewRequest( + name="name_value", + ) + + # Make the request + response = await client.get_logical_view(request=request) + + # Handle the response + print(response) + +# [END bigtableadmin_v2_generated_BigtableInstanceAdmin_GetLogicalView_async] diff --git a/samples/generated_samples/bigtableadmin_v2_generated_bigtable_instance_admin_get_logical_view_sync.py b/samples/generated_samples/bigtableadmin_v2_generated_bigtable_instance_admin_get_logical_view_sync.py new file mode 100644 index 000000000..daaf7fa63 --- /dev/null +++ b/samples/generated_samples/bigtableadmin_v2_generated_bigtable_instance_admin_get_logical_view_sync.py @@ -0,0 +1,52 @@ +# -*- coding: utf-8 -*- +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for GetLogicalView +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-bigtable-admin + + +# [START bigtableadmin_v2_generated_BigtableInstanceAdmin_GetLogicalView_sync] +# 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. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import bigtable_admin_v2 + + +def sample_get_logical_view(): + # Create a client + client = bigtable_admin_v2.BigtableInstanceAdminClient() + + # Initialize request argument(s) + request = bigtable_admin_v2.GetLogicalViewRequest( + name="name_value", + ) + + # Make the request + response = client.get_logical_view(request=request) + + # Handle the response + print(response) + +# [END bigtableadmin_v2_generated_BigtableInstanceAdmin_GetLogicalView_sync] diff --git a/samples/generated_samples/bigtableadmin_v2_generated_bigtable_instance_admin_get_materialized_view_async.py b/samples/generated_samples/bigtableadmin_v2_generated_bigtable_instance_admin_get_materialized_view_async.py new file mode 100644 index 000000000..165fb262c --- /dev/null +++ b/samples/generated_samples/bigtableadmin_v2_generated_bigtable_instance_admin_get_materialized_view_async.py @@ -0,0 +1,52 @@ +# -*- coding: utf-8 -*- +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for GetMaterializedView +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-bigtable-admin + + +# [START bigtableadmin_v2_generated_BigtableInstanceAdmin_GetMaterializedView_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import bigtable_admin_v2 + + +async def sample_get_materialized_view(): + # Create a client + client = bigtable_admin_v2.BigtableInstanceAdminAsyncClient() + + # Initialize request argument(s) + request = bigtable_admin_v2.GetMaterializedViewRequest( + name="name_value", + ) + + # Make the request + response = await client.get_materialized_view(request=request) + + # Handle the response + print(response) + +# [END bigtableadmin_v2_generated_BigtableInstanceAdmin_GetMaterializedView_async] diff --git a/samples/generated_samples/bigtableadmin_v2_generated_bigtable_instance_admin_get_materialized_view_sync.py b/samples/generated_samples/bigtableadmin_v2_generated_bigtable_instance_admin_get_materialized_view_sync.py new file mode 100644 index 000000000..1f94e3954 --- /dev/null +++ b/samples/generated_samples/bigtableadmin_v2_generated_bigtable_instance_admin_get_materialized_view_sync.py @@ -0,0 +1,52 @@ +# -*- coding: utf-8 -*- +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for GetMaterializedView +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-bigtable-admin + + +# [START bigtableadmin_v2_generated_BigtableInstanceAdmin_GetMaterializedView_sync] +# 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. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import bigtable_admin_v2 + + +def sample_get_materialized_view(): + # Create a client + client = bigtable_admin_v2.BigtableInstanceAdminClient() + + # Initialize request argument(s) + request = bigtable_admin_v2.GetMaterializedViewRequest( + name="name_value", + ) + + # Make the request + response = client.get_materialized_view(request=request) + + # Handle the response + print(response) + +# [END bigtableadmin_v2_generated_BigtableInstanceAdmin_GetMaterializedView_sync] diff --git a/samples/generated_samples/bigtableadmin_v2_generated_bigtable_instance_admin_list_app_profiles_async.py b/samples/generated_samples/bigtableadmin_v2_generated_bigtable_instance_admin_list_app_profiles_async.py new file mode 100644 index 000000000..d377fc678 --- /dev/null +++ b/samples/generated_samples/bigtableadmin_v2_generated_bigtable_instance_admin_list_app_profiles_async.py @@ -0,0 +1,53 @@ +# -*- coding: utf-8 -*- +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for ListAppProfiles +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-bigtable-admin + + +# [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. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import bigtable_admin_v2 + + +async def sample_list_app_profiles(): + # Create a client + client = bigtable_admin_v2.BigtableInstanceAdminAsyncClient() + + # Initialize request argument(s) + request = bigtable_admin_v2.ListAppProfilesRequest( + parent="parent_value", + ) + + # Make the request + page_result = client.list_app_profiles(request=request) + + # Handle the response + async for response in page_result: + print(response) + +# [END bigtableadmin_v2_generated_BigtableInstanceAdmin_ListAppProfiles_async] diff --git a/samples/generated_samples/bigtableadmin_v2_generated_bigtable_instance_admin_list_app_profiles_sync.py b/samples/generated_samples/bigtableadmin_v2_generated_bigtable_instance_admin_list_app_profiles_sync.py new file mode 100644 index 000000000..07f49ba39 --- /dev/null +++ b/samples/generated_samples/bigtableadmin_v2_generated_bigtable_instance_admin_list_app_profiles_sync.py @@ -0,0 +1,53 @@ +# -*- coding: utf-8 -*- +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for ListAppProfiles +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-bigtable-admin + + +# [START bigtableadmin_v2_generated_BigtableInstanceAdmin_ListAppProfiles_sync] +# 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. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import bigtable_admin_v2 + + +def sample_list_app_profiles(): + # Create a client + client = bigtable_admin_v2.BigtableInstanceAdminClient() + + # Initialize request argument(s) + request = bigtable_admin_v2.ListAppProfilesRequest( + parent="parent_value", + ) + + # Make the request + page_result = client.list_app_profiles(request=request) + + # Handle the response + for response in page_result: + print(response) + +# [END bigtableadmin_v2_generated_BigtableInstanceAdmin_ListAppProfiles_sync] diff --git a/samples/generated_samples/bigtableadmin_v2_generated_bigtable_instance_admin_list_clusters_async.py b/samples/generated_samples/bigtableadmin_v2_generated_bigtable_instance_admin_list_clusters_async.py new file mode 100644 index 000000000..71532d98a --- /dev/null +++ b/samples/generated_samples/bigtableadmin_v2_generated_bigtable_instance_admin_list_clusters_async.py @@ -0,0 +1,52 @@ +# -*- coding: utf-8 -*- +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for ListClusters +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-bigtable-admin + + +# [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. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import bigtable_admin_v2 + + +async def sample_list_clusters(): + # Create a client + client = bigtable_admin_v2.BigtableInstanceAdminAsyncClient() + + # Initialize request argument(s) + request = bigtable_admin_v2.ListClustersRequest( + parent="parent_value", + ) + + # Make the request + response = await client.list_clusters(request=request) + + # Handle the response + print(response) + +# [END bigtableadmin_v2_generated_BigtableInstanceAdmin_ListClusters_async] diff --git a/samples/generated_samples/bigtableadmin_v2_generated_bigtable_instance_admin_list_clusters_sync.py b/samples/generated_samples/bigtableadmin_v2_generated_bigtable_instance_admin_list_clusters_sync.py new file mode 100644 index 000000000..1c36c098d --- /dev/null +++ b/samples/generated_samples/bigtableadmin_v2_generated_bigtable_instance_admin_list_clusters_sync.py @@ -0,0 +1,52 @@ +# -*- coding: utf-8 -*- +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for ListClusters +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-bigtable-admin + + +# [START bigtableadmin_v2_generated_BigtableInstanceAdmin_ListClusters_sync] +# 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. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import bigtable_admin_v2 + + +def sample_list_clusters(): + # Create a client + client = bigtable_admin_v2.BigtableInstanceAdminClient() + + # Initialize request argument(s) + request = bigtable_admin_v2.ListClustersRequest( + parent="parent_value", + ) + + # Make the request + response = client.list_clusters(request=request) + + # Handle the response + print(response) + +# [END bigtableadmin_v2_generated_BigtableInstanceAdmin_ListClusters_sync] diff --git a/samples/generated_samples/bigtableadmin_v2_generated_bigtable_instance_admin_list_hot_tablets_async.py b/samples/generated_samples/bigtableadmin_v2_generated_bigtable_instance_admin_list_hot_tablets_async.py new file mode 100644 index 000000000..cb6d58847 --- /dev/null +++ b/samples/generated_samples/bigtableadmin_v2_generated_bigtable_instance_admin_list_hot_tablets_async.py @@ -0,0 +1,53 @@ +# -*- coding: utf-8 -*- +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for ListHotTablets +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-bigtable-admin + + +# [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. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import bigtable_admin_v2 + + +async def sample_list_hot_tablets(): + # Create a client + client = bigtable_admin_v2.BigtableInstanceAdminAsyncClient() + + # Initialize request argument(s) + request = bigtable_admin_v2.ListHotTabletsRequest( + parent="parent_value", + ) + + # Make the request + page_result = client.list_hot_tablets(request=request) + + # Handle the response + async for response in page_result: + print(response) + +# [END bigtableadmin_v2_generated_BigtableInstanceAdmin_ListHotTablets_async] diff --git a/samples/generated_samples/bigtableadmin_v2_generated_bigtable_instance_admin_list_hot_tablets_sync.py b/samples/generated_samples/bigtableadmin_v2_generated_bigtable_instance_admin_list_hot_tablets_sync.py new file mode 100644 index 000000000..5add7715d --- /dev/null +++ b/samples/generated_samples/bigtableadmin_v2_generated_bigtable_instance_admin_list_hot_tablets_sync.py @@ -0,0 +1,53 @@ +# -*- coding: utf-8 -*- +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for ListHotTablets +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-bigtable-admin + + +# [START bigtableadmin_v2_generated_BigtableInstanceAdmin_ListHotTablets_sync] +# 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. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import bigtable_admin_v2 + + +def sample_list_hot_tablets(): + # Create a client + client = bigtable_admin_v2.BigtableInstanceAdminClient() + + # Initialize request argument(s) + request = bigtable_admin_v2.ListHotTabletsRequest( + parent="parent_value", + ) + + # Make the request + page_result = client.list_hot_tablets(request=request) + + # Handle the response + for response in page_result: + print(response) + +# [END bigtableadmin_v2_generated_BigtableInstanceAdmin_ListHotTablets_sync] diff --git a/samples/generated_samples/bigtableadmin_v2_generated_bigtable_instance_admin_list_instances_async.py b/samples/generated_samples/bigtableadmin_v2_generated_bigtable_instance_admin_list_instances_async.py new file mode 100644 index 000000000..91c9a8230 --- /dev/null +++ b/samples/generated_samples/bigtableadmin_v2_generated_bigtable_instance_admin_list_instances_async.py @@ -0,0 +1,52 @@ +# -*- coding: utf-8 -*- +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for ListInstances +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-bigtable-admin + + +# [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. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import bigtable_admin_v2 + + +async def sample_list_instances(): + # Create a client + client = bigtable_admin_v2.BigtableInstanceAdminAsyncClient() + + # Initialize request argument(s) + request = bigtable_admin_v2.ListInstancesRequest( + parent="parent_value", + ) + + # Make the request + response = await client.list_instances(request=request) + + # Handle the response + print(response) + +# [END bigtableadmin_v2_generated_BigtableInstanceAdmin_ListInstances_async] diff --git a/samples/generated_samples/bigtableadmin_v2_generated_bigtable_instance_admin_list_instances_sync.py b/samples/generated_samples/bigtableadmin_v2_generated_bigtable_instance_admin_list_instances_sync.py new file mode 100644 index 000000000..bbe708c0e --- /dev/null +++ b/samples/generated_samples/bigtableadmin_v2_generated_bigtable_instance_admin_list_instances_sync.py @@ -0,0 +1,52 @@ +# -*- coding: utf-8 -*- +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for ListInstances +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-bigtable-admin + + +# [START bigtableadmin_v2_generated_BigtableInstanceAdmin_ListInstances_sync] +# 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. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import bigtable_admin_v2 + + +def sample_list_instances(): + # Create a client + client = bigtable_admin_v2.BigtableInstanceAdminClient() + + # Initialize request argument(s) + request = bigtable_admin_v2.ListInstancesRequest( + parent="parent_value", + ) + + # Make the request + response = client.list_instances(request=request) + + # Handle the response + print(response) + +# [END bigtableadmin_v2_generated_BigtableInstanceAdmin_ListInstances_sync] diff --git a/samples/generated_samples/bigtableadmin_v2_generated_bigtable_instance_admin_list_logical_views_async.py b/samples/generated_samples/bigtableadmin_v2_generated_bigtable_instance_admin_list_logical_views_async.py new file mode 100644 index 000000000..8de9bd06e --- /dev/null +++ b/samples/generated_samples/bigtableadmin_v2_generated_bigtable_instance_admin_list_logical_views_async.py @@ -0,0 +1,53 @@ +# -*- coding: utf-8 -*- +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for ListLogicalViews +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-bigtable-admin + + +# [START bigtableadmin_v2_generated_BigtableInstanceAdmin_ListLogicalViews_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import bigtable_admin_v2 + + +async def sample_list_logical_views(): + # Create a client + client = bigtable_admin_v2.BigtableInstanceAdminAsyncClient() + + # Initialize request argument(s) + request = bigtable_admin_v2.ListLogicalViewsRequest( + parent="parent_value", + ) + + # Make the request + page_result = client.list_logical_views(request=request) + + # Handle the response + async for response in page_result: + print(response) + +# [END bigtableadmin_v2_generated_BigtableInstanceAdmin_ListLogicalViews_async] diff --git a/samples/generated_samples/bigtableadmin_v2_generated_bigtable_instance_admin_list_logical_views_sync.py b/samples/generated_samples/bigtableadmin_v2_generated_bigtable_instance_admin_list_logical_views_sync.py new file mode 100644 index 000000000..b5fb602cd --- /dev/null +++ b/samples/generated_samples/bigtableadmin_v2_generated_bigtable_instance_admin_list_logical_views_sync.py @@ -0,0 +1,53 @@ +# -*- coding: utf-8 -*- +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for ListLogicalViews +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-bigtable-admin + + +# [START bigtableadmin_v2_generated_BigtableInstanceAdmin_ListLogicalViews_sync] +# 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. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import bigtable_admin_v2 + + +def sample_list_logical_views(): + # Create a client + client = bigtable_admin_v2.BigtableInstanceAdminClient() + + # Initialize request argument(s) + request = bigtable_admin_v2.ListLogicalViewsRequest( + parent="parent_value", + ) + + # Make the request + page_result = client.list_logical_views(request=request) + + # Handle the response + for response in page_result: + print(response) + +# [END bigtableadmin_v2_generated_BigtableInstanceAdmin_ListLogicalViews_sync] diff --git a/samples/generated_samples/bigtableadmin_v2_generated_bigtable_instance_admin_list_materialized_views_async.py b/samples/generated_samples/bigtableadmin_v2_generated_bigtable_instance_admin_list_materialized_views_async.py new file mode 100644 index 000000000..6fa672a25 --- /dev/null +++ b/samples/generated_samples/bigtableadmin_v2_generated_bigtable_instance_admin_list_materialized_views_async.py @@ -0,0 +1,53 @@ +# -*- coding: utf-8 -*- +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for ListMaterializedViews +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-bigtable-admin + + +# [START bigtableadmin_v2_generated_BigtableInstanceAdmin_ListMaterializedViews_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import bigtable_admin_v2 + + +async def sample_list_materialized_views(): + # Create a client + client = bigtable_admin_v2.BigtableInstanceAdminAsyncClient() + + # Initialize request argument(s) + request = bigtable_admin_v2.ListMaterializedViewsRequest( + parent="parent_value", + ) + + # Make the request + page_result = client.list_materialized_views(request=request) + + # Handle the response + async for response in page_result: + print(response) + +# [END bigtableadmin_v2_generated_BigtableInstanceAdmin_ListMaterializedViews_async] diff --git a/samples/generated_samples/bigtableadmin_v2_generated_bigtable_instance_admin_list_materialized_views_sync.py b/samples/generated_samples/bigtableadmin_v2_generated_bigtable_instance_admin_list_materialized_views_sync.py new file mode 100644 index 000000000..5a25da88a --- /dev/null +++ b/samples/generated_samples/bigtableadmin_v2_generated_bigtable_instance_admin_list_materialized_views_sync.py @@ -0,0 +1,53 @@ +# -*- coding: utf-8 -*- +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for ListMaterializedViews +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-bigtable-admin + + +# [START bigtableadmin_v2_generated_BigtableInstanceAdmin_ListMaterializedViews_sync] +# 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. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import bigtable_admin_v2 + + +def sample_list_materialized_views(): + # Create a client + client = bigtable_admin_v2.BigtableInstanceAdminClient() + + # Initialize request argument(s) + request = bigtable_admin_v2.ListMaterializedViewsRequest( + parent="parent_value", + ) + + # Make the request + page_result = client.list_materialized_views(request=request) + + # Handle the response + for response in page_result: + print(response) + +# [END bigtableadmin_v2_generated_BigtableInstanceAdmin_ListMaterializedViews_sync] diff --git a/samples/generated_samples/bigtableadmin_v2_generated_bigtable_instance_admin_partial_update_cluster_async.py b/samples/generated_samples/bigtableadmin_v2_generated_bigtable_instance_admin_partial_update_cluster_async.py new file mode 100644 index 000000000..dab73b9cb --- /dev/null +++ b/samples/generated_samples/bigtableadmin_v2_generated_bigtable_instance_admin_partial_update_cluster_async.py @@ -0,0 +1,55 @@ +# -*- coding: utf-8 -*- +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for PartialUpdateCluster +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-bigtable-admin + + +# [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. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import bigtable_admin_v2 + + +async def sample_partial_update_cluster(): + # Create a client + client = bigtable_admin_v2.BigtableInstanceAdminAsyncClient() + + # Initialize request argument(s) + request = bigtable_admin_v2.PartialUpdateClusterRequest( + ) + + # Make the request + operation = client.partial_update_cluster(request=request) + + print("Waiting for operation to complete...") + + response = (await operation).result() + + # Handle the response + print(response) + +# [END bigtableadmin_v2_generated_BigtableInstanceAdmin_PartialUpdateCluster_async] diff --git a/samples/generated_samples/bigtableadmin_v2_generated_bigtable_instance_admin_partial_update_cluster_sync.py b/samples/generated_samples/bigtableadmin_v2_generated_bigtable_instance_admin_partial_update_cluster_sync.py new file mode 100644 index 000000000..bab63c6ed --- /dev/null +++ b/samples/generated_samples/bigtableadmin_v2_generated_bigtable_instance_admin_partial_update_cluster_sync.py @@ -0,0 +1,55 @@ +# -*- coding: utf-8 -*- +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for PartialUpdateCluster +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-bigtable-admin + + +# [START bigtableadmin_v2_generated_BigtableInstanceAdmin_PartialUpdateCluster_sync] +# 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. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import bigtable_admin_v2 + + +def sample_partial_update_cluster(): + # Create a client + client = bigtable_admin_v2.BigtableInstanceAdminClient() + + # Initialize request argument(s) + request = bigtable_admin_v2.PartialUpdateClusterRequest( + ) + + # Make the request + operation = client.partial_update_cluster(request=request) + + print("Waiting for operation to complete...") + + response = operation.result() + + # Handle the response + print(response) + +# [END bigtableadmin_v2_generated_BigtableInstanceAdmin_PartialUpdateCluster_sync] diff --git a/samples/generated_samples/bigtableadmin_v2_generated_bigtable_instance_admin_partial_update_instance_async.py b/samples/generated_samples/bigtableadmin_v2_generated_bigtable_instance_admin_partial_update_instance_async.py new file mode 100644 index 000000000..4c5e53ebe --- /dev/null +++ b/samples/generated_samples/bigtableadmin_v2_generated_bigtable_instance_admin_partial_update_instance_async.py @@ -0,0 +1,59 @@ +# -*- coding: utf-8 -*- +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for PartialUpdateInstance +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-bigtable-admin + + +# [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. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import bigtable_admin_v2 + + +async def sample_partial_update_instance(): + # Create a client + client = bigtable_admin_v2.BigtableInstanceAdminAsyncClient() + + # Initialize request argument(s) + instance = bigtable_admin_v2.Instance() + instance.display_name = "display_name_value" + + request = bigtable_admin_v2.PartialUpdateInstanceRequest( + instance=instance, + ) + + # Make the request + operation = client.partial_update_instance(request=request) + + print("Waiting for operation to complete...") + + response = (await operation).result() + + # Handle the response + print(response) + +# [END bigtableadmin_v2_generated_BigtableInstanceAdmin_PartialUpdateInstance_async] diff --git a/samples/generated_samples/bigtableadmin_v2_generated_bigtable_instance_admin_partial_update_instance_sync.py b/samples/generated_samples/bigtableadmin_v2_generated_bigtable_instance_admin_partial_update_instance_sync.py new file mode 100644 index 000000000..0d2a74cfc --- /dev/null +++ b/samples/generated_samples/bigtableadmin_v2_generated_bigtable_instance_admin_partial_update_instance_sync.py @@ -0,0 +1,59 @@ +# -*- coding: utf-8 -*- +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for PartialUpdateInstance +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-bigtable-admin + + +# [START bigtableadmin_v2_generated_BigtableInstanceAdmin_PartialUpdateInstance_sync] +# 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. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import bigtable_admin_v2 + + +def sample_partial_update_instance(): + # Create a client + client = bigtable_admin_v2.BigtableInstanceAdminClient() + + # Initialize request argument(s) + instance = bigtable_admin_v2.Instance() + instance.display_name = "display_name_value" + + request = bigtable_admin_v2.PartialUpdateInstanceRequest( + instance=instance, + ) + + # Make the request + operation = client.partial_update_instance(request=request) + + print("Waiting for operation to complete...") + + response = operation.result() + + # Handle the response + print(response) + +# [END bigtableadmin_v2_generated_BigtableInstanceAdmin_PartialUpdateInstance_sync] diff --git a/samples/generated_samples/bigtableadmin_v2_generated_bigtable_instance_admin_set_iam_policy_async.py b/samples/generated_samples/bigtableadmin_v2_generated_bigtable_instance_admin_set_iam_policy_async.py new file mode 100644 index 000000000..b389b7679 --- /dev/null +++ b/samples/generated_samples/bigtableadmin_v2_generated_bigtable_instance_admin_set_iam_policy_async.py @@ -0,0 +1,53 @@ +# -*- coding: utf-8 -*- +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for SetIamPolicy +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-bigtable-admin + + +# [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. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import bigtable_admin_v2 +from google.iam.v1 import iam_policy_pb2 # type: ignore + + +async def sample_set_iam_policy(): + # Create a client + client = bigtable_admin_v2.BigtableInstanceAdminAsyncClient() + + # Initialize request argument(s) + request = iam_policy_pb2.SetIamPolicyRequest( + resource="resource_value", + ) + + # Make the request + response = await client.set_iam_policy(request=request) + + # Handle the response + print(response) + +# [END bigtableadmin_v2_generated_BigtableInstanceAdmin_SetIamPolicy_async] diff --git a/samples/generated_samples/bigtableadmin_v2_generated_bigtable_instance_admin_set_iam_policy_sync.py b/samples/generated_samples/bigtableadmin_v2_generated_bigtable_instance_admin_set_iam_policy_sync.py new file mode 100644 index 000000000..97bc29d65 --- /dev/null +++ b/samples/generated_samples/bigtableadmin_v2_generated_bigtable_instance_admin_set_iam_policy_sync.py @@ -0,0 +1,53 @@ +# -*- coding: utf-8 -*- +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for SetIamPolicy +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-bigtable-admin + + +# [START bigtableadmin_v2_generated_BigtableInstanceAdmin_SetIamPolicy_sync] +# 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. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import bigtable_admin_v2 +from google.iam.v1 import iam_policy_pb2 # type: ignore + + +def sample_set_iam_policy(): + # Create a client + client = bigtable_admin_v2.BigtableInstanceAdminClient() + + # Initialize request argument(s) + request = iam_policy_pb2.SetIamPolicyRequest( + resource="resource_value", + ) + + # Make the request + response = client.set_iam_policy(request=request) + + # Handle the response + print(response) + +# [END bigtableadmin_v2_generated_BigtableInstanceAdmin_SetIamPolicy_sync] diff --git a/samples/generated_samples/bigtableadmin_v2_generated_bigtable_instance_admin_test_iam_permissions_async.py b/samples/generated_samples/bigtableadmin_v2_generated_bigtable_instance_admin_test_iam_permissions_async.py new file mode 100644 index 000000000..977f79d9b --- /dev/null +++ b/samples/generated_samples/bigtableadmin_v2_generated_bigtable_instance_admin_test_iam_permissions_async.py @@ -0,0 +1,54 @@ +# -*- coding: utf-8 -*- +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for TestIamPermissions +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-bigtable-admin + + +# [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. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import bigtable_admin_v2 +from google.iam.v1 import iam_policy_pb2 # type: ignore + + +async def sample_test_iam_permissions(): + # Create a client + client = bigtable_admin_v2.BigtableInstanceAdminAsyncClient() + + # Initialize request argument(s) + request = iam_policy_pb2.TestIamPermissionsRequest( + resource="resource_value", + permissions=['permissions_value1', 'permissions_value2'], + ) + + # Make the request + response = await client.test_iam_permissions(request=request) + + # Handle the response + print(response) + +# [END bigtableadmin_v2_generated_BigtableInstanceAdmin_TestIamPermissions_async] diff --git a/samples/generated_samples/bigtableadmin_v2_generated_bigtable_instance_admin_test_iam_permissions_sync.py b/samples/generated_samples/bigtableadmin_v2_generated_bigtable_instance_admin_test_iam_permissions_sync.py new file mode 100644 index 000000000..db047d367 --- /dev/null +++ b/samples/generated_samples/bigtableadmin_v2_generated_bigtable_instance_admin_test_iam_permissions_sync.py @@ -0,0 +1,54 @@ +# -*- coding: utf-8 -*- +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for TestIamPermissions +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-bigtable-admin + + +# [START bigtableadmin_v2_generated_BigtableInstanceAdmin_TestIamPermissions_sync] +# 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. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import bigtable_admin_v2 +from google.iam.v1 import iam_policy_pb2 # type: ignore + + +def sample_test_iam_permissions(): + # Create a client + client = bigtable_admin_v2.BigtableInstanceAdminClient() + + # Initialize request argument(s) + request = iam_policy_pb2.TestIamPermissionsRequest( + resource="resource_value", + permissions=['permissions_value1', 'permissions_value2'], + ) + + # Make the request + response = client.test_iam_permissions(request=request) + + # Handle the response + print(response) + +# [END bigtableadmin_v2_generated_BigtableInstanceAdmin_TestIamPermissions_sync] diff --git a/samples/generated_samples/bigtableadmin_v2_generated_bigtable_instance_admin_update_app_profile_async.py b/samples/generated_samples/bigtableadmin_v2_generated_bigtable_instance_admin_update_app_profile_async.py new file mode 100644 index 000000000..2c55a45bd --- /dev/null +++ b/samples/generated_samples/bigtableadmin_v2_generated_bigtable_instance_admin_update_app_profile_async.py @@ -0,0 +1,59 @@ +# -*- coding: utf-8 -*- +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for UpdateAppProfile +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-bigtable-admin + + +# [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. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import bigtable_admin_v2 + + +async def sample_update_app_profile(): + # Create a client + client = bigtable_admin_v2.BigtableInstanceAdminAsyncClient() + + # Initialize request argument(s) + app_profile = bigtable_admin_v2.AppProfile() + app_profile.priority = "PRIORITY_HIGH" + + request = bigtable_admin_v2.UpdateAppProfileRequest( + app_profile=app_profile, + ) + + # Make the request + operation = client.update_app_profile(request=request) + + print("Waiting for operation to complete...") + + response = (await operation).result() + + # Handle the response + print(response) + +# [END bigtableadmin_v2_generated_BigtableInstanceAdmin_UpdateAppProfile_async] diff --git a/samples/generated_samples/bigtableadmin_v2_generated_bigtable_instance_admin_update_app_profile_sync.py b/samples/generated_samples/bigtableadmin_v2_generated_bigtable_instance_admin_update_app_profile_sync.py new file mode 100644 index 000000000..a7b683426 --- /dev/null +++ b/samples/generated_samples/bigtableadmin_v2_generated_bigtable_instance_admin_update_app_profile_sync.py @@ -0,0 +1,59 @@ +# -*- coding: utf-8 -*- +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for UpdateAppProfile +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-bigtable-admin + + +# [START bigtableadmin_v2_generated_BigtableInstanceAdmin_UpdateAppProfile_sync] +# 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. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import bigtable_admin_v2 + + +def sample_update_app_profile(): + # Create a client + client = bigtable_admin_v2.BigtableInstanceAdminClient() + + # Initialize request argument(s) + app_profile = bigtable_admin_v2.AppProfile() + app_profile.priority = "PRIORITY_HIGH" + + request = bigtable_admin_v2.UpdateAppProfileRequest( + app_profile=app_profile, + ) + + # Make the request + operation = client.update_app_profile(request=request) + + print("Waiting for operation to complete...") + + response = operation.result() + + # Handle the response + print(response) + +# [END bigtableadmin_v2_generated_BigtableInstanceAdmin_UpdateAppProfile_sync] diff --git a/samples/generated_samples/bigtableadmin_v2_generated_bigtable_instance_admin_update_cluster_async.py b/samples/generated_samples/bigtableadmin_v2_generated_bigtable_instance_admin_update_cluster_async.py new file mode 100644 index 000000000..af3abde41 --- /dev/null +++ b/samples/generated_samples/bigtableadmin_v2_generated_bigtable_instance_admin_update_cluster_async.py @@ -0,0 +1,55 @@ +# -*- coding: utf-8 -*- +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for UpdateCluster +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-bigtable-admin + + +# [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. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import bigtable_admin_v2 + + +async def sample_update_cluster(): + # Create a client + client = bigtable_admin_v2.BigtableInstanceAdminAsyncClient() + + # Initialize request argument(s) + request = bigtable_admin_v2.Cluster( + ) + + # Make the request + operation = client.update_cluster(request=request) + + print("Waiting for operation to complete...") + + response = (await operation).result() + + # Handle the response + print(response) + +# [END bigtableadmin_v2_generated_BigtableInstanceAdmin_UpdateCluster_async] diff --git a/samples/generated_samples/bigtableadmin_v2_generated_bigtable_instance_admin_update_cluster_sync.py b/samples/generated_samples/bigtableadmin_v2_generated_bigtable_instance_admin_update_cluster_sync.py new file mode 100644 index 000000000..ec02a64af --- /dev/null +++ b/samples/generated_samples/bigtableadmin_v2_generated_bigtable_instance_admin_update_cluster_sync.py @@ -0,0 +1,55 @@ +# -*- coding: utf-8 -*- +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for UpdateCluster +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-bigtable-admin + + +# [START bigtableadmin_v2_generated_BigtableInstanceAdmin_UpdateCluster_sync] +# 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. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import bigtable_admin_v2 + + +def sample_update_cluster(): + # Create a client + client = bigtable_admin_v2.BigtableInstanceAdminClient() + + # Initialize request argument(s) + request = bigtable_admin_v2.Cluster( + ) + + # Make the request + operation = client.update_cluster(request=request) + + print("Waiting for operation to complete...") + + response = operation.result() + + # Handle the response + print(response) + +# [END bigtableadmin_v2_generated_BigtableInstanceAdmin_UpdateCluster_sync] diff --git a/samples/generated_samples/bigtableadmin_v2_generated_bigtable_instance_admin_update_instance_async.py b/samples/generated_samples/bigtableadmin_v2_generated_bigtable_instance_admin_update_instance_async.py new file mode 100644 index 000000000..798afaf80 --- /dev/null +++ b/samples/generated_samples/bigtableadmin_v2_generated_bigtable_instance_admin_update_instance_async.py @@ -0,0 +1,52 @@ +# -*- coding: utf-8 -*- +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for UpdateInstance +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-bigtable-admin + + +# [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. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import bigtable_admin_v2 + + +async def sample_update_instance(): + # Create a client + client = bigtable_admin_v2.BigtableInstanceAdminAsyncClient() + + # Initialize request argument(s) + request = bigtable_admin_v2.Instance( + display_name="display_name_value", + ) + + # Make the request + response = await client.update_instance(request=request) + + # Handle the response + print(response) + +# [END bigtableadmin_v2_generated_BigtableInstanceAdmin_UpdateInstance_async] diff --git a/samples/generated_samples/bigtableadmin_v2_generated_bigtable_instance_admin_update_instance_sync.py b/samples/generated_samples/bigtableadmin_v2_generated_bigtable_instance_admin_update_instance_sync.py new file mode 100644 index 000000000..fb6e5e2d3 --- /dev/null +++ b/samples/generated_samples/bigtableadmin_v2_generated_bigtable_instance_admin_update_instance_sync.py @@ -0,0 +1,52 @@ +# -*- coding: utf-8 -*- +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for UpdateInstance +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-bigtable-admin + + +# [START bigtableadmin_v2_generated_BigtableInstanceAdmin_UpdateInstance_sync] +# 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. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import bigtable_admin_v2 + + +def sample_update_instance(): + # Create a client + client = bigtable_admin_v2.BigtableInstanceAdminClient() + + # Initialize request argument(s) + request = bigtable_admin_v2.Instance( + display_name="display_name_value", + ) + + # Make the request + response = client.update_instance(request=request) + + # Handle the response + print(response) + +# [END bigtableadmin_v2_generated_BigtableInstanceAdmin_UpdateInstance_sync] diff --git a/samples/generated_samples/bigtableadmin_v2_generated_bigtable_instance_admin_update_logical_view_async.py b/samples/generated_samples/bigtableadmin_v2_generated_bigtable_instance_admin_update_logical_view_async.py new file mode 100644 index 000000000..9bdd620e6 --- /dev/null +++ b/samples/generated_samples/bigtableadmin_v2_generated_bigtable_instance_admin_update_logical_view_async.py @@ -0,0 +1,59 @@ +# -*- coding: utf-8 -*- +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for UpdateLogicalView +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-bigtable-admin + + +# [START bigtableadmin_v2_generated_BigtableInstanceAdmin_UpdateLogicalView_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import bigtable_admin_v2 + + +async def sample_update_logical_view(): + # Create a client + client = bigtable_admin_v2.BigtableInstanceAdminAsyncClient() + + # Initialize request argument(s) + logical_view = bigtable_admin_v2.LogicalView() + logical_view.query = "query_value" + + request = bigtable_admin_v2.UpdateLogicalViewRequest( + logical_view=logical_view, + ) + + # Make the request + operation = client.update_logical_view(request=request) + + print("Waiting for operation to complete...") + + response = (await operation).result() + + # Handle the response + print(response) + +# [END bigtableadmin_v2_generated_BigtableInstanceAdmin_UpdateLogicalView_async] diff --git a/samples/generated_samples/bigtableadmin_v2_generated_bigtable_instance_admin_update_logical_view_sync.py b/samples/generated_samples/bigtableadmin_v2_generated_bigtable_instance_admin_update_logical_view_sync.py new file mode 100644 index 000000000..10d962205 --- /dev/null +++ b/samples/generated_samples/bigtableadmin_v2_generated_bigtable_instance_admin_update_logical_view_sync.py @@ -0,0 +1,59 @@ +# -*- coding: utf-8 -*- +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for UpdateLogicalView +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-bigtable-admin + + +# [START bigtableadmin_v2_generated_BigtableInstanceAdmin_UpdateLogicalView_sync] +# 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. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import bigtable_admin_v2 + + +def sample_update_logical_view(): + # Create a client + client = bigtable_admin_v2.BigtableInstanceAdminClient() + + # Initialize request argument(s) + logical_view = bigtable_admin_v2.LogicalView() + logical_view.query = "query_value" + + request = bigtable_admin_v2.UpdateLogicalViewRequest( + logical_view=logical_view, + ) + + # Make the request + operation = client.update_logical_view(request=request) + + print("Waiting for operation to complete...") + + response = operation.result() + + # Handle the response + print(response) + +# [END bigtableadmin_v2_generated_BigtableInstanceAdmin_UpdateLogicalView_sync] diff --git a/samples/generated_samples/bigtableadmin_v2_generated_bigtable_instance_admin_update_materialized_view_async.py b/samples/generated_samples/bigtableadmin_v2_generated_bigtable_instance_admin_update_materialized_view_async.py new file mode 100644 index 000000000..ddd930475 --- /dev/null +++ b/samples/generated_samples/bigtableadmin_v2_generated_bigtable_instance_admin_update_materialized_view_async.py @@ -0,0 +1,59 @@ +# -*- coding: utf-8 -*- +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for UpdateMaterializedView +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-bigtable-admin + + +# [START bigtableadmin_v2_generated_BigtableInstanceAdmin_UpdateMaterializedView_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import bigtable_admin_v2 + + +async def sample_update_materialized_view(): + # Create a client + client = bigtable_admin_v2.BigtableInstanceAdminAsyncClient() + + # Initialize request argument(s) + materialized_view = bigtable_admin_v2.MaterializedView() + materialized_view.query = "query_value" + + request = bigtable_admin_v2.UpdateMaterializedViewRequest( + materialized_view=materialized_view, + ) + + # Make the request + operation = client.update_materialized_view(request=request) + + print("Waiting for operation to complete...") + + response = (await operation).result() + + # Handle the response + print(response) + +# [END bigtableadmin_v2_generated_BigtableInstanceAdmin_UpdateMaterializedView_async] diff --git a/samples/generated_samples/bigtableadmin_v2_generated_bigtable_instance_admin_update_materialized_view_sync.py b/samples/generated_samples/bigtableadmin_v2_generated_bigtable_instance_admin_update_materialized_view_sync.py new file mode 100644 index 000000000..a2ef78bd3 --- /dev/null +++ b/samples/generated_samples/bigtableadmin_v2_generated_bigtable_instance_admin_update_materialized_view_sync.py @@ -0,0 +1,59 @@ +# -*- coding: utf-8 -*- +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for UpdateMaterializedView +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-bigtable-admin + + +# [START bigtableadmin_v2_generated_BigtableInstanceAdmin_UpdateMaterializedView_sync] +# 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. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import bigtable_admin_v2 + + +def sample_update_materialized_view(): + # Create a client + client = bigtable_admin_v2.BigtableInstanceAdminClient() + + # Initialize request argument(s) + materialized_view = bigtable_admin_v2.MaterializedView() + materialized_view.query = "query_value" + + request = bigtable_admin_v2.UpdateMaterializedViewRequest( + materialized_view=materialized_view, + ) + + # Make the request + operation = client.update_materialized_view(request=request) + + print("Waiting for operation to complete...") + + response = operation.result() + + # Handle the response + print(response) + +# [END bigtableadmin_v2_generated_BigtableInstanceAdmin_UpdateMaterializedView_sync] diff --git a/samples/generated_samples/bigtableadmin_v2_generated_bigtable_table_admin_check_consistency_async.py b/samples/generated_samples/bigtableadmin_v2_generated_bigtable_table_admin_check_consistency_async.py new file mode 100644 index 000000000..4cd57edc8 --- /dev/null +++ b/samples/generated_samples/bigtableadmin_v2_generated_bigtable_table_admin_check_consistency_async.py @@ -0,0 +1,53 @@ +# -*- coding: utf-8 -*- +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for CheckConsistency +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-bigtable-admin + + +# [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. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import bigtable_admin_v2 + + +async def sample_check_consistency(): + # Create a client + client = bigtable_admin_v2.BigtableTableAdminAsyncClient() + + # Initialize request argument(s) + request = bigtable_admin_v2.CheckConsistencyRequest( + name="name_value", + consistency_token="consistency_token_value", + ) + + # Make the request + response = await client.check_consistency(request=request) + + # Handle the response + print(response) + +# [END bigtableadmin_v2_generated_BigtableTableAdmin_CheckConsistency_async] diff --git a/samples/generated_samples/bigtableadmin_v2_generated_bigtable_table_admin_check_consistency_sync.py b/samples/generated_samples/bigtableadmin_v2_generated_bigtable_table_admin_check_consistency_sync.py new file mode 100644 index 000000000..ec6085b3f --- /dev/null +++ b/samples/generated_samples/bigtableadmin_v2_generated_bigtable_table_admin_check_consistency_sync.py @@ -0,0 +1,53 @@ +# -*- coding: utf-8 -*- +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for CheckConsistency +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-bigtable-admin + + +# [START bigtableadmin_v2_generated_BigtableTableAdmin_CheckConsistency_sync] +# 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. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import bigtable_admin_v2 + + +def sample_check_consistency(): + # Create a client + client = bigtable_admin_v2.BigtableTableAdminClient() + + # Initialize request argument(s) + request = bigtable_admin_v2.CheckConsistencyRequest( + name="name_value", + consistency_token="consistency_token_value", + ) + + # Make the request + response = client.check_consistency(request=request) + + # Handle the response + print(response) + +# [END bigtableadmin_v2_generated_BigtableTableAdmin_CheckConsistency_sync] diff --git a/samples/generated_samples/bigtableadmin_v2_generated_bigtable_table_admin_copy_backup_async.py b/samples/generated_samples/bigtableadmin_v2_generated_bigtable_table_admin_copy_backup_async.py new file mode 100644 index 000000000..9355b7d44 --- /dev/null +++ b/samples/generated_samples/bigtableadmin_v2_generated_bigtable_table_admin_copy_backup_async.py @@ -0,0 +1,58 @@ +# -*- coding: utf-8 -*- +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for CopyBackup +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-bigtable-admin + + +# [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. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import bigtable_admin_v2 + + +async def sample_copy_backup(): + # Create a client + client = bigtable_admin_v2.BigtableTableAdminAsyncClient() + + # Initialize request argument(s) + request = bigtable_admin_v2.CopyBackupRequest( + parent="parent_value", + backup_id="backup_id_value", + source_backup="source_backup_value", + ) + + # Make the request + operation = client.copy_backup(request=request) + + print("Waiting for operation to complete...") + + response = (await operation).result() + + # Handle the response + print(response) + +# [END bigtableadmin_v2_generated_BigtableTableAdmin_CopyBackup_async] diff --git a/samples/generated_samples/bigtableadmin_v2_generated_bigtable_table_admin_copy_backup_sync.py b/samples/generated_samples/bigtableadmin_v2_generated_bigtable_table_admin_copy_backup_sync.py new file mode 100644 index 000000000..25456ad21 --- /dev/null +++ b/samples/generated_samples/bigtableadmin_v2_generated_bigtable_table_admin_copy_backup_sync.py @@ -0,0 +1,58 @@ +# -*- coding: utf-8 -*- +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for CopyBackup +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-bigtable-admin + + +# [START bigtableadmin_v2_generated_BigtableTableAdmin_CopyBackup_sync] +# 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. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import bigtable_admin_v2 + + +def sample_copy_backup(): + # Create a client + client = bigtable_admin_v2.BigtableTableAdminClient() + + # Initialize request argument(s) + request = bigtable_admin_v2.CopyBackupRequest( + parent="parent_value", + backup_id="backup_id_value", + source_backup="source_backup_value", + ) + + # Make the request + operation = client.copy_backup(request=request) + + print("Waiting for operation to complete...") + + response = operation.result() + + # Handle the response + print(response) + +# [END bigtableadmin_v2_generated_BigtableTableAdmin_CopyBackup_sync] diff --git a/samples/generated_samples/bigtableadmin_v2_generated_bigtable_table_admin_create_authorized_view_async.py b/samples/generated_samples/bigtableadmin_v2_generated_bigtable_table_admin_create_authorized_view_async.py new file mode 100644 index 000000000..135bbe220 --- /dev/null +++ b/samples/generated_samples/bigtableadmin_v2_generated_bigtable_table_admin_create_authorized_view_async.py @@ -0,0 +1,57 @@ +# -*- coding: utf-8 -*- +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for CreateAuthorizedView +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-bigtable-admin + + +# [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. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import bigtable_admin_v2 + + +async def sample_create_authorized_view(): + # Create a client + client = bigtable_admin_v2.BigtableTableAdminAsyncClient() + + # Initialize request argument(s) + request = bigtable_admin_v2.CreateAuthorizedViewRequest( + parent="parent_value", + authorized_view_id="authorized_view_id_value", + ) + + # Make the request + operation = client.create_authorized_view(request=request) + + print("Waiting for operation to complete...") + + response = (await operation).result() + + # Handle the response + print(response) + +# [END bigtableadmin_v2_generated_BigtableTableAdmin_CreateAuthorizedView_async] diff --git a/samples/generated_samples/bigtableadmin_v2_generated_bigtable_table_admin_create_authorized_view_sync.py b/samples/generated_samples/bigtableadmin_v2_generated_bigtable_table_admin_create_authorized_view_sync.py new file mode 100644 index 000000000..cafbf56cb --- /dev/null +++ b/samples/generated_samples/bigtableadmin_v2_generated_bigtable_table_admin_create_authorized_view_sync.py @@ -0,0 +1,57 @@ +# -*- coding: utf-8 -*- +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for CreateAuthorizedView +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-bigtable-admin + + +# [START bigtableadmin_v2_generated_BigtableTableAdmin_CreateAuthorizedView_sync] +# 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. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import bigtable_admin_v2 + + +def sample_create_authorized_view(): + # Create a client + client = bigtable_admin_v2.BigtableTableAdminClient() + + # Initialize request argument(s) + request = bigtable_admin_v2.CreateAuthorizedViewRequest( + parent="parent_value", + authorized_view_id="authorized_view_id_value", + ) + + # Make the request + operation = client.create_authorized_view(request=request) + + print("Waiting for operation to complete...") + + response = operation.result() + + # Handle the response + print(response) + +# [END bigtableadmin_v2_generated_BigtableTableAdmin_CreateAuthorizedView_sync] diff --git a/samples/generated_samples/bigtableadmin_v2_generated_bigtable_table_admin_create_backup_async.py b/samples/generated_samples/bigtableadmin_v2_generated_bigtable_table_admin_create_backup_async.py new file mode 100644 index 000000000..d9bd402b4 --- /dev/null +++ b/samples/generated_samples/bigtableadmin_v2_generated_bigtable_table_admin_create_backup_async.py @@ -0,0 +1,61 @@ +# -*- coding: utf-8 -*- +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for CreateBackup +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-bigtable-admin + + +# [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. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import bigtable_admin_v2 + + +async def sample_create_backup(): + # Create a client + client = bigtable_admin_v2.BigtableTableAdminAsyncClient() + + # Initialize request argument(s) + backup = bigtable_admin_v2.Backup() + backup.source_table = "source_table_value" + + request = bigtable_admin_v2.CreateBackupRequest( + parent="parent_value", + backup_id="backup_id_value", + backup=backup, + ) + + # Make the request + operation = client.create_backup(request=request) + + print("Waiting for operation to complete...") + + response = (await operation).result() + + # Handle the response + print(response) + +# [END bigtableadmin_v2_generated_BigtableTableAdmin_CreateBackup_async] diff --git a/samples/generated_samples/bigtableadmin_v2_generated_bigtable_table_admin_create_backup_sync.py b/samples/generated_samples/bigtableadmin_v2_generated_bigtable_table_admin_create_backup_sync.py new file mode 100644 index 000000000..835f0573c --- /dev/null +++ b/samples/generated_samples/bigtableadmin_v2_generated_bigtable_table_admin_create_backup_sync.py @@ -0,0 +1,61 @@ +# -*- coding: utf-8 -*- +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for CreateBackup +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-bigtable-admin + + +# [START bigtableadmin_v2_generated_BigtableTableAdmin_CreateBackup_sync] +# 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. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import bigtable_admin_v2 + + +def sample_create_backup(): + # Create a client + client = bigtable_admin_v2.BigtableTableAdminClient() + + # Initialize request argument(s) + backup = bigtable_admin_v2.Backup() + backup.source_table = "source_table_value" + + request = bigtable_admin_v2.CreateBackupRequest( + parent="parent_value", + backup_id="backup_id_value", + backup=backup, + ) + + # Make the request + operation = client.create_backup(request=request) + + print("Waiting for operation to complete...") + + response = operation.result() + + # Handle the response + print(response) + +# [END bigtableadmin_v2_generated_BigtableTableAdmin_CreateBackup_sync] diff --git a/samples/generated_samples/bigtableadmin_v2_generated_bigtable_table_admin_create_schema_bundle_async.py b/samples/generated_samples/bigtableadmin_v2_generated_bigtable_table_admin_create_schema_bundle_async.py new file mode 100644 index 000000000..8e4992635 --- /dev/null +++ b/samples/generated_samples/bigtableadmin_v2_generated_bigtable_table_admin_create_schema_bundle_async.py @@ -0,0 +1,61 @@ +# -*- coding: utf-8 -*- +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for CreateSchemaBundle +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-bigtable-admin + + +# [START bigtableadmin_v2_generated_BigtableTableAdmin_CreateSchemaBundle_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import bigtable_admin_v2 + + +async def sample_create_schema_bundle(): + # Create a client + client = bigtable_admin_v2.BigtableTableAdminAsyncClient() + + # Initialize request argument(s) + schema_bundle = bigtable_admin_v2.SchemaBundle() + schema_bundle.proto_schema.proto_descriptors = b'proto_descriptors_blob' + + request = bigtable_admin_v2.CreateSchemaBundleRequest( + parent="parent_value", + schema_bundle_id="schema_bundle_id_value", + schema_bundle=schema_bundle, + ) + + # Make the request + operation = client.create_schema_bundle(request=request) + + print("Waiting for operation to complete...") + + response = (await operation).result() + + # Handle the response + print(response) + +# [END bigtableadmin_v2_generated_BigtableTableAdmin_CreateSchemaBundle_async] diff --git a/samples/generated_samples/bigtableadmin_v2_generated_bigtable_table_admin_create_schema_bundle_sync.py b/samples/generated_samples/bigtableadmin_v2_generated_bigtable_table_admin_create_schema_bundle_sync.py new file mode 100644 index 000000000..a5911497d --- /dev/null +++ b/samples/generated_samples/bigtableadmin_v2_generated_bigtable_table_admin_create_schema_bundle_sync.py @@ -0,0 +1,61 @@ +# -*- coding: utf-8 -*- +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for CreateSchemaBundle +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-bigtable-admin + + +# [START bigtableadmin_v2_generated_BigtableTableAdmin_CreateSchemaBundle_sync] +# 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. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import bigtable_admin_v2 + + +def sample_create_schema_bundle(): + # Create a client + client = bigtable_admin_v2.BigtableTableAdminClient() + + # Initialize request argument(s) + schema_bundle = bigtable_admin_v2.SchemaBundle() + schema_bundle.proto_schema.proto_descriptors = b'proto_descriptors_blob' + + request = bigtable_admin_v2.CreateSchemaBundleRequest( + parent="parent_value", + schema_bundle_id="schema_bundle_id_value", + schema_bundle=schema_bundle, + ) + + # Make the request + operation = client.create_schema_bundle(request=request) + + print("Waiting for operation to complete...") + + response = operation.result() + + # Handle the response + print(response) + +# [END bigtableadmin_v2_generated_BigtableTableAdmin_CreateSchemaBundle_sync] diff --git a/samples/generated_samples/bigtableadmin_v2_generated_bigtable_table_admin_create_table_async.py b/samples/generated_samples/bigtableadmin_v2_generated_bigtable_table_admin_create_table_async.py new file mode 100644 index 000000000..3096539b9 --- /dev/null +++ b/samples/generated_samples/bigtableadmin_v2_generated_bigtable_table_admin_create_table_async.py @@ -0,0 +1,53 @@ +# -*- coding: utf-8 -*- +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for CreateTable +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-bigtable-admin + + +# [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. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import bigtable_admin_v2 + + +async def sample_create_table(): + # Create a client + client = bigtable_admin_v2.BigtableTableAdminAsyncClient() + + # Initialize request argument(s) + request = bigtable_admin_v2.CreateTableRequest( + parent="parent_value", + table_id="table_id_value", + ) + + # Make the request + response = await client.create_table(request=request) + + # Handle the response + print(response) + +# [END bigtableadmin_v2_generated_BigtableTableAdmin_CreateTable_async] diff --git a/samples/generated_samples/bigtableadmin_v2_generated_bigtable_table_admin_create_table_from_snapshot_async.py b/samples/generated_samples/bigtableadmin_v2_generated_bigtable_table_admin_create_table_from_snapshot_async.py new file mode 100644 index 000000000..f7767438e --- /dev/null +++ b/samples/generated_samples/bigtableadmin_v2_generated_bigtable_table_admin_create_table_from_snapshot_async.py @@ -0,0 +1,58 @@ +# -*- coding: utf-8 -*- +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for CreateTableFromSnapshot +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-bigtable-admin + + +# [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. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import bigtable_admin_v2 + + +async def sample_create_table_from_snapshot(): + # Create a client + client = bigtable_admin_v2.BigtableTableAdminAsyncClient() + + # Initialize request argument(s) + request = bigtable_admin_v2.CreateTableFromSnapshotRequest( + parent="parent_value", + table_id="table_id_value", + source_snapshot="source_snapshot_value", + ) + + # Make the request + operation = client.create_table_from_snapshot(request=request) + + print("Waiting for operation to complete...") + + response = (await operation).result() + + # Handle the response + print(response) + +# [END bigtableadmin_v2_generated_BigtableTableAdmin_CreateTableFromSnapshot_async] diff --git a/samples/generated_samples/bigtableadmin_v2_generated_bigtable_table_admin_create_table_from_snapshot_sync.py b/samples/generated_samples/bigtableadmin_v2_generated_bigtable_table_admin_create_table_from_snapshot_sync.py new file mode 100644 index 000000000..ff1dd7899 --- /dev/null +++ b/samples/generated_samples/bigtableadmin_v2_generated_bigtable_table_admin_create_table_from_snapshot_sync.py @@ -0,0 +1,58 @@ +# -*- coding: utf-8 -*- +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for CreateTableFromSnapshot +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-bigtable-admin + + +# [START bigtableadmin_v2_generated_BigtableTableAdmin_CreateTableFromSnapshot_sync] +# 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. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import bigtable_admin_v2 + + +def sample_create_table_from_snapshot(): + # Create a client + client = bigtable_admin_v2.BigtableTableAdminClient() + + # Initialize request argument(s) + request = bigtable_admin_v2.CreateTableFromSnapshotRequest( + parent="parent_value", + table_id="table_id_value", + source_snapshot="source_snapshot_value", + ) + + # Make the request + operation = client.create_table_from_snapshot(request=request) + + print("Waiting for operation to complete...") + + response = operation.result() + + # Handle the response + print(response) + +# [END bigtableadmin_v2_generated_BigtableTableAdmin_CreateTableFromSnapshot_sync] diff --git a/samples/generated_samples/bigtableadmin_v2_generated_bigtable_table_admin_create_table_sync.py b/samples/generated_samples/bigtableadmin_v2_generated_bigtable_table_admin_create_table_sync.py new file mode 100644 index 000000000..552a1095f --- /dev/null +++ b/samples/generated_samples/bigtableadmin_v2_generated_bigtable_table_admin_create_table_sync.py @@ -0,0 +1,53 @@ +# -*- coding: utf-8 -*- +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for CreateTable +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-bigtable-admin + + +# [START bigtableadmin_v2_generated_BigtableTableAdmin_CreateTable_sync] +# 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. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import bigtable_admin_v2 + + +def sample_create_table(): + # Create a client + client = bigtable_admin_v2.BigtableTableAdminClient() + + # Initialize request argument(s) + request = bigtable_admin_v2.CreateTableRequest( + parent="parent_value", + table_id="table_id_value", + ) + + # Make the request + response = client.create_table(request=request) + + # Handle the response + print(response) + +# [END bigtableadmin_v2_generated_BigtableTableAdmin_CreateTable_sync] diff --git a/samples/generated_samples/bigtableadmin_v2_generated_bigtable_table_admin_delete_authorized_view_async.py b/samples/generated_samples/bigtableadmin_v2_generated_bigtable_table_admin_delete_authorized_view_async.py new file mode 100644 index 000000000..cbee06ae1 --- /dev/null +++ b/samples/generated_samples/bigtableadmin_v2_generated_bigtable_table_admin_delete_authorized_view_async.py @@ -0,0 +1,50 @@ +# -*- coding: utf-8 -*- +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for DeleteAuthorizedView +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-bigtable-admin + + +# [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. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import bigtable_admin_v2 + + +async def sample_delete_authorized_view(): + # Create a client + client = bigtable_admin_v2.BigtableTableAdminAsyncClient() + + # Initialize request argument(s) + request = bigtable_admin_v2.DeleteAuthorizedViewRequest( + name="name_value", + ) + + # Make the request + await client.delete_authorized_view(request=request) + + +# [END bigtableadmin_v2_generated_BigtableTableAdmin_DeleteAuthorizedView_async] diff --git a/samples/generated_samples/bigtableadmin_v2_generated_bigtable_table_admin_delete_authorized_view_sync.py b/samples/generated_samples/bigtableadmin_v2_generated_bigtable_table_admin_delete_authorized_view_sync.py new file mode 100644 index 000000000..298e66efb --- /dev/null +++ b/samples/generated_samples/bigtableadmin_v2_generated_bigtable_table_admin_delete_authorized_view_sync.py @@ -0,0 +1,50 @@ +# -*- coding: utf-8 -*- +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for DeleteAuthorizedView +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-bigtable-admin + + +# [START bigtableadmin_v2_generated_BigtableTableAdmin_DeleteAuthorizedView_sync] +# 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. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import bigtable_admin_v2 + + +def sample_delete_authorized_view(): + # Create a client + client = bigtable_admin_v2.BigtableTableAdminClient() + + # Initialize request argument(s) + request = bigtable_admin_v2.DeleteAuthorizedViewRequest( + name="name_value", + ) + + # Make the request + client.delete_authorized_view(request=request) + + +# [END bigtableadmin_v2_generated_BigtableTableAdmin_DeleteAuthorizedView_sync] diff --git a/samples/generated_samples/bigtableadmin_v2_generated_bigtable_table_admin_delete_backup_async.py b/samples/generated_samples/bigtableadmin_v2_generated_bigtable_table_admin_delete_backup_async.py new file mode 100644 index 000000000..d2615f792 --- /dev/null +++ b/samples/generated_samples/bigtableadmin_v2_generated_bigtable_table_admin_delete_backup_async.py @@ -0,0 +1,50 @@ +# -*- coding: utf-8 -*- +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for DeleteBackup +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-bigtable-admin + + +# [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. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import bigtable_admin_v2 + + +async def sample_delete_backup(): + # Create a client + client = bigtable_admin_v2.BigtableTableAdminAsyncClient() + + # Initialize request argument(s) + request = bigtable_admin_v2.DeleteBackupRequest( + name="name_value", + ) + + # Make the request + await client.delete_backup(request=request) + + +# [END bigtableadmin_v2_generated_BigtableTableAdmin_DeleteBackup_async] diff --git a/samples/generated_samples/bigtableadmin_v2_generated_bigtable_table_admin_delete_backup_sync.py b/samples/generated_samples/bigtableadmin_v2_generated_bigtable_table_admin_delete_backup_sync.py new file mode 100644 index 000000000..c9888bf39 --- /dev/null +++ b/samples/generated_samples/bigtableadmin_v2_generated_bigtable_table_admin_delete_backup_sync.py @@ -0,0 +1,50 @@ +# -*- coding: utf-8 -*- +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for DeleteBackup +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-bigtable-admin + + +# [START bigtableadmin_v2_generated_BigtableTableAdmin_DeleteBackup_sync] +# 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. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import bigtable_admin_v2 + + +def sample_delete_backup(): + # Create a client + client = bigtable_admin_v2.BigtableTableAdminClient() + + # Initialize request argument(s) + request = bigtable_admin_v2.DeleteBackupRequest( + name="name_value", + ) + + # Make the request + client.delete_backup(request=request) + + +# [END bigtableadmin_v2_generated_BigtableTableAdmin_DeleteBackup_sync] diff --git a/samples/generated_samples/bigtableadmin_v2_generated_bigtable_table_admin_delete_schema_bundle_async.py b/samples/generated_samples/bigtableadmin_v2_generated_bigtable_table_admin_delete_schema_bundle_async.py new file mode 100644 index 000000000..7377299d1 --- /dev/null +++ b/samples/generated_samples/bigtableadmin_v2_generated_bigtable_table_admin_delete_schema_bundle_async.py @@ -0,0 +1,50 @@ +# -*- coding: utf-8 -*- +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for DeleteSchemaBundle +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-bigtable-admin + + +# [START bigtableadmin_v2_generated_BigtableTableAdmin_DeleteSchemaBundle_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import bigtable_admin_v2 + + +async def sample_delete_schema_bundle(): + # Create a client + client = bigtable_admin_v2.BigtableTableAdminAsyncClient() + + # Initialize request argument(s) + request = bigtable_admin_v2.DeleteSchemaBundleRequest( + name="name_value", + ) + + # Make the request + await client.delete_schema_bundle(request=request) + + +# [END bigtableadmin_v2_generated_BigtableTableAdmin_DeleteSchemaBundle_async] diff --git a/samples/generated_samples/bigtableadmin_v2_generated_bigtable_table_admin_delete_schema_bundle_sync.py b/samples/generated_samples/bigtableadmin_v2_generated_bigtable_table_admin_delete_schema_bundle_sync.py new file mode 100644 index 000000000..5dc12b464 --- /dev/null +++ b/samples/generated_samples/bigtableadmin_v2_generated_bigtable_table_admin_delete_schema_bundle_sync.py @@ -0,0 +1,50 @@ +# -*- coding: utf-8 -*- +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for DeleteSchemaBundle +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-bigtable-admin + + +# [START bigtableadmin_v2_generated_BigtableTableAdmin_DeleteSchemaBundle_sync] +# 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. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import bigtable_admin_v2 + + +def sample_delete_schema_bundle(): + # Create a client + client = bigtable_admin_v2.BigtableTableAdminClient() + + # Initialize request argument(s) + request = bigtable_admin_v2.DeleteSchemaBundleRequest( + name="name_value", + ) + + # Make the request + client.delete_schema_bundle(request=request) + + +# [END bigtableadmin_v2_generated_BigtableTableAdmin_DeleteSchemaBundle_sync] diff --git a/samples/generated_samples/bigtableadmin_v2_generated_bigtable_table_admin_delete_snapshot_async.py b/samples/generated_samples/bigtableadmin_v2_generated_bigtable_table_admin_delete_snapshot_async.py new file mode 100644 index 000000000..eb8ca8166 --- /dev/null +++ b/samples/generated_samples/bigtableadmin_v2_generated_bigtable_table_admin_delete_snapshot_async.py @@ -0,0 +1,50 @@ +# -*- coding: utf-8 -*- +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for DeleteSnapshot +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-bigtable-admin + + +# [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. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import bigtable_admin_v2 + + +async def sample_delete_snapshot(): + # Create a client + client = bigtable_admin_v2.BigtableTableAdminAsyncClient() + + # Initialize request argument(s) + request = bigtable_admin_v2.DeleteSnapshotRequest( + name="name_value", + ) + + # Make the request + await client.delete_snapshot(request=request) + + +# [END bigtableadmin_v2_generated_BigtableTableAdmin_DeleteSnapshot_async] diff --git a/samples/generated_samples/bigtableadmin_v2_generated_bigtable_table_admin_delete_snapshot_sync.py b/samples/generated_samples/bigtableadmin_v2_generated_bigtable_table_admin_delete_snapshot_sync.py new file mode 100644 index 000000000..ad979615d --- /dev/null +++ b/samples/generated_samples/bigtableadmin_v2_generated_bigtable_table_admin_delete_snapshot_sync.py @@ -0,0 +1,50 @@ +# -*- coding: utf-8 -*- +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for DeleteSnapshot +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-bigtable-admin + + +# [START bigtableadmin_v2_generated_BigtableTableAdmin_DeleteSnapshot_sync] +# 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. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import bigtable_admin_v2 + + +def sample_delete_snapshot(): + # Create a client + client = bigtable_admin_v2.BigtableTableAdminClient() + + # Initialize request argument(s) + request = bigtable_admin_v2.DeleteSnapshotRequest( + name="name_value", + ) + + # Make the request + client.delete_snapshot(request=request) + + +# [END bigtableadmin_v2_generated_BigtableTableAdmin_DeleteSnapshot_sync] diff --git a/samples/generated_samples/bigtableadmin_v2_generated_bigtable_table_admin_delete_table_async.py b/samples/generated_samples/bigtableadmin_v2_generated_bigtable_table_admin_delete_table_async.py new file mode 100644 index 000000000..375e61557 --- /dev/null +++ b/samples/generated_samples/bigtableadmin_v2_generated_bigtable_table_admin_delete_table_async.py @@ -0,0 +1,50 @@ +# -*- coding: utf-8 -*- +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for DeleteTable +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-bigtable-admin + + +# [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. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import bigtable_admin_v2 + + +async def sample_delete_table(): + # Create a client + client = bigtable_admin_v2.BigtableTableAdminAsyncClient() + + # Initialize request argument(s) + request = bigtable_admin_v2.DeleteTableRequest( + name="name_value", + ) + + # Make the request + await client.delete_table(request=request) + + +# [END bigtableadmin_v2_generated_BigtableTableAdmin_DeleteTable_async] diff --git a/samples/generated_samples/bigtableadmin_v2_generated_bigtable_table_admin_delete_table_sync.py b/samples/generated_samples/bigtableadmin_v2_generated_bigtable_table_admin_delete_table_sync.py new file mode 100644 index 000000000..17397bfab --- /dev/null +++ b/samples/generated_samples/bigtableadmin_v2_generated_bigtable_table_admin_delete_table_sync.py @@ -0,0 +1,50 @@ +# -*- coding: utf-8 -*- +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for DeleteTable +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-bigtable-admin + + +# [START bigtableadmin_v2_generated_BigtableTableAdmin_DeleteTable_sync] +# 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. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import bigtable_admin_v2 + + +def sample_delete_table(): + # Create a client + client = bigtable_admin_v2.BigtableTableAdminClient() + + # Initialize request argument(s) + request = bigtable_admin_v2.DeleteTableRequest( + name="name_value", + ) + + # Make the request + client.delete_table(request=request) + + +# [END bigtableadmin_v2_generated_BigtableTableAdmin_DeleteTable_sync] diff --git a/samples/generated_samples/bigtableadmin_v2_generated_bigtable_table_admin_drop_row_range_async.py b/samples/generated_samples/bigtableadmin_v2_generated_bigtable_table_admin_drop_row_range_async.py new file mode 100644 index 000000000..391205c7c --- /dev/null +++ b/samples/generated_samples/bigtableadmin_v2_generated_bigtable_table_admin_drop_row_range_async.py @@ -0,0 +1,51 @@ +# -*- coding: utf-8 -*- +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for DropRowRange +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-bigtable-admin + + +# [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. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import bigtable_admin_v2 + + +async def sample_drop_row_range(): + # Create a client + client = bigtable_admin_v2.BigtableTableAdminAsyncClient() + + # Initialize request argument(s) + request = bigtable_admin_v2.DropRowRangeRequest( + row_key_prefix=b'row_key_prefix_blob', + name="name_value", + ) + + # Make the request + await client.drop_row_range(request=request) + + +# [END bigtableadmin_v2_generated_BigtableTableAdmin_DropRowRange_async] diff --git a/samples/generated_samples/bigtableadmin_v2_generated_bigtable_table_admin_drop_row_range_sync.py b/samples/generated_samples/bigtableadmin_v2_generated_bigtable_table_admin_drop_row_range_sync.py new file mode 100644 index 000000000..bcd528f1a --- /dev/null +++ b/samples/generated_samples/bigtableadmin_v2_generated_bigtable_table_admin_drop_row_range_sync.py @@ -0,0 +1,51 @@ +# -*- coding: utf-8 -*- +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for DropRowRange +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-bigtable-admin + + +# [START bigtableadmin_v2_generated_BigtableTableAdmin_DropRowRange_sync] +# 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. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import bigtable_admin_v2 + + +def sample_drop_row_range(): + # Create a client + client = bigtable_admin_v2.BigtableTableAdminClient() + + # Initialize request argument(s) + request = bigtable_admin_v2.DropRowRangeRequest( + row_key_prefix=b'row_key_prefix_blob', + name="name_value", + ) + + # Make the request + client.drop_row_range(request=request) + + +# [END bigtableadmin_v2_generated_BigtableTableAdmin_DropRowRange_sync] diff --git a/samples/generated_samples/bigtableadmin_v2_generated_bigtable_table_admin_generate_consistency_token_async.py b/samples/generated_samples/bigtableadmin_v2_generated_bigtable_table_admin_generate_consistency_token_async.py new file mode 100644 index 000000000..1953441b6 --- /dev/null +++ b/samples/generated_samples/bigtableadmin_v2_generated_bigtable_table_admin_generate_consistency_token_async.py @@ -0,0 +1,52 @@ +# -*- coding: utf-8 -*- +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for GenerateConsistencyToken +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-bigtable-admin + + +# [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. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import bigtable_admin_v2 + + +async def sample_generate_consistency_token(): + # Create a client + client = bigtable_admin_v2.BigtableTableAdminAsyncClient() + + # Initialize request argument(s) + request = bigtable_admin_v2.GenerateConsistencyTokenRequest( + name="name_value", + ) + + # Make the request + response = await client.generate_consistency_token(request=request) + + # Handle the response + print(response) + +# [END bigtableadmin_v2_generated_BigtableTableAdmin_GenerateConsistencyToken_async] diff --git a/samples/generated_samples/bigtableadmin_v2_generated_bigtable_table_admin_generate_consistency_token_sync.py b/samples/generated_samples/bigtableadmin_v2_generated_bigtable_table_admin_generate_consistency_token_sync.py new file mode 100644 index 000000000..4ae52264d --- /dev/null +++ b/samples/generated_samples/bigtableadmin_v2_generated_bigtable_table_admin_generate_consistency_token_sync.py @@ -0,0 +1,52 @@ +# -*- coding: utf-8 -*- +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for GenerateConsistencyToken +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-bigtable-admin + + +# [START bigtableadmin_v2_generated_BigtableTableAdmin_GenerateConsistencyToken_sync] +# 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. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import bigtable_admin_v2 + + +def sample_generate_consistency_token(): + # Create a client + client = bigtable_admin_v2.BigtableTableAdminClient() + + # Initialize request argument(s) + request = bigtable_admin_v2.GenerateConsistencyTokenRequest( + name="name_value", + ) + + # Make the request + response = client.generate_consistency_token(request=request) + + # Handle the response + print(response) + +# [END bigtableadmin_v2_generated_BigtableTableAdmin_GenerateConsistencyToken_sync] diff --git a/samples/generated_samples/bigtableadmin_v2_generated_bigtable_table_admin_get_authorized_view_async.py b/samples/generated_samples/bigtableadmin_v2_generated_bigtable_table_admin_get_authorized_view_async.py new file mode 100644 index 000000000..129948bc5 --- /dev/null +++ b/samples/generated_samples/bigtableadmin_v2_generated_bigtable_table_admin_get_authorized_view_async.py @@ -0,0 +1,52 @@ +# -*- coding: utf-8 -*- +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for GetAuthorizedView +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-bigtable-admin + + +# [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. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import bigtable_admin_v2 + + +async def sample_get_authorized_view(): + # Create a client + client = bigtable_admin_v2.BigtableTableAdminAsyncClient() + + # Initialize request argument(s) + request = bigtable_admin_v2.GetAuthorizedViewRequest( + name="name_value", + ) + + # Make the request + response = await client.get_authorized_view(request=request) + + # Handle the response + print(response) + +# [END bigtableadmin_v2_generated_BigtableTableAdmin_GetAuthorizedView_async] diff --git a/samples/generated_samples/bigtableadmin_v2_generated_bigtable_table_admin_get_authorized_view_sync.py b/samples/generated_samples/bigtableadmin_v2_generated_bigtable_table_admin_get_authorized_view_sync.py new file mode 100644 index 000000000..9cc63538c --- /dev/null +++ b/samples/generated_samples/bigtableadmin_v2_generated_bigtable_table_admin_get_authorized_view_sync.py @@ -0,0 +1,52 @@ +# -*- coding: utf-8 -*- +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for GetAuthorizedView +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-bigtable-admin + + +# [START bigtableadmin_v2_generated_BigtableTableAdmin_GetAuthorizedView_sync] +# 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. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import bigtable_admin_v2 + + +def sample_get_authorized_view(): + # Create a client + client = bigtable_admin_v2.BigtableTableAdminClient() + + # Initialize request argument(s) + request = bigtable_admin_v2.GetAuthorizedViewRequest( + name="name_value", + ) + + # Make the request + response = client.get_authorized_view(request=request) + + # Handle the response + print(response) + +# [END bigtableadmin_v2_generated_BigtableTableAdmin_GetAuthorizedView_sync] diff --git a/samples/generated_samples/bigtableadmin_v2_generated_bigtable_table_admin_get_backup_async.py b/samples/generated_samples/bigtableadmin_v2_generated_bigtable_table_admin_get_backup_async.py new file mode 100644 index 000000000..524d63e86 --- /dev/null +++ b/samples/generated_samples/bigtableadmin_v2_generated_bigtable_table_admin_get_backup_async.py @@ -0,0 +1,52 @@ +# -*- coding: utf-8 -*- +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for GetBackup +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-bigtable-admin + + +# [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. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import bigtable_admin_v2 + + +async def sample_get_backup(): + # Create a client + client = bigtable_admin_v2.BigtableTableAdminAsyncClient() + + # Initialize request argument(s) + request = bigtable_admin_v2.GetBackupRequest( + name="name_value", + ) + + # Make the request + response = await client.get_backup(request=request) + + # Handle the response + print(response) + +# [END bigtableadmin_v2_generated_BigtableTableAdmin_GetBackup_async] diff --git a/samples/generated_samples/bigtableadmin_v2_generated_bigtable_table_admin_get_backup_sync.py b/samples/generated_samples/bigtableadmin_v2_generated_bigtable_table_admin_get_backup_sync.py new file mode 100644 index 000000000..5ed91b80c --- /dev/null +++ b/samples/generated_samples/bigtableadmin_v2_generated_bigtable_table_admin_get_backup_sync.py @@ -0,0 +1,52 @@ +# -*- coding: utf-8 -*- +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for GetBackup +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-bigtable-admin + + +# [START bigtableadmin_v2_generated_BigtableTableAdmin_GetBackup_sync] +# 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. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import bigtable_admin_v2 + + +def sample_get_backup(): + # Create a client + client = bigtable_admin_v2.BigtableTableAdminClient() + + # Initialize request argument(s) + request = bigtable_admin_v2.GetBackupRequest( + name="name_value", + ) + + # Make the request + response = client.get_backup(request=request) + + # Handle the response + print(response) + +# [END bigtableadmin_v2_generated_BigtableTableAdmin_GetBackup_sync] diff --git a/samples/generated_samples/bigtableadmin_v2_generated_bigtable_table_admin_get_iam_policy_async.py b/samples/generated_samples/bigtableadmin_v2_generated_bigtable_table_admin_get_iam_policy_async.py new file mode 100644 index 000000000..a599239d5 --- /dev/null +++ b/samples/generated_samples/bigtableadmin_v2_generated_bigtable_table_admin_get_iam_policy_async.py @@ -0,0 +1,53 @@ +# -*- coding: utf-8 -*- +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for GetIamPolicy +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-bigtable-admin + + +# [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. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import bigtable_admin_v2 +from google.iam.v1 import iam_policy_pb2 # type: ignore + + +async def sample_get_iam_policy(): + # Create a client + client = bigtable_admin_v2.BigtableTableAdminAsyncClient() + + # Initialize request argument(s) + request = iam_policy_pb2.GetIamPolicyRequest( + resource="resource_value", + ) + + # Make the request + response = await client.get_iam_policy(request=request) + + # Handle the response + print(response) + +# [END bigtableadmin_v2_generated_BigtableTableAdmin_GetIamPolicy_async] diff --git a/samples/generated_samples/bigtableadmin_v2_generated_bigtable_table_admin_get_iam_policy_sync.py b/samples/generated_samples/bigtableadmin_v2_generated_bigtable_table_admin_get_iam_policy_sync.py new file mode 100644 index 000000000..2d6e71c27 --- /dev/null +++ b/samples/generated_samples/bigtableadmin_v2_generated_bigtable_table_admin_get_iam_policy_sync.py @@ -0,0 +1,53 @@ +# -*- coding: utf-8 -*- +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for GetIamPolicy +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-bigtable-admin + + +# [START bigtableadmin_v2_generated_BigtableTableAdmin_GetIamPolicy_sync] +# 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. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import bigtable_admin_v2 +from google.iam.v1 import iam_policy_pb2 # type: ignore + + +def sample_get_iam_policy(): + # Create a client + client = bigtable_admin_v2.BigtableTableAdminClient() + + # Initialize request argument(s) + request = iam_policy_pb2.GetIamPolicyRequest( + resource="resource_value", + ) + + # Make the request + response = client.get_iam_policy(request=request) + + # Handle the response + print(response) + +# [END bigtableadmin_v2_generated_BigtableTableAdmin_GetIamPolicy_sync] diff --git a/samples/generated_samples/bigtableadmin_v2_generated_bigtable_table_admin_get_schema_bundle_async.py b/samples/generated_samples/bigtableadmin_v2_generated_bigtable_table_admin_get_schema_bundle_async.py new file mode 100644 index 000000000..b5e580276 --- /dev/null +++ b/samples/generated_samples/bigtableadmin_v2_generated_bigtable_table_admin_get_schema_bundle_async.py @@ -0,0 +1,52 @@ +# -*- coding: utf-8 -*- +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for GetSchemaBundle +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-bigtable-admin + + +# [START bigtableadmin_v2_generated_BigtableTableAdmin_GetSchemaBundle_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import bigtable_admin_v2 + + +async def sample_get_schema_bundle(): + # Create a client + client = bigtable_admin_v2.BigtableTableAdminAsyncClient() + + # Initialize request argument(s) + request = bigtable_admin_v2.GetSchemaBundleRequest( + name="name_value", + ) + + # Make the request + response = await client.get_schema_bundle(request=request) + + # Handle the response + print(response) + +# [END bigtableadmin_v2_generated_BigtableTableAdmin_GetSchemaBundle_async] diff --git a/samples/generated_samples/bigtableadmin_v2_generated_bigtable_table_admin_get_schema_bundle_sync.py b/samples/generated_samples/bigtableadmin_v2_generated_bigtable_table_admin_get_schema_bundle_sync.py new file mode 100644 index 000000000..1ea7b69b7 --- /dev/null +++ b/samples/generated_samples/bigtableadmin_v2_generated_bigtable_table_admin_get_schema_bundle_sync.py @@ -0,0 +1,52 @@ +# -*- coding: utf-8 -*- +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for GetSchemaBundle +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-bigtable-admin + + +# [START bigtableadmin_v2_generated_BigtableTableAdmin_GetSchemaBundle_sync] +# 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. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import bigtable_admin_v2 + + +def sample_get_schema_bundle(): + # Create a client + client = bigtable_admin_v2.BigtableTableAdminClient() + + # Initialize request argument(s) + request = bigtable_admin_v2.GetSchemaBundleRequest( + name="name_value", + ) + + # Make the request + response = client.get_schema_bundle(request=request) + + # Handle the response + print(response) + +# [END bigtableadmin_v2_generated_BigtableTableAdmin_GetSchemaBundle_sync] diff --git a/samples/generated_samples/bigtableadmin_v2_generated_bigtable_table_admin_get_snapshot_async.py b/samples/generated_samples/bigtableadmin_v2_generated_bigtable_table_admin_get_snapshot_async.py new file mode 100644 index 000000000..ae48060bb --- /dev/null +++ b/samples/generated_samples/bigtableadmin_v2_generated_bigtable_table_admin_get_snapshot_async.py @@ -0,0 +1,52 @@ +# -*- coding: utf-8 -*- +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for GetSnapshot +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-bigtable-admin + + +# [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. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import bigtable_admin_v2 + + +async def sample_get_snapshot(): + # Create a client + client = bigtable_admin_v2.BigtableTableAdminAsyncClient() + + # Initialize request argument(s) + request = bigtable_admin_v2.GetSnapshotRequest( + name="name_value", + ) + + # Make the request + response = await client.get_snapshot(request=request) + + # Handle the response + print(response) + +# [END bigtableadmin_v2_generated_BigtableTableAdmin_GetSnapshot_async] diff --git a/samples/generated_samples/bigtableadmin_v2_generated_bigtable_table_admin_get_snapshot_sync.py b/samples/generated_samples/bigtableadmin_v2_generated_bigtable_table_admin_get_snapshot_sync.py new file mode 100644 index 000000000..8626549fd --- /dev/null +++ b/samples/generated_samples/bigtableadmin_v2_generated_bigtable_table_admin_get_snapshot_sync.py @@ -0,0 +1,52 @@ +# -*- coding: utf-8 -*- +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for GetSnapshot +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-bigtable-admin + + +# [START bigtableadmin_v2_generated_BigtableTableAdmin_GetSnapshot_sync] +# 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. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import bigtable_admin_v2 + + +def sample_get_snapshot(): + # Create a client + client = bigtable_admin_v2.BigtableTableAdminClient() + + # Initialize request argument(s) + request = bigtable_admin_v2.GetSnapshotRequest( + name="name_value", + ) + + # Make the request + response = client.get_snapshot(request=request) + + # Handle the response + print(response) + +# [END bigtableadmin_v2_generated_BigtableTableAdmin_GetSnapshot_sync] diff --git a/samples/generated_samples/bigtableadmin_v2_generated_bigtable_table_admin_get_table_async.py b/samples/generated_samples/bigtableadmin_v2_generated_bigtable_table_admin_get_table_async.py new file mode 100644 index 000000000..ff8dff1ae --- /dev/null +++ b/samples/generated_samples/bigtableadmin_v2_generated_bigtable_table_admin_get_table_async.py @@ -0,0 +1,52 @@ +# -*- coding: utf-8 -*- +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for GetTable +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-bigtable-admin + + +# [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. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import bigtable_admin_v2 + + +async def sample_get_table(): + # Create a client + client = bigtable_admin_v2.BigtableTableAdminAsyncClient() + + # Initialize request argument(s) + request = bigtable_admin_v2.GetTableRequest( + name="name_value", + ) + + # Make the request + response = await client.get_table(request=request) + + # Handle the response + print(response) + +# [END bigtableadmin_v2_generated_BigtableTableAdmin_GetTable_async] diff --git a/samples/generated_samples/bigtableadmin_v2_generated_bigtable_table_admin_get_table_sync.py b/samples/generated_samples/bigtableadmin_v2_generated_bigtable_table_admin_get_table_sync.py new file mode 100644 index 000000000..ccb68b766 --- /dev/null +++ b/samples/generated_samples/bigtableadmin_v2_generated_bigtable_table_admin_get_table_sync.py @@ -0,0 +1,52 @@ +# -*- coding: utf-8 -*- +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for GetTable +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-bigtable-admin + + +# [START bigtableadmin_v2_generated_BigtableTableAdmin_GetTable_sync] +# 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. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import bigtable_admin_v2 + + +def sample_get_table(): + # Create a client + client = bigtable_admin_v2.BigtableTableAdminClient() + + # Initialize request argument(s) + request = bigtable_admin_v2.GetTableRequest( + name="name_value", + ) + + # Make the request + response = client.get_table(request=request) + + # Handle the response + print(response) + +# [END bigtableadmin_v2_generated_BigtableTableAdmin_GetTable_sync] diff --git a/samples/generated_samples/bigtableadmin_v2_generated_bigtable_table_admin_list_authorized_views_async.py b/samples/generated_samples/bigtableadmin_v2_generated_bigtable_table_admin_list_authorized_views_async.py new file mode 100644 index 000000000..658b8f96a --- /dev/null +++ b/samples/generated_samples/bigtableadmin_v2_generated_bigtable_table_admin_list_authorized_views_async.py @@ -0,0 +1,53 @@ +# -*- coding: utf-8 -*- +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for ListAuthorizedViews +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-bigtable-admin + + +# [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. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import bigtable_admin_v2 + + +async def sample_list_authorized_views(): + # Create a client + client = bigtable_admin_v2.BigtableTableAdminAsyncClient() + + # Initialize request argument(s) + request = bigtable_admin_v2.ListAuthorizedViewsRequest( + parent="parent_value", + ) + + # Make the request + page_result = client.list_authorized_views(request=request) + + # Handle the response + async for response in page_result: + print(response) + +# [END bigtableadmin_v2_generated_BigtableTableAdmin_ListAuthorizedViews_async] diff --git a/samples/generated_samples/bigtableadmin_v2_generated_bigtable_table_admin_list_authorized_views_sync.py b/samples/generated_samples/bigtableadmin_v2_generated_bigtable_table_admin_list_authorized_views_sync.py new file mode 100644 index 000000000..a7bf4b6ad --- /dev/null +++ b/samples/generated_samples/bigtableadmin_v2_generated_bigtable_table_admin_list_authorized_views_sync.py @@ -0,0 +1,53 @@ +# -*- coding: utf-8 -*- +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for ListAuthorizedViews +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-bigtable-admin + + +# [START bigtableadmin_v2_generated_BigtableTableAdmin_ListAuthorizedViews_sync] +# 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. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import bigtable_admin_v2 + + +def sample_list_authorized_views(): + # Create a client + client = bigtable_admin_v2.BigtableTableAdminClient() + + # Initialize request argument(s) + request = bigtable_admin_v2.ListAuthorizedViewsRequest( + parent="parent_value", + ) + + # Make the request + page_result = client.list_authorized_views(request=request) + + # Handle the response + for response in page_result: + print(response) + +# [END bigtableadmin_v2_generated_BigtableTableAdmin_ListAuthorizedViews_sync] diff --git a/samples/generated_samples/bigtableadmin_v2_generated_bigtable_table_admin_list_backups_async.py b/samples/generated_samples/bigtableadmin_v2_generated_bigtable_table_admin_list_backups_async.py new file mode 100644 index 000000000..368c376f0 --- /dev/null +++ b/samples/generated_samples/bigtableadmin_v2_generated_bigtable_table_admin_list_backups_async.py @@ -0,0 +1,53 @@ +# -*- coding: utf-8 -*- +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for ListBackups +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-bigtable-admin + + +# [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. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import bigtable_admin_v2 + + +async def sample_list_backups(): + # Create a client + client = bigtable_admin_v2.BigtableTableAdminAsyncClient() + + # Initialize request argument(s) + request = bigtable_admin_v2.ListBackupsRequest( + parent="parent_value", + ) + + # Make the request + page_result = client.list_backups(request=request) + + # Handle the response + async for response in page_result: + print(response) + +# [END bigtableadmin_v2_generated_BigtableTableAdmin_ListBackups_async] diff --git a/samples/generated_samples/bigtableadmin_v2_generated_bigtable_table_admin_list_backups_sync.py b/samples/generated_samples/bigtableadmin_v2_generated_bigtable_table_admin_list_backups_sync.py new file mode 100644 index 000000000..ca0e3e0f2 --- /dev/null +++ b/samples/generated_samples/bigtableadmin_v2_generated_bigtable_table_admin_list_backups_sync.py @@ -0,0 +1,53 @@ +# -*- coding: utf-8 -*- +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for ListBackups +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-bigtable-admin + + +# [START bigtableadmin_v2_generated_BigtableTableAdmin_ListBackups_sync] +# 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. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import bigtable_admin_v2 + + +def sample_list_backups(): + # Create a client + client = bigtable_admin_v2.BigtableTableAdminClient() + + # Initialize request argument(s) + request = bigtable_admin_v2.ListBackupsRequest( + parent="parent_value", + ) + + # Make the request + page_result = client.list_backups(request=request) + + # Handle the response + for response in page_result: + print(response) + +# [END bigtableadmin_v2_generated_BigtableTableAdmin_ListBackups_sync] diff --git a/samples/generated_samples/bigtableadmin_v2_generated_bigtable_table_admin_list_schema_bundles_async.py b/samples/generated_samples/bigtableadmin_v2_generated_bigtable_table_admin_list_schema_bundles_async.py new file mode 100644 index 000000000..3daf30e6d --- /dev/null +++ b/samples/generated_samples/bigtableadmin_v2_generated_bigtable_table_admin_list_schema_bundles_async.py @@ -0,0 +1,53 @@ +# -*- coding: utf-8 -*- +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for ListSchemaBundles +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-bigtable-admin + + +# [START bigtableadmin_v2_generated_BigtableTableAdmin_ListSchemaBundles_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import bigtable_admin_v2 + + +async def sample_list_schema_bundles(): + # Create a client + client = bigtable_admin_v2.BigtableTableAdminAsyncClient() + + # Initialize request argument(s) + request = bigtable_admin_v2.ListSchemaBundlesRequest( + parent="parent_value", + ) + + # Make the request + page_result = client.list_schema_bundles(request=request) + + # Handle the response + async for response in page_result: + print(response) + +# [END bigtableadmin_v2_generated_BigtableTableAdmin_ListSchemaBundles_async] diff --git a/samples/generated_samples/bigtableadmin_v2_generated_bigtable_table_admin_list_schema_bundles_sync.py b/samples/generated_samples/bigtableadmin_v2_generated_bigtable_table_admin_list_schema_bundles_sync.py new file mode 100644 index 000000000..945d606bb --- /dev/null +++ b/samples/generated_samples/bigtableadmin_v2_generated_bigtable_table_admin_list_schema_bundles_sync.py @@ -0,0 +1,53 @@ +# -*- coding: utf-8 -*- +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for ListSchemaBundles +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-bigtable-admin + + +# [START bigtableadmin_v2_generated_BigtableTableAdmin_ListSchemaBundles_sync] +# 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. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import bigtable_admin_v2 + + +def sample_list_schema_bundles(): + # Create a client + client = bigtable_admin_v2.BigtableTableAdminClient() + + # Initialize request argument(s) + request = bigtable_admin_v2.ListSchemaBundlesRequest( + parent="parent_value", + ) + + # Make the request + page_result = client.list_schema_bundles(request=request) + + # Handle the response + for response in page_result: + print(response) + +# [END bigtableadmin_v2_generated_BigtableTableAdmin_ListSchemaBundles_sync] diff --git a/samples/generated_samples/bigtableadmin_v2_generated_bigtable_table_admin_list_snapshots_async.py b/samples/generated_samples/bigtableadmin_v2_generated_bigtable_table_admin_list_snapshots_async.py new file mode 100644 index 000000000..91acb1d9e --- /dev/null +++ b/samples/generated_samples/bigtableadmin_v2_generated_bigtable_table_admin_list_snapshots_async.py @@ -0,0 +1,53 @@ +# -*- coding: utf-8 -*- +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for ListSnapshots +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-bigtable-admin + + +# [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. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import bigtable_admin_v2 + + +async def sample_list_snapshots(): + # Create a client + client = bigtable_admin_v2.BigtableTableAdminAsyncClient() + + # Initialize request argument(s) + request = bigtable_admin_v2.ListSnapshotsRequest( + parent="parent_value", + ) + + # Make the request + page_result = client.list_snapshots(request=request) + + # Handle the response + async for response in page_result: + print(response) + +# [END bigtableadmin_v2_generated_BigtableTableAdmin_ListSnapshots_async] diff --git a/samples/generated_samples/bigtableadmin_v2_generated_bigtable_table_admin_list_snapshots_sync.py b/samples/generated_samples/bigtableadmin_v2_generated_bigtable_table_admin_list_snapshots_sync.py new file mode 100644 index 000000000..7f809156f --- /dev/null +++ b/samples/generated_samples/bigtableadmin_v2_generated_bigtable_table_admin_list_snapshots_sync.py @@ -0,0 +1,53 @@ +# -*- coding: utf-8 -*- +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for ListSnapshots +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-bigtable-admin + + +# [START bigtableadmin_v2_generated_BigtableTableAdmin_ListSnapshots_sync] +# 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. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import bigtable_admin_v2 + + +def sample_list_snapshots(): + # Create a client + client = bigtable_admin_v2.BigtableTableAdminClient() + + # Initialize request argument(s) + request = bigtable_admin_v2.ListSnapshotsRequest( + parent="parent_value", + ) + + # Make the request + page_result = client.list_snapshots(request=request) + + # Handle the response + for response in page_result: + print(response) + +# [END bigtableadmin_v2_generated_BigtableTableAdmin_ListSnapshots_sync] diff --git a/samples/generated_samples/bigtableadmin_v2_generated_bigtable_table_admin_list_tables_async.py b/samples/generated_samples/bigtableadmin_v2_generated_bigtable_table_admin_list_tables_async.py new file mode 100644 index 000000000..191de0fc7 --- /dev/null +++ b/samples/generated_samples/bigtableadmin_v2_generated_bigtable_table_admin_list_tables_async.py @@ -0,0 +1,53 @@ +# -*- coding: utf-8 -*- +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for ListTables +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-bigtable-admin + + +# [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. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import bigtable_admin_v2 + + +async def sample_list_tables(): + # Create a client + client = bigtable_admin_v2.BigtableTableAdminAsyncClient() + + # Initialize request argument(s) + request = bigtable_admin_v2.ListTablesRequest( + parent="parent_value", + ) + + # Make the request + page_result = client.list_tables(request=request) + + # Handle the response + async for response in page_result: + print(response) + +# [END bigtableadmin_v2_generated_BigtableTableAdmin_ListTables_async] diff --git a/samples/generated_samples/bigtableadmin_v2_generated_bigtable_table_admin_list_tables_sync.py b/samples/generated_samples/bigtableadmin_v2_generated_bigtable_table_admin_list_tables_sync.py new file mode 100644 index 000000000..5d0f3a278 --- /dev/null +++ b/samples/generated_samples/bigtableadmin_v2_generated_bigtable_table_admin_list_tables_sync.py @@ -0,0 +1,53 @@ +# -*- coding: utf-8 -*- +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for ListTables +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-bigtable-admin + + +# [START bigtableadmin_v2_generated_BigtableTableAdmin_ListTables_sync] +# 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. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import bigtable_admin_v2 + + +def sample_list_tables(): + # Create a client + client = bigtable_admin_v2.BigtableTableAdminClient() + + # Initialize request argument(s) + request = bigtable_admin_v2.ListTablesRequest( + parent="parent_value", + ) + + # Make the request + page_result = client.list_tables(request=request) + + # Handle the response + for response in page_result: + print(response) + +# [END bigtableadmin_v2_generated_BigtableTableAdmin_ListTables_sync] diff --git a/samples/generated_samples/bigtableadmin_v2_generated_bigtable_table_admin_modify_column_families_async.py b/samples/generated_samples/bigtableadmin_v2_generated_bigtable_table_admin_modify_column_families_async.py new file mode 100644 index 000000000..2c206eb44 --- /dev/null +++ b/samples/generated_samples/bigtableadmin_v2_generated_bigtable_table_admin_modify_column_families_async.py @@ -0,0 +1,52 @@ +# -*- coding: utf-8 -*- +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for ModifyColumnFamilies +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-bigtable-admin + + +# [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. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import bigtable_admin_v2 + + +async def sample_modify_column_families(): + # Create a client + client = bigtable_admin_v2.BigtableTableAdminAsyncClient() + + # Initialize request argument(s) + request = bigtable_admin_v2.ModifyColumnFamiliesRequest( + name="name_value", + ) + + # Make the request + response = await client.modify_column_families(request=request) + + # Handle the response + print(response) + +# [END bigtableadmin_v2_generated_BigtableTableAdmin_ModifyColumnFamilies_async] diff --git a/samples/generated_samples/bigtableadmin_v2_generated_bigtable_table_admin_modify_column_families_sync.py b/samples/generated_samples/bigtableadmin_v2_generated_bigtable_table_admin_modify_column_families_sync.py new file mode 100644 index 000000000..6224f5c5e --- /dev/null +++ b/samples/generated_samples/bigtableadmin_v2_generated_bigtable_table_admin_modify_column_families_sync.py @@ -0,0 +1,52 @@ +# -*- coding: utf-8 -*- +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for ModifyColumnFamilies +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-bigtable-admin + + +# [START bigtableadmin_v2_generated_BigtableTableAdmin_ModifyColumnFamilies_sync] +# 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. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import bigtable_admin_v2 + + +def sample_modify_column_families(): + # Create a client + client = bigtable_admin_v2.BigtableTableAdminClient() + + # Initialize request argument(s) + request = bigtable_admin_v2.ModifyColumnFamiliesRequest( + name="name_value", + ) + + # Make the request + response = client.modify_column_families(request=request) + + # Handle the response + print(response) + +# [END bigtableadmin_v2_generated_BigtableTableAdmin_ModifyColumnFamilies_sync] diff --git a/samples/generated_samples/bigtableadmin_v2_generated_bigtable_table_admin_restore_table_async_internal.py b/samples/generated_samples/bigtableadmin_v2_generated_bigtable_table_admin_restore_table_async_internal.py new file mode 100644 index 000000000..f70b5da17 --- /dev/null +++ b/samples/generated_samples/bigtableadmin_v2_generated_bigtable_table_admin_restore_table_async_internal.py @@ -0,0 +1,58 @@ +# -*- coding: utf-8 -*- +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for RestoreTable +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-bigtable-admin + + +# [START bigtableadmin_v2_generated_BigtableTableAdmin_RestoreTable_async_internal] +# 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. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import bigtable_admin_v2 + + +async def sample_restore_table(): + # Create a client + client = bigtable_admin_v2.BigtableTableAdminAsyncClient() + + # Initialize request argument(s) + request = bigtable_admin_v2.RestoreTableRequest( + backup="backup_value", + parent="parent_value", + table_id="table_id_value", + ) + + # Make the request + operation = client._restore_table(request=request) + + print("Waiting for operation to complete...") + + response = (await operation).result() + + # Handle the response + print(response) + +# [END bigtableadmin_v2_generated_BigtableTableAdmin_RestoreTable_async_internal] diff --git a/samples/generated_samples/bigtableadmin_v2_generated_bigtable_table_admin_restore_table_sync_internal.py b/samples/generated_samples/bigtableadmin_v2_generated_bigtable_table_admin_restore_table_sync_internal.py new file mode 100644 index 000000000..45621c22b --- /dev/null +++ b/samples/generated_samples/bigtableadmin_v2_generated_bigtable_table_admin_restore_table_sync_internal.py @@ -0,0 +1,58 @@ +# -*- coding: utf-8 -*- +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for RestoreTable +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-bigtable-admin + + +# [START bigtableadmin_v2_generated_BigtableTableAdmin_RestoreTable_sync_internal] +# 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. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import bigtable_admin_v2 + + +def sample_restore_table(): + # Create a client + client = bigtable_admin_v2.BigtableTableAdminClient() + + # Initialize request argument(s) + request = bigtable_admin_v2.RestoreTableRequest( + backup="backup_value", + parent="parent_value", + table_id="table_id_value", + ) + + # Make the request + operation = client._restore_table(request=request) + + print("Waiting for operation to complete...") + + response = operation.result() + + # Handle the response + print(response) + +# [END bigtableadmin_v2_generated_BigtableTableAdmin_RestoreTable_sync_internal] diff --git a/samples/generated_samples/bigtableadmin_v2_generated_bigtable_table_admin_set_iam_policy_async.py b/samples/generated_samples/bigtableadmin_v2_generated_bigtable_table_admin_set_iam_policy_async.py new file mode 100644 index 000000000..cbfafdc77 --- /dev/null +++ b/samples/generated_samples/bigtableadmin_v2_generated_bigtable_table_admin_set_iam_policy_async.py @@ -0,0 +1,53 @@ +# -*- coding: utf-8 -*- +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for SetIamPolicy +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-bigtable-admin + + +# [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. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import bigtable_admin_v2 +from google.iam.v1 import iam_policy_pb2 # type: ignore + + +async def sample_set_iam_policy(): + # Create a client + client = bigtable_admin_v2.BigtableTableAdminAsyncClient() + + # Initialize request argument(s) + request = iam_policy_pb2.SetIamPolicyRequest( + resource="resource_value", + ) + + # Make the request + response = await client.set_iam_policy(request=request) + + # Handle the response + print(response) + +# [END bigtableadmin_v2_generated_BigtableTableAdmin_SetIamPolicy_async] diff --git a/samples/generated_samples/bigtableadmin_v2_generated_bigtable_table_admin_set_iam_policy_sync.py b/samples/generated_samples/bigtableadmin_v2_generated_bigtable_table_admin_set_iam_policy_sync.py new file mode 100644 index 000000000..9a6c5fcc2 --- /dev/null +++ b/samples/generated_samples/bigtableadmin_v2_generated_bigtable_table_admin_set_iam_policy_sync.py @@ -0,0 +1,53 @@ +# -*- coding: utf-8 -*- +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for SetIamPolicy +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-bigtable-admin + + +# [START bigtableadmin_v2_generated_BigtableTableAdmin_SetIamPolicy_sync] +# 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. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import bigtable_admin_v2 +from google.iam.v1 import iam_policy_pb2 # type: ignore + + +def sample_set_iam_policy(): + # Create a client + client = bigtable_admin_v2.BigtableTableAdminClient() + + # Initialize request argument(s) + request = iam_policy_pb2.SetIamPolicyRequest( + resource="resource_value", + ) + + # Make the request + response = client.set_iam_policy(request=request) + + # Handle the response + print(response) + +# [END bigtableadmin_v2_generated_BigtableTableAdmin_SetIamPolicy_sync] diff --git a/samples/generated_samples/bigtableadmin_v2_generated_bigtable_table_admin_snapshot_table_async.py b/samples/generated_samples/bigtableadmin_v2_generated_bigtable_table_admin_snapshot_table_async.py new file mode 100644 index 000000000..6ff619e85 --- /dev/null +++ b/samples/generated_samples/bigtableadmin_v2_generated_bigtable_table_admin_snapshot_table_async.py @@ -0,0 +1,58 @@ +# -*- coding: utf-8 -*- +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for SnapshotTable +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-bigtable-admin + + +# [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. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import bigtable_admin_v2 + + +async def sample_snapshot_table(): + # Create a client + client = bigtable_admin_v2.BigtableTableAdminAsyncClient() + + # Initialize request argument(s) + request = bigtable_admin_v2.SnapshotTableRequest( + name="name_value", + cluster="cluster_value", + snapshot_id="snapshot_id_value", + ) + + # Make the request + operation = client.snapshot_table(request=request) + + print("Waiting for operation to complete...") + + response = (await operation).result() + + # Handle the response + print(response) + +# [END bigtableadmin_v2_generated_BigtableTableAdmin_SnapshotTable_async] diff --git a/samples/generated_samples/bigtableadmin_v2_generated_bigtable_table_admin_snapshot_table_sync.py b/samples/generated_samples/bigtableadmin_v2_generated_bigtable_table_admin_snapshot_table_sync.py new file mode 100644 index 000000000..f983f7824 --- /dev/null +++ b/samples/generated_samples/bigtableadmin_v2_generated_bigtable_table_admin_snapshot_table_sync.py @@ -0,0 +1,58 @@ +# -*- coding: utf-8 -*- +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for SnapshotTable +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-bigtable-admin + + +# [START bigtableadmin_v2_generated_BigtableTableAdmin_SnapshotTable_sync] +# 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. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import bigtable_admin_v2 + + +def sample_snapshot_table(): + # Create a client + client = bigtable_admin_v2.BigtableTableAdminClient() + + # Initialize request argument(s) + request = bigtable_admin_v2.SnapshotTableRequest( + name="name_value", + cluster="cluster_value", + snapshot_id="snapshot_id_value", + ) + + # Make the request + operation = client.snapshot_table(request=request) + + print("Waiting for operation to complete...") + + response = operation.result() + + # Handle the response + print(response) + +# [END bigtableadmin_v2_generated_BigtableTableAdmin_SnapshotTable_sync] diff --git a/samples/generated_samples/bigtableadmin_v2_generated_bigtable_table_admin_test_iam_permissions_async.py b/samples/generated_samples/bigtableadmin_v2_generated_bigtable_table_admin_test_iam_permissions_async.py new file mode 100644 index 000000000..ee5fe6027 --- /dev/null +++ b/samples/generated_samples/bigtableadmin_v2_generated_bigtable_table_admin_test_iam_permissions_async.py @@ -0,0 +1,54 @@ +# -*- coding: utf-8 -*- +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for TestIamPermissions +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-bigtable-admin + + +# [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. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import bigtable_admin_v2 +from google.iam.v1 import iam_policy_pb2 # type: ignore + + +async def sample_test_iam_permissions(): + # Create a client + client = bigtable_admin_v2.BigtableTableAdminAsyncClient() + + # Initialize request argument(s) + request = iam_policy_pb2.TestIamPermissionsRequest( + resource="resource_value", + permissions=['permissions_value1', 'permissions_value2'], + ) + + # Make the request + response = await client.test_iam_permissions(request=request) + + # Handle the response + print(response) + +# [END bigtableadmin_v2_generated_BigtableTableAdmin_TestIamPermissions_async] diff --git a/samples/generated_samples/bigtableadmin_v2_generated_bigtable_table_admin_test_iam_permissions_sync.py b/samples/generated_samples/bigtableadmin_v2_generated_bigtable_table_admin_test_iam_permissions_sync.py new file mode 100644 index 000000000..46f0870b0 --- /dev/null +++ b/samples/generated_samples/bigtableadmin_v2_generated_bigtable_table_admin_test_iam_permissions_sync.py @@ -0,0 +1,54 @@ +# -*- coding: utf-8 -*- +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for TestIamPermissions +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-bigtable-admin + + +# [START bigtableadmin_v2_generated_BigtableTableAdmin_TestIamPermissions_sync] +# 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. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import bigtable_admin_v2 +from google.iam.v1 import iam_policy_pb2 # type: ignore + + +def sample_test_iam_permissions(): + # Create a client + client = bigtable_admin_v2.BigtableTableAdminClient() + + # Initialize request argument(s) + request = iam_policy_pb2.TestIamPermissionsRequest( + resource="resource_value", + permissions=['permissions_value1', 'permissions_value2'], + ) + + # Make the request + response = client.test_iam_permissions(request=request) + + # Handle the response + print(response) + +# [END bigtableadmin_v2_generated_BigtableTableAdmin_TestIamPermissions_sync] diff --git a/samples/generated_samples/bigtableadmin_v2_generated_bigtable_table_admin_undelete_table_async.py b/samples/generated_samples/bigtableadmin_v2_generated_bigtable_table_admin_undelete_table_async.py new file mode 100644 index 000000000..1e2f6aa5a --- /dev/null +++ b/samples/generated_samples/bigtableadmin_v2_generated_bigtable_table_admin_undelete_table_async.py @@ -0,0 +1,56 @@ +# -*- coding: utf-8 -*- +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for UndeleteTable +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-bigtable-admin + + +# [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. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import bigtable_admin_v2 + + +async def sample_undelete_table(): + # Create a client + client = bigtable_admin_v2.BigtableTableAdminAsyncClient() + + # Initialize request argument(s) + request = bigtable_admin_v2.UndeleteTableRequest( + name="name_value", + ) + + # Make the request + operation = client.undelete_table(request=request) + + print("Waiting for operation to complete...") + + response = (await operation).result() + + # Handle the response + print(response) + +# [END bigtableadmin_v2_generated_BigtableTableAdmin_UndeleteTable_async] diff --git a/samples/generated_samples/bigtableadmin_v2_generated_bigtable_table_admin_undelete_table_sync.py b/samples/generated_samples/bigtableadmin_v2_generated_bigtable_table_admin_undelete_table_sync.py new file mode 100644 index 000000000..637afee8b --- /dev/null +++ b/samples/generated_samples/bigtableadmin_v2_generated_bigtable_table_admin_undelete_table_sync.py @@ -0,0 +1,56 @@ +# -*- coding: utf-8 -*- +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for UndeleteTable +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-bigtable-admin + + +# [START bigtableadmin_v2_generated_BigtableTableAdmin_UndeleteTable_sync] +# 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. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import bigtable_admin_v2 + + +def sample_undelete_table(): + # Create a client + client = bigtable_admin_v2.BigtableTableAdminClient() + + # Initialize request argument(s) + request = bigtable_admin_v2.UndeleteTableRequest( + name="name_value", + ) + + # Make the request + operation = client.undelete_table(request=request) + + print("Waiting for operation to complete...") + + response = operation.result() + + # Handle the response + print(response) + +# [END bigtableadmin_v2_generated_BigtableTableAdmin_UndeleteTable_sync] diff --git a/samples/generated_samples/bigtableadmin_v2_generated_bigtable_table_admin_update_authorized_view_async.py b/samples/generated_samples/bigtableadmin_v2_generated_bigtable_table_admin_update_authorized_view_async.py new file mode 100644 index 000000000..541427d48 --- /dev/null +++ b/samples/generated_samples/bigtableadmin_v2_generated_bigtable_table_admin_update_authorized_view_async.py @@ -0,0 +1,55 @@ +# -*- coding: utf-8 -*- +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for UpdateAuthorizedView +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-bigtable-admin + + +# [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. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import bigtable_admin_v2 + + +async def sample_update_authorized_view(): + # Create a client + client = bigtable_admin_v2.BigtableTableAdminAsyncClient() + + # Initialize request argument(s) + request = bigtable_admin_v2.UpdateAuthorizedViewRequest( + ) + + # Make the request + operation = client.update_authorized_view(request=request) + + print("Waiting for operation to complete...") + + response = (await operation).result() + + # Handle the response + print(response) + +# [END bigtableadmin_v2_generated_BigtableTableAdmin_UpdateAuthorizedView_async] diff --git a/samples/generated_samples/bigtableadmin_v2_generated_bigtable_table_admin_update_authorized_view_sync.py b/samples/generated_samples/bigtableadmin_v2_generated_bigtable_table_admin_update_authorized_view_sync.py new file mode 100644 index 000000000..9c8198d9a --- /dev/null +++ b/samples/generated_samples/bigtableadmin_v2_generated_bigtable_table_admin_update_authorized_view_sync.py @@ -0,0 +1,55 @@ +# -*- coding: utf-8 -*- +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for UpdateAuthorizedView +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-bigtable-admin + + +# [START bigtableadmin_v2_generated_BigtableTableAdmin_UpdateAuthorizedView_sync] +# 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. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import bigtable_admin_v2 + + +def sample_update_authorized_view(): + # Create a client + client = bigtable_admin_v2.BigtableTableAdminClient() + + # Initialize request argument(s) + request = bigtable_admin_v2.UpdateAuthorizedViewRequest( + ) + + # Make the request + operation = client.update_authorized_view(request=request) + + print("Waiting for operation to complete...") + + response = operation.result() + + # Handle the response + print(response) + +# [END bigtableadmin_v2_generated_BigtableTableAdmin_UpdateAuthorizedView_sync] diff --git a/samples/generated_samples/bigtableadmin_v2_generated_bigtable_table_admin_update_backup_async.py b/samples/generated_samples/bigtableadmin_v2_generated_bigtable_table_admin_update_backup_async.py new file mode 100644 index 000000000..f98e1e33a --- /dev/null +++ b/samples/generated_samples/bigtableadmin_v2_generated_bigtable_table_admin_update_backup_async.py @@ -0,0 +1,55 @@ +# -*- coding: utf-8 -*- +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for UpdateBackup +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-bigtable-admin + + +# [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. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import bigtable_admin_v2 + + +async def sample_update_backup(): + # Create a client + client = bigtable_admin_v2.BigtableTableAdminAsyncClient() + + # Initialize request argument(s) + backup = bigtable_admin_v2.Backup() + backup.source_table = "source_table_value" + + request = bigtable_admin_v2.UpdateBackupRequest( + backup=backup, + ) + + # Make the request + response = await client.update_backup(request=request) + + # Handle the response + print(response) + +# [END bigtableadmin_v2_generated_BigtableTableAdmin_UpdateBackup_async] diff --git a/samples/generated_samples/bigtableadmin_v2_generated_bigtable_table_admin_update_backup_sync.py b/samples/generated_samples/bigtableadmin_v2_generated_bigtable_table_admin_update_backup_sync.py new file mode 100644 index 000000000..466a3decb --- /dev/null +++ b/samples/generated_samples/bigtableadmin_v2_generated_bigtable_table_admin_update_backup_sync.py @@ -0,0 +1,55 @@ +# -*- coding: utf-8 -*- +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for UpdateBackup +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-bigtable-admin + + +# [START bigtableadmin_v2_generated_BigtableTableAdmin_UpdateBackup_sync] +# 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. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import bigtable_admin_v2 + + +def sample_update_backup(): + # Create a client + client = bigtable_admin_v2.BigtableTableAdminClient() + + # Initialize request argument(s) + backup = bigtable_admin_v2.Backup() + backup.source_table = "source_table_value" + + request = bigtable_admin_v2.UpdateBackupRequest( + backup=backup, + ) + + # Make the request + response = client.update_backup(request=request) + + # Handle the response + print(response) + +# [END bigtableadmin_v2_generated_BigtableTableAdmin_UpdateBackup_sync] diff --git a/samples/generated_samples/bigtableadmin_v2_generated_bigtable_table_admin_update_schema_bundle_async.py b/samples/generated_samples/bigtableadmin_v2_generated_bigtable_table_admin_update_schema_bundle_async.py new file mode 100644 index 000000000..96447088e --- /dev/null +++ b/samples/generated_samples/bigtableadmin_v2_generated_bigtable_table_admin_update_schema_bundle_async.py @@ -0,0 +1,59 @@ +# -*- coding: utf-8 -*- +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for UpdateSchemaBundle +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-bigtable-admin + + +# [START bigtableadmin_v2_generated_BigtableTableAdmin_UpdateSchemaBundle_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import bigtable_admin_v2 + + +async def sample_update_schema_bundle(): + # Create a client + client = bigtable_admin_v2.BigtableTableAdminAsyncClient() + + # Initialize request argument(s) + schema_bundle = bigtable_admin_v2.SchemaBundle() + schema_bundle.proto_schema.proto_descriptors = b'proto_descriptors_blob' + + request = bigtable_admin_v2.UpdateSchemaBundleRequest( + schema_bundle=schema_bundle, + ) + + # Make the request + operation = client.update_schema_bundle(request=request) + + print("Waiting for operation to complete...") + + response = (await operation).result() + + # Handle the response + print(response) + +# [END bigtableadmin_v2_generated_BigtableTableAdmin_UpdateSchemaBundle_async] diff --git a/samples/generated_samples/bigtableadmin_v2_generated_bigtable_table_admin_update_schema_bundle_sync.py b/samples/generated_samples/bigtableadmin_v2_generated_bigtable_table_admin_update_schema_bundle_sync.py new file mode 100644 index 000000000..075683060 --- /dev/null +++ b/samples/generated_samples/bigtableadmin_v2_generated_bigtable_table_admin_update_schema_bundle_sync.py @@ -0,0 +1,59 @@ +# -*- coding: utf-8 -*- +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for UpdateSchemaBundle +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-bigtable-admin + + +# [START bigtableadmin_v2_generated_BigtableTableAdmin_UpdateSchemaBundle_sync] +# 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. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import bigtable_admin_v2 + + +def sample_update_schema_bundle(): + # Create a client + client = bigtable_admin_v2.BigtableTableAdminClient() + + # Initialize request argument(s) + schema_bundle = bigtable_admin_v2.SchemaBundle() + schema_bundle.proto_schema.proto_descriptors = b'proto_descriptors_blob' + + request = bigtable_admin_v2.UpdateSchemaBundleRequest( + schema_bundle=schema_bundle, + ) + + # Make the request + operation = client.update_schema_bundle(request=request) + + print("Waiting for operation to complete...") + + response = operation.result() + + # Handle the response + print(response) + +# [END bigtableadmin_v2_generated_BigtableTableAdmin_UpdateSchemaBundle_sync] diff --git a/samples/generated_samples/bigtableadmin_v2_generated_bigtable_table_admin_update_table_async.py b/samples/generated_samples/bigtableadmin_v2_generated_bigtable_table_admin_update_table_async.py new file mode 100644 index 000000000..93839d36f --- /dev/null +++ b/samples/generated_samples/bigtableadmin_v2_generated_bigtable_table_admin_update_table_async.py @@ -0,0 +1,55 @@ +# -*- coding: utf-8 -*- +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for UpdateTable +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-bigtable-admin + + +# [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. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import bigtable_admin_v2 + + +async def sample_update_table(): + # Create a client + client = bigtable_admin_v2.BigtableTableAdminAsyncClient() + + # Initialize request argument(s) + request = bigtable_admin_v2.UpdateTableRequest( + ) + + # Make the request + operation = client.update_table(request=request) + + print("Waiting for operation to complete...") + + response = (await operation).result() + + # Handle the response + print(response) + +# [END bigtableadmin_v2_generated_BigtableTableAdmin_UpdateTable_async] diff --git a/samples/generated_samples/bigtableadmin_v2_generated_bigtable_table_admin_update_table_sync.py b/samples/generated_samples/bigtableadmin_v2_generated_bigtable_table_admin_update_table_sync.py new file mode 100644 index 000000000..fea09f6a8 --- /dev/null +++ b/samples/generated_samples/bigtableadmin_v2_generated_bigtable_table_admin_update_table_sync.py @@ -0,0 +1,55 @@ +# -*- coding: utf-8 -*- +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for UpdateTable +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-bigtable-admin + + +# [START bigtableadmin_v2_generated_BigtableTableAdmin_UpdateTable_sync] +# 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. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import bigtable_admin_v2 + + +def sample_update_table(): + # Create a client + client = bigtable_admin_v2.BigtableTableAdminClient() + + # Initialize request argument(s) + request = bigtable_admin_v2.UpdateTableRequest( + ) + + # Make the request + operation = client.update_table(request=request) + + print("Waiting for operation to complete...") + + response = operation.result() + + # Handle the response + print(response) + +# [END bigtableadmin_v2_generated_BigtableTableAdmin_UpdateTable_sync] diff --git a/samples/generated_samples/snippet_metadata_google.bigtable.admin.v2.json b/samples/generated_samples/snippet_metadata_google.bigtable.admin.v2.json new file mode 100644 index 000000000..3d73099e8 --- /dev/null +++ b/samples/generated_samples/snippet_metadata_google.bigtable.admin.v2.json @@ -0,0 +1,10871 @@ +{ + "clientLibrary": { + "apis": [ + { + "id": "google.bigtable.admin.v2", + "version": "v2" + } + ], + "language": "PYTHON", + "name": "google-cloud-bigtable-admin", + "version": "0.1.0" + }, + "snippets": [ + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.bigtable_admin_v2.BigtableInstanceAdminAsyncClient", + "shortName": "BigtableInstanceAdminAsyncClient" + }, + "fullName": "google.cloud.bigtable_admin_v2.BigtableInstanceAdminAsyncClient.create_app_profile", + "method": { + "fullName": "google.bigtable.admin.v2.BigtableInstanceAdmin.CreateAppProfile", + "service": { + "fullName": "google.bigtable.admin.v2.BigtableInstanceAdmin", + "shortName": "BigtableInstanceAdmin" + }, + "shortName": "CreateAppProfile" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.bigtable_admin_v2.types.CreateAppProfileRequest" + }, + { + "name": "parent", + "type": "str" + }, + { + "name": "app_profile_id", + "type": "str" + }, + { + "name": "app_profile", + "type": "google.cloud.bigtable_admin_v2.types.AppProfile" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, Union[str, bytes]]]" + } + ], + "resultType": "google.cloud.bigtable_admin_v2.types.AppProfile", + "shortName": "create_app_profile" + }, + "description": "Sample for CreateAppProfile", + "file": "bigtableadmin_v2_generated_bigtable_instance_admin_create_app_profile_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "bigtableadmin_v2_generated_BigtableInstanceAdmin_CreateAppProfile_async", + "segments": [ + { + "end": 56, + "start": 27, + "type": "FULL" + }, + { + "end": 56, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 50, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 53, + "start": 51, + "type": "REQUEST_EXECUTION" + }, + { + "end": 57, + "start": 54, + "type": "RESPONSE_HANDLING" + } + ], + "title": "bigtableadmin_v2_generated_bigtable_instance_admin_create_app_profile_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.bigtable_admin_v2.BigtableInstanceAdminClient", + "shortName": "BigtableInstanceAdminClient" + }, + "fullName": "google.cloud.bigtable_admin_v2.BigtableInstanceAdminClient.create_app_profile", + "method": { + "fullName": "google.bigtable.admin.v2.BigtableInstanceAdmin.CreateAppProfile", + "service": { + "fullName": "google.bigtable.admin.v2.BigtableInstanceAdmin", + "shortName": "BigtableInstanceAdmin" + }, + "shortName": "CreateAppProfile" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.bigtable_admin_v2.types.CreateAppProfileRequest" + }, + { + "name": "parent", + "type": "str" + }, + { + "name": "app_profile_id", + "type": "str" + }, + { + "name": "app_profile", + "type": "google.cloud.bigtable_admin_v2.types.AppProfile" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, Union[str, bytes]]]" + } + ], + "resultType": "google.cloud.bigtable_admin_v2.types.AppProfile", + "shortName": "create_app_profile" + }, + "description": "Sample for CreateAppProfile", + "file": "bigtableadmin_v2_generated_bigtable_instance_admin_create_app_profile_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "bigtableadmin_v2_generated_BigtableInstanceAdmin_CreateAppProfile_sync", + "segments": [ + { + "end": 56, + "start": 27, + "type": "FULL" + }, + { + "end": 56, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 50, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 53, + "start": 51, + "type": "REQUEST_EXECUTION" + }, + { + "end": 57, + "start": 54, + "type": "RESPONSE_HANDLING" + } + ], + "title": "bigtableadmin_v2_generated_bigtable_instance_admin_create_app_profile_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.bigtable_admin_v2.BigtableInstanceAdminAsyncClient", + "shortName": "BigtableInstanceAdminAsyncClient" + }, + "fullName": "google.cloud.bigtable_admin_v2.BigtableInstanceAdminAsyncClient.create_cluster", + "method": { + "fullName": "google.bigtable.admin.v2.BigtableInstanceAdmin.CreateCluster", + "service": { + "fullName": "google.bigtable.admin.v2.BigtableInstanceAdmin", + "shortName": "BigtableInstanceAdmin" + }, + "shortName": "CreateCluster" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.bigtable_admin_v2.types.CreateClusterRequest" + }, + { + "name": "parent", + "type": "str" + }, + { + "name": "cluster_id", + "type": "str" + }, + { + "name": "cluster", + "type": "google.cloud.bigtable_admin_v2.types.Cluster" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, Union[str, bytes]]]" + } + ], + "resultType": "google.api_core.operation_async.AsyncOperation", + "shortName": "create_cluster" + }, + "description": "Sample for CreateCluster", + "file": "bigtableadmin_v2_generated_bigtable_instance_admin_create_cluster_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "bigtableadmin_v2_generated_BigtableInstanceAdmin_CreateCluster_async", + "segments": [ + { + "end": 56, + "start": 27, + "type": "FULL" + }, + { + "end": 56, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 46, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 53, + "start": 47, + "type": "REQUEST_EXECUTION" + }, + { + "end": 57, + "start": 54, + "type": "RESPONSE_HANDLING" + } + ], + "title": "bigtableadmin_v2_generated_bigtable_instance_admin_create_cluster_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.bigtable_admin_v2.BigtableInstanceAdminClient", + "shortName": "BigtableInstanceAdminClient" + }, + "fullName": "google.cloud.bigtable_admin_v2.BigtableInstanceAdminClient.create_cluster", + "method": { + "fullName": "google.bigtable.admin.v2.BigtableInstanceAdmin.CreateCluster", + "service": { + "fullName": "google.bigtable.admin.v2.BigtableInstanceAdmin", + "shortName": "BigtableInstanceAdmin" + }, + "shortName": "CreateCluster" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.bigtable_admin_v2.types.CreateClusterRequest" + }, + { + "name": "parent", + "type": "str" + }, + { + "name": "cluster_id", + "type": "str" + }, + { + "name": "cluster", + "type": "google.cloud.bigtable_admin_v2.types.Cluster" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, Union[str, bytes]]]" + } + ], + "resultType": "google.api_core.operation.Operation", + "shortName": "create_cluster" + }, + "description": "Sample for CreateCluster", + "file": "bigtableadmin_v2_generated_bigtable_instance_admin_create_cluster_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "bigtableadmin_v2_generated_BigtableInstanceAdmin_CreateCluster_sync", + "segments": [ + { + "end": 56, + "start": 27, + "type": "FULL" + }, + { + "end": 56, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 46, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 53, + "start": 47, + "type": "REQUEST_EXECUTION" + }, + { + "end": 57, + "start": 54, + "type": "RESPONSE_HANDLING" + } + ], + "title": "bigtableadmin_v2_generated_bigtable_instance_admin_create_cluster_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.bigtable_admin_v2.BigtableInstanceAdminAsyncClient", + "shortName": "BigtableInstanceAdminAsyncClient" + }, + "fullName": "google.cloud.bigtable_admin_v2.BigtableInstanceAdminAsyncClient.create_instance", + "method": { + "fullName": "google.bigtable.admin.v2.BigtableInstanceAdmin.CreateInstance", + "service": { + "fullName": "google.bigtable.admin.v2.BigtableInstanceAdmin", + "shortName": "BigtableInstanceAdmin" + }, + "shortName": "CreateInstance" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.bigtable_admin_v2.types.CreateInstanceRequest" + }, + { + "name": "parent", + "type": "str" + }, + { + "name": "instance_id", + "type": "str" + }, + { + "name": "instance", + "type": "google.cloud.bigtable_admin_v2.types.Instance" + }, + { + "name": "clusters", + "type": "MutableMapping[str, google.cloud.bigtable_admin_v2.types.Cluster]" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, Union[str, bytes]]]" + } + ], + "resultType": "google.api_core.operation_async.AsyncOperation", + "shortName": "create_instance" + }, + "description": "Sample for CreateInstance", + "file": "bigtableadmin_v2_generated_bigtable_instance_admin_create_instance_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "bigtableadmin_v2_generated_BigtableInstanceAdmin_CreateInstance_async", + "segments": [ + { + "end": 60, + "start": 27, + "type": "FULL" + }, + { + "end": 60, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 50, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 57, + "start": 51, + "type": "REQUEST_EXECUTION" + }, + { + "end": 61, + "start": 58, + "type": "RESPONSE_HANDLING" + } + ], + "title": "bigtableadmin_v2_generated_bigtable_instance_admin_create_instance_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.bigtable_admin_v2.BigtableInstanceAdminClient", + "shortName": "BigtableInstanceAdminClient" + }, + "fullName": "google.cloud.bigtable_admin_v2.BigtableInstanceAdminClient.create_instance", + "method": { + "fullName": "google.bigtable.admin.v2.BigtableInstanceAdmin.CreateInstance", + "service": { + "fullName": "google.bigtable.admin.v2.BigtableInstanceAdmin", + "shortName": "BigtableInstanceAdmin" + }, + "shortName": "CreateInstance" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.bigtable_admin_v2.types.CreateInstanceRequest" + }, + { + "name": "parent", + "type": "str" + }, + { + "name": "instance_id", + "type": "str" + }, + { + "name": "instance", + "type": "google.cloud.bigtable_admin_v2.types.Instance" + }, + { + "name": "clusters", + "type": "MutableMapping[str, google.cloud.bigtable_admin_v2.types.Cluster]" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, Union[str, bytes]]]" + } + ], + "resultType": "google.api_core.operation.Operation", + "shortName": "create_instance" + }, + "description": "Sample for CreateInstance", + "file": "bigtableadmin_v2_generated_bigtable_instance_admin_create_instance_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "bigtableadmin_v2_generated_BigtableInstanceAdmin_CreateInstance_sync", + "segments": [ + { + "end": 60, + "start": 27, + "type": "FULL" + }, + { + "end": 60, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 50, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 57, + "start": 51, + "type": "REQUEST_EXECUTION" + }, + { + "end": 61, + "start": 58, + "type": "RESPONSE_HANDLING" + } + ], + "title": "bigtableadmin_v2_generated_bigtable_instance_admin_create_instance_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.bigtable_admin_v2.BigtableInstanceAdminAsyncClient", + "shortName": "BigtableInstanceAdminAsyncClient" + }, + "fullName": "google.cloud.bigtable_admin_v2.BigtableInstanceAdminAsyncClient.create_logical_view", + "method": { + "fullName": "google.bigtable.admin.v2.BigtableInstanceAdmin.CreateLogicalView", + "service": { + "fullName": "google.bigtable.admin.v2.BigtableInstanceAdmin", + "shortName": "BigtableInstanceAdmin" + }, + "shortName": "CreateLogicalView" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.bigtable_admin_v2.types.CreateLogicalViewRequest" + }, + { + "name": "parent", + "type": "str" + }, + { + "name": "logical_view", + "type": "google.cloud.bigtable_admin_v2.types.LogicalView" + }, + { + "name": "logical_view_id", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, Union[str, bytes]]]" + } + ], + "resultType": "google.api_core.operation_async.AsyncOperation", + "shortName": "create_logical_view" + }, + "description": "Sample for CreateLogicalView", + "file": "bigtableadmin_v2_generated_bigtable_instance_admin_create_logical_view_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "bigtableadmin_v2_generated_BigtableInstanceAdmin_CreateLogicalView_async", + "segments": [ + { + "end": 60, + "start": 27, + "type": "FULL" + }, + { + "end": 60, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 50, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 57, + "start": 51, + "type": "REQUEST_EXECUTION" + }, + { + "end": 61, + "start": 58, + "type": "RESPONSE_HANDLING" + } + ], + "title": "bigtableadmin_v2_generated_bigtable_instance_admin_create_logical_view_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.bigtable_admin_v2.BigtableInstanceAdminClient", + "shortName": "BigtableInstanceAdminClient" + }, + "fullName": "google.cloud.bigtable_admin_v2.BigtableInstanceAdminClient.create_logical_view", + "method": { + "fullName": "google.bigtable.admin.v2.BigtableInstanceAdmin.CreateLogicalView", + "service": { + "fullName": "google.bigtable.admin.v2.BigtableInstanceAdmin", + "shortName": "BigtableInstanceAdmin" + }, + "shortName": "CreateLogicalView" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.bigtable_admin_v2.types.CreateLogicalViewRequest" + }, + { + "name": "parent", + "type": "str" + }, + { + "name": "logical_view", + "type": "google.cloud.bigtable_admin_v2.types.LogicalView" + }, + { + "name": "logical_view_id", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, Union[str, bytes]]]" + } + ], + "resultType": "google.api_core.operation.Operation", + "shortName": "create_logical_view" + }, + "description": "Sample for CreateLogicalView", + "file": "bigtableadmin_v2_generated_bigtable_instance_admin_create_logical_view_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "bigtableadmin_v2_generated_BigtableInstanceAdmin_CreateLogicalView_sync", + "segments": [ + { + "end": 60, + "start": 27, + "type": "FULL" + }, + { + "end": 60, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 50, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 57, + "start": 51, + "type": "REQUEST_EXECUTION" + }, + { + "end": 61, + "start": 58, + "type": "RESPONSE_HANDLING" + } + ], + "title": "bigtableadmin_v2_generated_bigtable_instance_admin_create_logical_view_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.bigtable_admin_v2.BigtableInstanceAdminAsyncClient", + "shortName": "BigtableInstanceAdminAsyncClient" + }, + "fullName": "google.cloud.bigtable_admin_v2.BigtableInstanceAdminAsyncClient.create_materialized_view", + "method": { + "fullName": "google.bigtable.admin.v2.BigtableInstanceAdmin.CreateMaterializedView", + "service": { + "fullName": "google.bigtable.admin.v2.BigtableInstanceAdmin", + "shortName": "BigtableInstanceAdmin" + }, + "shortName": "CreateMaterializedView" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.bigtable_admin_v2.types.CreateMaterializedViewRequest" + }, + { + "name": "parent", + "type": "str" + }, + { + "name": "materialized_view", + "type": "google.cloud.bigtable_admin_v2.types.MaterializedView" + }, + { + "name": "materialized_view_id", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, Union[str, bytes]]]" + } + ], + "resultType": "google.api_core.operation_async.AsyncOperation", + "shortName": "create_materialized_view" + }, + "description": "Sample for CreateMaterializedView", + "file": "bigtableadmin_v2_generated_bigtable_instance_admin_create_materialized_view_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "bigtableadmin_v2_generated_BigtableInstanceAdmin_CreateMaterializedView_async", + "segments": [ + { + "end": 60, + "start": 27, + "type": "FULL" + }, + { + "end": 60, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 50, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 57, + "start": 51, + "type": "REQUEST_EXECUTION" + }, + { + "end": 61, + "start": 58, + "type": "RESPONSE_HANDLING" + } + ], + "title": "bigtableadmin_v2_generated_bigtable_instance_admin_create_materialized_view_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.bigtable_admin_v2.BigtableInstanceAdminClient", + "shortName": "BigtableInstanceAdminClient" + }, + "fullName": "google.cloud.bigtable_admin_v2.BigtableInstanceAdminClient.create_materialized_view", + "method": { + "fullName": "google.bigtable.admin.v2.BigtableInstanceAdmin.CreateMaterializedView", + "service": { + "fullName": "google.bigtable.admin.v2.BigtableInstanceAdmin", + "shortName": "BigtableInstanceAdmin" + }, + "shortName": "CreateMaterializedView" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.bigtable_admin_v2.types.CreateMaterializedViewRequest" + }, + { + "name": "parent", + "type": "str" + }, + { + "name": "materialized_view", + "type": "google.cloud.bigtable_admin_v2.types.MaterializedView" + }, + { + "name": "materialized_view_id", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, Union[str, bytes]]]" + } + ], + "resultType": "google.api_core.operation.Operation", + "shortName": "create_materialized_view" + }, + "description": "Sample for CreateMaterializedView", + "file": "bigtableadmin_v2_generated_bigtable_instance_admin_create_materialized_view_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "bigtableadmin_v2_generated_BigtableInstanceAdmin_CreateMaterializedView_sync", + "segments": [ + { + "end": 60, + "start": 27, + "type": "FULL" + }, + { + "end": 60, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 50, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 57, + "start": 51, + "type": "REQUEST_EXECUTION" + }, + { + "end": 61, + "start": 58, + "type": "RESPONSE_HANDLING" + } + ], + "title": "bigtableadmin_v2_generated_bigtable_instance_admin_create_materialized_view_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.bigtable_admin_v2.BigtableInstanceAdminAsyncClient", + "shortName": "BigtableInstanceAdminAsyncClient" + }, + "fullName": "google.cloud.bigtable_admin_v2.BigtableInstanceAdminAsyncClient.delete_app_profile", + "method": { + "fullName": "google.bigtable.admin.v2.BigtableInstanceAdmin.DeleteAppProfile", + "service": { + "fullName": "google.bigtable.admin.v2.BigtableInstanceAdmin", + "shortName": "BigtableInstanceAdmin" + }, + "shortName": "DeleteAppProfile" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.bigtable_admin_v2.types.DeleteAppProfileRequest" + }, + { + "name": "name", + "type": "str" + }, + { + "name": "ignore_warnings", + "type": "bool" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, Union[str, bytes]]]" + } + ], + "shortName": "delete_app_profile" + }, + "description": "Sample for DeleteAppProfile", + "file": "bigtableadmin_v2_generated_bigtable_instance_admin_delete_app_profile_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "bigtableadmin_v2_generated_BigtableInstanceAdmin_DeleteAppProfile_async", + "segments": [ + { + "end": 50, + "start": 27, + "type": "FULL" + }, + { + "end": 50, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 46, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "start": 47, + "type": "REQUEST_EXECUTION" + }, + { + "end": 51, + "type": "RESPONSE_HANDLING" + } + ], + "title": "bigtableadmin_v2_generated_bigtable_instance_admin_delete_app_profile_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.bigtable_admin_v2.BigtableInstanceAdminClient", + "shortName": "BigtableInstanceAdminClient" + }, + "fullName": "google.cloud.bigtable_admin_v2.BigtableInstanceAdminClient.delete_app_profile", + "method": { + "fullName": "google.bigtable.admin.v2.BigtableInstanceAdmin.DeleteAppProfile", + "service": { + "fullName": "google.bigtable.admin.v2.BigtableInstanceAdmin", + "shortName": "BigtableInstanceAdmin" + }, + "shortName": "DeleteAppProfile" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.bigtable_admin_v2.types.DeleteAppProfileRequest" + }, + { + "name": "name", + "type": "str" + }, + { + "name": "ignore_warnings", + "type": "bool" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, Union[str, bytes]]]" + } + ], + "shortName": "delete_app_profile" + }, + "description": "Sample for DeleteAppProfile", + "file": "bigtableadmin_v2_generated_bigtable_instance_admin_delete_app_profile_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "bigtableadmin_v2_generated_BigtableInstanceAdmin_DeleteAppProfile_sync", + "segments": [ + { + "end": 50, + "start": 27, + "type": "FULL" + }, + { + "end": 50, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 46, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "start": 47, + "type": "REQUEST_EXECUTION" + }, + { + "end": 51, + "type": "RESPONSE_HANDLING" + } + ], + "title": "bigtableadmin_v2_generated_bigtable_instance_admin_delete_app_profile_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.bigtable_admin_v2.BigtableInstanceAdminAsyncClient", + "shortName": "BigtableInstanceAdminAsyncClient" + }, + "fullName": "google.cloud.bigtable_admin_v2.BigtableInstanceAdminAsyncClient.delete_cluster", + "method": { + "fullName": "google.bigtable.admin.v2.BigtableInstanceAdmin.DeleteCluster", + "service": { + "fullName": "google.bigtable.admin.v2.BigtableInstanceAdmin", + "shortName": "BigtableInstanceAdmin" + }, + "shortName": "DeleteCluster" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.bigtable_admin_v2.types.DeleteClusterRequest" + }, + { + "name": "name", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, Union[str, bytes]]]" + } + ], + "shortName": "delete_cluster" + }, + "description": "Sample for DeleteCluster", + "file": "bigtableadmin_v2_generated_bigtable_instance_admin_delete_cluster_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "bigtableadmin_v2_generated_BigtableInstanceAdmin_DeleteCluster_async", + "segments": [ + { + "end": 49, + "start": 27, + "type": "FULL" + }, + { + "end": 49, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 45, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "start": 46, + "type": "REQUEST_EXECUTION" + }, + { + "end": 50, + "type": "RESPONSE_HANDLING" + } + ], + "title": "bigtableadmin_v2_generated_bigtable_instance_admin_delete_cluster_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.bigtable_admin_v2.BigtableInstanceAdminClient", + "shortName": "BigtableInstanceAdminClient" + }, + "fullName": "google.cloud.bigtable_admin_v2.BigtableInstanceAdminClient.delete_cluster", + "method": { + "fullName": "google.bigtable.admin.v2.BigtableInstanceAdmin.DeleteCluster", + "service": { + "fullName": "google.bigtable.admin.v2.BigtableInstanceAdmin", + "shortName": "BigtableInstanceAdmin" + }, + "shortName": "DeleteCluster" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.bigtable_admin_v2.types.DeleteClusterRequest" + }, + { + "name": "name", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, Union[str, bytes]]]" + } + ], + "shortName": "delete_cluster" + }, + "description": "Sample for DeleteCluster", + "file": "bigtableadmin_v2_generated_bigtable_instance_admin_delete_cluster_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "bigtableadmin_v2_generated_BigtableInstanceAdmin_DeleteCluster_sync", + "segments": [ + { + "end": 49, + "start": 27, + "type": "FULL" + }, + { + "end": 49, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 45, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "start": 46, + "type": "REQUEST_EXECUTION" + }, + { + "end": 50, + "type": "RESPONSE_HANDLING" + } + ], + "title": "bigtableadmin_v2_generated_bigtable_instance_admin_delete_cluster_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.bigtable_admin_v2.BigtableInstanceAdminAsyncClient", + "shortName": "BigtableInstanceAdminAsyncClient" + }, + "fullName": "google.cloud.bigtable_admin_v2.BigtableInstanceAdminAsyncClient.delete_instance", + "method": { + "fullName": "google.bigtable.admin.v2.BigtableInstanceAdmin.DeleteInstance", + "service": { + "fullName": "google.bigtable.admin.v2.BigtableInstanceAdmin", + "shortName": "BigtableInstanceAdmin" + }, + "shortName": "DeleteInstance" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.bigtable_admin_v2.types.DeleteInstanceRequest" + }, + { + "name": "name", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, Union[str, bytes]]]" + } + ], + "shortName": "delete_instance" + }, + "description": "Sample for DeleteInstance", + "file": "bigtableadmin_v2_generated_bigtable_instance_admin_delete_instance_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "bigtableadmin_v2_generated_BigtableInstanceAdmin_DeleteInstance_async", + "segments": [ + { + "end": 49, + "start": 27, + "type": "FULL" + }, + { + "end": 49, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 45, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "start": 46, + "type": "REQUEST_EXECUTION" + }, + { + "end": 50, + "type": "RESPONSE_HANDLING" + } + ], + "title": "bigtableadmin_v2_generated_bigtable_instance_admin_delete_instance_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.bigtable_admin_v2.BigtableInstanceAdminClient", + "shortName": "BigtableInstanceAdminClient" + }, + "fullName": "google.cloud.bigtable_admin_v2.BigtableInstanceAdminClient.delete_instance", + "method": { + "fullName": "google.bigtable.admin.v2.BigtableInstanceAdmin.DeleteInstance", + "service": { + "fullName": "google.bigtable.admin.v2.BigtableInstanceAdmin", + "shortName": "BigtableInstanceAdmin" + }, + "shortName": "DeleteInstance" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.bigtable_admin_v2.types.DeleteInstanceRequest" + }, + { + "name": "name", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, Union[str, bytes]]]" + } + ], + "shortName": "delete_instance" + }, + "description": "Sample for DeleteInstance", + "file": "bigtableadmin_v2_generated_bigtable_instance_admin_delete_instance_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "bigtableadmin_v2_generated_BigtableInstanceAdmin_DeleteInstance_sync", + "segments": [ + { + "end": 49, + "start": 27, + "type": "FULL" + }, + { + "end": 49, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 45, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "start": 46, + "type": "REQUEST_EXECUTION" + }, + { + "end": 50, + "type": "RESPONSE_HANDLING" + } + ], + "title": "bigtableadmin_v2_generated_bigtable_instance_admin_delete_instance_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.bigtable_admin_v2.BigtableInstanceAdminAsyncClient", + "shortName": "BigtableInstanceAdminAsyncClient" + }, + "fullName": "google.cloud.bigtable_admin_v2.BigtableInstanceAdminAsyncClient.delete_logical_view", + "method": { + "fullName": "google.bigtable.admin.v2.BigtableInstanceAdmin.DeleteLogicalView", + "service": { + "fullName": "google.bigtable.admin.v2.BigtableInstanceAdmin", + "shortName": "BigtableInstanceAdmin" + }, + "shortName": "DeleteLogicalView" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.bigtable_admin_v2.types.DeleteLogicalViewRequest" + }, + { + "name": "name", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, Union[str, bytes]]]" + } + ], + "shortName": "delete_logical_view" + }, + "description": "Sample for DeleteLogicalView", + "file": "bigtableadmin_v2_generated_bigtable_instance_admin_delete_logical_view_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "bigtableadmin_v2_generated_BigtableInstanceAdmin_DeleteLogicalView_async", + "segments": [ + { + "end": 49, + "start": 27, + "type": "FULL" + }, + { + "end": 49, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 45, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "start": 46, + "type": "REQUEST_EXECUTION" + }, + { + "end": 50, + "type": "RESPONSE_HANDLING" + } + ], + "title": "bigtableadmin_v2_generated_bigtable_instance_admin_delete_logical_view_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.bigtable_admin_v2.BigtableInstanceAdminClient", + "shortName": "BigtableInstanceAdminClient" + }, + "fullName": "google.cloud.bigtable_admin_v2.BigtableInstanceAdminClient.delete_logical_view", + "method": { + "fullName": "google.bigtable.admin.v2.BigtableInstanceAdmin.DeleteLogicalView", + "service": { + "fullName": "google.bigtable.admin.v2.BigtableInstanceAdmin", + "shortName": "BigtableInstanceAdmin" + }, + "shortName": "DeleteLogicalView" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.bigtable_admin_v2.types.DeleteLogicalViewRequest" + }, + { + "name": "name", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, Union[str, bytes]]]" + } + ], + "shortName": "delete_logical_view" + }, + "description": "Sample for DeleteLogicalView", + "file": "bigtableadmin_v2_generated_bigtable_instance_admin_delete_logical_view_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "bigtableadmin_v2_generated_BigtableInstanceAdmin_DeleteLogicalView_sync", + "segments": [ + { + "end": 49, + "start": 27, + "type": "FULL" + }, + { + "end": 49, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 45, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "start": 46, + "type": "REQUEST_EXECUTION" + }, + { + "end": 50, + "type": "RESPONSE_HANDLING" + } + ], + "title": "bigtableadmin_v2_generated_bigtable_instance_admin_delete_logical_view_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.bigtable_admin_v2.BigtableInstanceAdminAsyncClient", + "shortName": "BigtableInstanceAdminAsyncClient" + }, + "fullName": "google.cloud.bigtable_admin_v2.BigtableInstanceAdminAsyncClient.delete_materialized_view", + "method": { + "fullName": "google.bigtable.admin.v2.BigtableInstanceAdmin.DeleteMaterializedView", + "service": { + "fullName": "google.bigtable.admin.v2.BigtableInstanceAdmin", + "shortName": "BigtableInstanceAdmin" + }, + "shortName": "DeleteMaterializedView" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.bigtable_admin_v2.types.DeleteMaterializedViewRequest" + }, + { + "name": "name", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, Union[str, bytes]]]" + } + ], + "shortName": "delete_materialized_view" + }, + "description": "Sample for DeleteMaterializedView", + "file": "bigtableadmin_v2_generated_bigtable_instance_admin_delete_materialized_view_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "bigtableadmin_v2_generated_BigtableInstanceAdmin_DeleteMaterializedView_async", + "segments": [ + { + "end": 49, + "start": 27, + "type": "FULL" + }, + { + "end": 49, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 45, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "start": 46, + "type": "REQUEST_EXECUTION" + }, + { + "end": 50, + "type": "RESPONSE_HANDLING" + } + ], + "title": "bigtableadmin_v2_generated_bigtable_instance_admin_delete_materialized_view_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.bigtable_admin_v2.BigtableInstanceAdminClient", + "shortName": "BigtableInstanceAdminClient" + }, + "fullName": "google.cloud.bigtable_admin_v2.BigtableInstanceAdminClient.delete_materialized_view", + "method": { + "fullName": "google.bigtable.admin.v2.BigtableInstanceAdmin.DeleteMaterializedView", + "service": { + "fullName": "google.bigtable.admin.v2.BigtableInstanceAdmin", + "shortName": "BigtableInstanceAdmin" + }, + "shortName": "DeleteMaterializedView" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.bigtable_admin_v2.types.DeleteMaterializedViewRequest" + }, + { + "name": "name", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, Union[str, bytes]]]" + } + ], + "shortName": "delete_materialized_view" + }, + "description": "Sample for DeleteMaterializedView", + "file": "bigtableadmin_v2_generated_bigtable_instance_admin_delete_materialized_view_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "bigtableadmin_v2_generated_BigtableInstanceAdmin_DeleteMaterializedView_sync", + "segments": [ + { + "end": 49, + "start": 27, + "type": "FULL" + }, + { + "end": 49, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 45, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "start": 46, + "type": "REQUEST_EXECUTION" + }, + { + "end": 50, + "type": "RESPONSE_HANDLING" + } + ], + "title": "bigtableadmin_v2_generated_bigtable_instance_admin_delete_materialized_view_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.bigtable_admin_v2.BigtableInstanceAdminAsyncClient", + "shortName": "BigtableInstanceAdminAsyncClient" + }, + "fullName": "google.cloud.bigtable_admin_v2.BigtableInstanceAdminAsyncClient.get_app_profile", + "method": { + "fullName": "google.bigtable.admin.v2.BigtableInstanceAdmin.GetAppProfile", + "service": { + "fullName": "google.bigtable.admin.v2.BigtableInstanceAdmin", + "shortName": "BigtableInstanceAdmin" + }, + "shortName": "GetAppProfile" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.bigtable_admin_v2.types.GetAppProfileRequest" + }, + { + "name": "name", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, Union[str, bytes]]]" + } + ], + "resultType": "google.cloud.bigtable_admin_v2.types.AppProfile", + "shortName": "get_app_profile" + }, + "description": "Sample for GetAppProfile", + "file": "bigtableadmin_v2_generated_bigtable_instance_admin_get_app_profile_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "bigtableadmin_v2_generated_BigtableInstanceAdmin_GetAppProfile_async", + "segments": [ + { + "end": 51, + "start": 27, + "type": "FULL" + }, + { + "end": 51, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 45, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 48, + "start": 46, + "type": "REQUEST_EXECUTION" + }, + { + "end": 52, + "start": 49, + "type": "RESPONSE_HANDLING" + } + ], + "title": "bigtableadmin_v2_generated_bigtable_instance_admin_get_app_profile_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.bigtable_admin_v2.BigtableInstanceAdminClient", + "shortName": "BigtableInstanceAdminClient" + }, + "fullName": "google.cloud.bigtable_admin_v2.BigtableInstanceAdminClient.get_app_profile", + "method": { + "fullName": "google.bigtable.admin.v2.BigtableInstanceAdmin.GetAppProfile", + "service": { + "fullName": "google.bigtable.admin.v2.BigtableInstanceAdmin", + "shortName": "BigtableInstanceAdmin" + }, + "shortName": "GetAppProfile" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.bigtable_admin_v2.types.GetAppProfileRequest" + }, + { + "name": "name", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, Union[str, bytes]]]" + } + ], + "resultType": "google.cloud.bigtable_admin_v2.types.AppProfile", + "shortName": "get_app_profile" + }, + "description": "Sample for GetAppProfile", + "file": "bigtableadmin_v2_generated_bigtable_instance_admin_get_app_profile_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "bigtableadmin_v2_generated_BigtableInstanceAdmin_GetAppProfile_sync", + "segments": [ + { + "end": 51, + "start": 27, + "type": "FULL" + }, + { + "end": 51, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 45, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 48, + "start": 46, + "type": "REQUEST_EXECUTION" + }, + { + "end": 52, + "start": 49, + "type": "RESPONSE_HANDLING" + } + ], + "title": "bigtableadmin_v2_generated_bigtable_instance_admin_get_app_profile_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.bigtable_admin_v2.BigtableInstanceAdminAsyncClient", + "shortName": "BigtableInstanceAdminAsyncClient" + }, + "fullName": "google.cloud.bigtable_admin_v2.BigtableInstanceAdminAsyncClient.get_cluster", + "method": { + "fullName": "google.bigtable.admin.v2.BigtableInstanceAdmin.GetCluster", + "service": { + "fullName": "google.bigtable.admin.v2.BigtableInstanceAdmin", + "shortName": "BigtableInstanceAdmin" + }, + "shortName": "GetCluster" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.bigtable_admin_v2.types.GetClusterRequest" + }, + { + "name": "name", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, Union[str, bytes]]]" + } + ], + "resultType": "google.cloud.bigtable_admin_v2.types.Cluster", + "shortName": "get_cluster" + }, + "description": "Sample for GetCluster", + "file": "bigtableadmin_v2_generated_bigtable_instance_admin_get_cluster_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "bigtableadmin_v2_generated_BigtableInstanceAdmin_GetCluster_async", + "segments": [ + { + "end": 51, + "start": 27, + "type": "FULL" + }, + { + "end": 51, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 45, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 48, + "start": 46, + "type": "REQUEST_EXECUTION" + }, + { + "end": 52, + "start": 49, + "type": "RESPONSE_HANDLING" + } + ], + "title": "bigtableadmin_v2_generated_bigtable_instance_admin_get_cluster_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.bigtable_admin_v2.BigtableInstanceAdminClient", + "shortName": "BigtableInstanceAdminClient" + }, + "fullName": "google.cloud.bigtable_admin_v2.BigtableInstanceAdminClient.get_cluster", + "method": { + "fullName": "google.bigtable.admin.v2.BigtableInstanceAdmin.GetCluster", + "service": { + "fullName": "google.bigtable.admin.v2.BigtableInstanceAdmin", + "shortName": "BigtableInstanceAdmin" + }, + "shortName": "GetCluster" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.bigtable_admin_v2.types.GetClusterRequest" + }, + { + "name": "name", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, Union[str, bytes]]]" + } + ], + "resultType": "google.cloud.bigtable_admin_v2.types.Cluster", + "shortName": "get_cluster" + }, + "description": "Sample for GetCluster", + "file": "bigtableadmin_v2_generated_bigtable_instance_admin_get_cluster_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "bigtableadmin_v2_generated_BigtableInstanceAdmin_GetCluster_sync", + "segments": [ + { + "end": 51, + "start": 27, + "type": "FULL" + }, + { + "end": 51, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 45, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 48, + "start": 46, + "type": "REQUEST_EXECUTION" + }, + { + "end": 52, + "start": 49, + "type": "RESPONSE_HANDLING" + } + ], + "title": "bigtableadmin_v2_generated_bigtable_instance_admin_get_cluster_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.bigtable_admin_v2.BigtableInstanceAdminAsyncClient", + "shortName": "BigtableInstanceAdminAsyncClient" + }, + "fullName": "google.cloud.bigtable_admin_v2.BigtableInstanceAdminAsyncClient.get_iam_policy", + "method": { + "fullName": "google.bigtable.admin.v2.BigtableInstanceAdmin.GetIamPolicy", + "service": { + "fullName": "google.bigtable.admin.v2.BigtableInstanceAdmin", + "shortName": "BigtableInstanceAdmin" + }, + "shortName": "GetIamPolicy" + }, + "parameters": [ + { + "name": "request", + "type": "google.iam.v1.iam_policy_pb2.GetIamPolicyRequest" + }, + { + "name": "resource", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, Union[str, bytes]]]" + } + ], + "resultType": "google.iam.v1.policy_pb2.Policy", + "shortName": "get_iam_policy" + }, + "description": "Sample for GetIamPolicy", + "file": "bigtableadmin_v2_generated_bigtable_instance_admin_get_iam_policy_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "bigtableadmin_v2_generated_BigtableInstanceAdmin_GetIamPolicy_async", + "segments": [ + { + "end": 52, + "start": 27, + "type": "FULL" + }, + { + "end": 52, + "start": 27, + "type": "SHORT" + }, + { + "end": 41, + "start": 39, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 46, + "start": 42, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 49, + "start": 47, + "type": "REQUEST_EXECUTION" + }, + { + "end": 53, + "start": 50, + "type": "RESPONSE_HANDLING" + } + ], + "title": "bigtableadmin_v2_generated_bigtable_instance_admin_get_iam_policy_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.bigtable_admin_v2.BigtableInstanceAdminClient", + "shortName": "BigtableInstanceAdminClient" + }, + "fullName": "google.cloud.bigtable_admin_v2.BigtableInstanceAdminClient.get_iam_policy", + "method": { + "fullName": "google.bigtable.admin.v2.BigtableInstanceAdmin.GetIamPolicy", + "service": { + "fullName": "google.bigtable.admin.v2.BigtableInstanceAdmin", + "shortName": "BigtableInstanceAdmin" + }, + "shortName": "GetIamPolicy" + }, + "parameters": [ + { + "name": "request", + "type": "google.iam.v1.iam_policy_pb2.GetIamPolicyRequest" + }, + { + "name": "resource", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, Union[str, bytes]]]" + } + ], + "resultType": "google.iam.v1.policy_pb2.Policy", + "shortName": "get_iam_policy" + }, + "description": "Sample for GetIamPolicy", + "file": "bigtableadmin_v2_generated_bigtable_instance_admin_get_iam_policy_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "bigtableadmin_v2_generated_BigtableInstanceAdmin_GetIamPolicy_sync", + "segments": [ + { + "end": 52, + "start": 27, + "type": "FULL" + }, + { + "end": 52, + "start": 27, + "type": "SHORT" + }, + { + "end": 41, + "start": 39, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 46, + "start": 42, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 49, + "start": 47, + "type": "REQUEST_EXECUTION" + }, + { + "end": 53, + "start": 50, + "type": "RESPONSE_HANDLING" + } + ], + "title": "bigtableadmin_v2_generated_bigtable_instance_admin_get_iam_policy_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.bigtable_admin_v2.BigtableInstanceAdminAsyncClient", + "shortName": "BigtableInstanceAdminAsyncClient" + }, + "fullName": "google.cloud.bigtable_admin_v2.BigtableInstanceAdminAsyncClient.get_instance", + "method": { + "fullName": "google.bigtable.admin.v2.BigtableInstanceAdmin.GetInstance", + "service": { + "fullName": "google.bigtable.admin.v2.BigtableInstanceAdmin", + "shortName": "BigtableInstanceAdmin" + }, + "shortName": "GetInstance" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.bigtable_admin_v2.types.GetInstanceRequest" + }, + { + "name": "name", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, Union[str, bytes]]]" + } + ], + "resultType": "google.cloud.bigtable_admin_v2.types.Instance", + "shortName": "get_instance" + }, + "description": "Sample for GetInstance", + "file": "bigtableadmin_v2_generated_bigtable_instance_admin_get_instance_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "bigtableadmin_v2_generated_BigtableInstanceAdmin_GetInstance_async", + "segments": [ + { + "end": 51, + "start": 27, + "type": "FULL" + }, + { + "end": 51, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 45, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 48, + "start": 46, + "type": "REQUEST_EXECUTION" + }, + { + "end": 52, + "start": 49, + "type": "RESPONSE_HANDLING" + } + ], + "title": "bigtableadmin_v2_generated_bigtable_instance_admin_get_instance_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.bigtable_admin_v2.BigtableInstanceAdminClient", + "shortName": "BigtableInstanceAdminClient" + }, + "fullName": "google.cloud.bigtable_admin_v2.BigtableInstanceAdminClient.get_instance", + "method": { + "fullName": "google.bigtable.admin.v2.BigtableInstanceAdmin.GetInstance", + "service": { + "fullName": "google.bigtable.admin.v2.BigtableInstanceAdmin", + "shortName": "BigtableInstanceAdmin" + }, + "shortName": "GetInstance" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.bigtable_admin_v2.types.GetInstanceRequest" + }, + { + "name": "name", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, Union[str, bytes]]]" + } + ], + "resultType": "google.cloud.bigtable_admin_v2.types.Instance", + "shortName": "get_instance" + }, + "description": "Sample for GetInstance", + "file": "bigtableadmin_v2_generated_bigtable_instance_admin_get_instance_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "bigtableadmin_v2_generated_BigtableInstanceAdmin_GetInstance_sync", + "segments": [ + { + "end": 51, + "start": 27, + "type": "FULL" + }, + { + "end": 51, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 45, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 48, + "start": 46, + "type": "REQUEST_EXECUTION" + }, + { + "end": 52, + "start": 49, + "type": "RESPONSE_HANDLING" + } + ], + "title": "bigtableadmin_v2_generated_bigtable_instance_admin_get_instance_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.bigtable_admin_v2.BigtableInstanceAdminAsyncClient", + "shortName": "BigtableInstanceAdminAsyncClient" + }, + "fullName": "google.cloud.bigtable_admin_v2.BigtableInstanceAdminAsyncClient.get_logical_view", + "method": { + "fullName": "google.bigtable.admin.v2.BigtableInstanceAdmin.GetLogicalView", + "service": { + "fullName": "google.bigtable.admin.v2.BigtableInstanceAdmin", + "shortName": "BigtableInstanceAdmin" + }, + "shortName": "GetLogicalView" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.bigtable_admin_v2.types.GetLogicalViewRequest" + }, + { + "name": "name", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, Union[str, bytes]]]" + } + ], + "resultType": "google.cloud.bigtable_admin_v2.types.LogicalView", + "shortName": "get_logical_view" + }, + "description": "Sample for GetLogicalView", + "file": "bigtableadmin_v2_generated_bigtable_instance_admin_get_logical_view_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "bigtableadmin_v2_generated_BigtableInstanceAdmin_GetLogicalView_async", + "segments": [ + { + "end": 51, + "start": 27, + "type": "FULL" + }, + { + "end": 51, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 45, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 48, + "start": 46, + "type": "REQUEST_EXECUTION" + }, + { + "end": 52, + "start": 49, + "type": "RESPONSE_HANDLING" + } + ], + "title": "bigtableadmin_v2_generated_bigtable_instance_admin_get_logical_view_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.bigtable_admin_v2.BigtableInstanceAdminClient", + "shortName": "BigtableInstanceAdminClient" + }, + "fullName": "google.cloud.bigtable_admin_v2.BigtableInstanceAdminClient.get_logical_view", + "method": { + "fullName": "google.bigtable.admin.v2.BigtableInstanceAdmin.GetLogicalView", + "service": { + "fullName": "google.bigtable.admin.v2.BigtableInstanceAdmin", + "shortName": "BigtableInstanceAdmin" + }, + "shortName": "GetLogicalView" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.bigtable_admin_v2.types.GetLogicalViewRequest" + }, + { + "name": "name", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, Union[str, bytes]]]" + } + ], + "resultType": "google.cloud.bigtable_admin_v2.types.LogicalView", + "shortName": "get_logical_view" + }, + "description": "Sample for GetLogicalView", + "file": "bigtableadmin_v2_generated_bigtable_instance_admin_get_logical_view_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "bigtableadmin_v2_generated_BigtableInstanceAdmin_GetLogicalView_sync", + "segments": [ + { + "end": 51, + "start": 27, + "type": "FULL" + }, + { + "end": 51, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 45, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 48, + "start": 46, + "type": "REQUEST_EXECUTION" + }, + { + "end": 52, + "start": 49, + "type": "RESPONSE_HANDLING" + } + ], + "title": "bigtableadmin_v2_generated_bigtable_instance_admin_get_logical_view_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.bigtable_admin_v2.BigtableInstanceAdminAsyncClient", + "shortName": "BigtableInstanceAdminAsyncClient" + }, + "fullName": "google.cloud.bigtable_admin_v2.BigtableInstanceAdminAsyncClient.get_materialized_view", + "method": { + "fullName": "google.bigtable.admin.v2.BigtableInstanceAdmin.GetMaterializedView", + "service": { + "fullName": "google.bigtable.admin.v2.BigtableInstanceAdmin", + "shortName": "BigtableInstanceAdmin" + }, + "shortName": "GetMaterializedView" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.bigtable_admin_v2.types.GetMaterializedViewRequest" + }, + { + "name": "name", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, Union[str, bytes]]]" + } + ], + "resultType": "google.cloud.bigtable_admin_v2.types.MaterializedView", + "shortName": "get_materialized_view" + }, + "description": "Sample for GetMaterializedView", + "file": "bigtableadmin_v2_generated_bigtable_instance_admin_get_materialized_view_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "bigtableadmin_v2_generated_BigtableInstanceAdmin_GetMaterializedView_async", + "segments": [ + { + "end": 51, + "start": 27, + "type": "FULL" + }, + { + "end": 51, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 45, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 48, + "start": 46, + "type": "REQUEST_EXECUTION" + }, + { + "end": 52, + "start": 49, + "type": "RESPONSE_HANDLING" + } + ], + "title": "bigtableadmin_v2_generated_bigtable_instance_admin_get_materialized_view_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.bigtable_admin_v2.BigtableInstanceAdminClient", + "shortName": "BigtableInstanceAdminClient" + }, + "fullName": "google.cloud.bigtable_admin_v2.BigtableInstanceAdminClient.get_materialized_view", + "method": { + "fullName": "google.bigtable.admin.v2.BigtableInstanceAdmin.GetMaterializedView", + "service": { + "fullName": "google.bigtable.admin.v2.BigtableInstanceAdmin", + "shortName": "BigtableInstanceAdmin" + }, + "shortName": "GetMaterializedView" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.bigtable_admin_v2.types.GetMaterializedViewRequest" + }, + { + "name": "name", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, Union[str, bytes]]]" + } + ], + "resultType": "google.cloud.bigtable_admin_v2.types.MaterializedView", + "shortName": "get_materialized_view" + }, + "description": "Sample for GetMaterializedView", + "file": "bigtableadmin_v2_generated_bigtable_instance_admin_get_materialized_view_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "bigtableadmin_v2_generated_BigtableInstanceAdmin_GetMaterializedView_sync", + "segments": [ + { + "end": 51, + "start": 27, + "type": "FULL" + }, + { + "end": 51, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 45, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 48, + "start": 46, + "type": "REQUEST_EXECUTION" + }, + { + "end": 52, + "start": 49, + "type": "RESPONSE_HANDLING" + } + ], + "title": "bigtableadmin_v2_generated_bigtable_instance_admin_get_materialized_view_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.bigtable_admin_v2.BigtableInstanceAdminAsyncClient", + "shortName": "BigtableInstanceAdminAsyncClient" + }, + "fullName": "google.cloud.bigtable_admin_v2.BigtableInstanceAdminAsyncClient.list_app_profiles", + "method": { + "fullName": "google.bigtable.admin.v2.BigtableInstanceAdmin.ListAppProfiles", + "service": { + "fullName": "google.bigtable.admin.v2.BigtableInstanceAdmin", + "shortName": "BigtableInstanceAdmin" + }, + "shortName": "ListAppProfiles" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.bigtable_admin_v2.types.ListAppProfilesRequest" + }, + { + "name": "parent", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, Union[str, bytes]]]" + } + ], + "resultType": "google.cloud.bigtable_admin_v2.services.bigtable_instance_admin.pagers.ListAppProfilesAsyncPager", + "shortName": "list_app_profiles" + }, + "description": "Sample for ListAppProfiles", + "file": "bigtableadmin_v2_generated_bigtable_instance_admin_list_app_profiles_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "bigtableadmin_v2_generated_BigtableInstanceAdmin_ListAppProfiles_async", + "segments": [ + { + "end": 52, + "start": 27, + "type": "FULL" + }, + { + "end": 52, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 45, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 48, + "start": 46, + "type": "REQUEST_EXECUTION" + }, + { + "end": 53, + "start": 49, + "type": "RESPONSE_HANDLING" + } + ], + "title": "bigtableadmin_v2_generated_bigtable_instance_admin_list_app_profiles_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.bigtable_admin_v2.BigtableInstanceAdminClient", + "shortName": "BigtableInstanceAdminClient" + }, + "fullName": "google.cloud.bigtable_admin_v2.BigtableInstanceAdminClient.list_app_profiles", + "method": { + "fullName": "google.bigtable.admin.v2.BigtableInstanceAdmin.ListAppProfiles", + "service": { + "fullName": "google.bigtable.admin.v2.BigtableInstanceAdmin", + "shortName": "BigtableInstanceAdmin" + }, + "shortName": "ListAppProfiles" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.bigtable_admin_v2.types.ListAppProfilesRequest" + }, + { + "name": "parent", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, Union[str, bytes]]]" + } + ], + "resultType": "google.cloud.bigtable_admin_v2.services.bigtable_instance_admin.pagers.ListAppProfilesPager", + "shortName": "list_app_profiles" + }, + "description": "Sample for ListAppProfiles", + "file": "bigtableadmin_v2_generated_bigtable_instance_admin_list_app_profiles_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "bigtableadmin_v2_generated_BigtableInstanceAdmin_ListAppProfiles_sync", + "segments": [ + { + "end": 52, + "start": 27, + "type": "FULL" + }, + { + "end": 52, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 45, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 48, + "start": 46, + "type": "REQUEST_EXECUTION" + }, + { + "end": 53, + "start": 49, + "type": "RESPONSE_HANDLING" + } + ], + "title": "bigtableadmin_v2_generated_bigtable_instance_admin_list_app_profiles_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.bigtable_admin_v2.BigtableInstanceAdminAsyncClient", + "shortName": "BigtableInstanceAdminAsyncClient" + }, + "fullName": "google.cloud.bigtable_admin_v2.BigtableInstanceAdminAsyncClient.list_clusters", + "method": { + "fullName": "google.bigtable.admin.v2.BigtableInstanceAdmin.ListClusters", + "service": { + "fullName": "google.bigtable.admin.v2.BigtableInstanceAdmin", + "shortName": "BigtableInstanceAdmin" + }, + "shortName": "ListClusters" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.bigtable_admin_v2.types.ListClustersRequest" + }, + { + "name": "parent", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, Union[str, bytes]]]" + } + ], + "resultType": "google.cloud.bigtable_admin_v2.types.ListClustersResponse", + "shortName": "list_clusters" + }, + "description": "Sample for ListClusters", + "file": "bigtableadmin_v2_generated_bigtable_instance_admin_list_clusters_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "bigtableadmin_v2_generated_BigtableInstanceAdmin_ListClusters_async", + "segments": [ + { + "end": 51, + "start": 27, + "type": "FULL" + }, + { + "end": 51, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 45, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 48, + "start": 46, + "type": "REQUEST_EXECUTION" + }, + { + "end": 52, + "start": 49, + "type": "RESPONSE_HANDLING" + } + ], + "title": "bigtableadmin_v2_generated_bigtable_instance_admin_list_clusters_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.bigtable_admin_v2.BigtableInstanceAdminClient", + "shortName": "BigtableInstanceAdminClient" + }, + "fullName": "google.cloud.bigtable_admin_v2.BigtableInstanceAdminClient.list_clusters", + "method": { + "fullName": "google.bigtable.admin.v2.BigtableInstanceAdmin.ListClusters", + "service": { + "fullName": "google.bigtable.admin.v2.BigtableInstanceAdmin", + "shortName": "BigtableInstanceAdmin" + }, + "shortName": "ListClusters" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.bigtable_admin_v2.types.ListClustersRequest" + }, + { + "name": "parent", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, Union[str, bytes]]]" + } + ], + "resultType": "google.cloud.bigtable_admin_v2.types.ListClustersResponse", + "shortName": "list_clusters" + }, + "description": "Sample for ListClusters", + "file": "bigtableadmin_v2_generated_bigtable_instance_admin_list_clusters_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "bigtableadmin_v2_generated_BigtableInstanceAdmin_ListClusters_sync", + "segments": [ + { + "end": 51, + "start": 27, + "type": "FULL" + }, + { + "end": 51, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 45, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 48, + "start": 46, + "type": "REQUEST_EXECUTION" + }, + { + "end": 52, + "start": 49, + "type": "RESPONSE_HANDLING" + } + ], + "title": "bigtableadmin_v2_generated_bigtable_instance_admin_list_clusters_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.bigtable_admin_v2.BigtableInstanceAdminAsyncClient", + "shortName": "BigtableInstanceAdminAsyncClient" + }, + "fullName": "google.cloud.bigtable_admin_v2.BigtableInstanceAdminAsyncClient.list_hot_tablets", + "method": { + "fullName": "google.bigtable.admin.v2.BigtableInstanceAdmin.ListHotTablets", + "service": { + "fullName": "google.bigtable.admin.v2.BigtableInstanceAdmin", + "shortName": "BigtableInstanceAdmin" + }, + "shortName": "ListHotTablets" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.bigtable_admin_v2.types.ListHotTabletsRequest" + }, + { + "name": "parent", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, Union[str, bytes]]]" + } + ], + "resultType": "google.cloud.bigtable_admin_v2.services.bigtable_instance_admin.pagers.ListHotTabletsAsyncPager", + "shortName": "list_hot_tablets" + }, + "description": "Sample for ListHotTablets", + "file": "bigtableadmin_v2_generated_bigtable_instance_admin_list_hot_tablets_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "bigtableadmin_v2_generated_BigtableInstanceAdmin_ListHotTablets_async", + "segments": [ + { + "end": 52, + "start": 27, + "type": "FULL" + }, + { + "end": 52, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 45, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 48, + "start": 46, + "type": "REQUEST_EXECUTION" + }, + { + "end": 53, + "start": 49, + "type": "RESPONSE_HANDLING" + } + ], + "title": "bigtableadmin_v2_generated_bigtable_instance_admin_list_hot_tablets_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.bigtable_admin_v2.BigtableInstanceAdminClient", + "shortName": "BigtableInstanceAdminClient" + }, + "fullName": "google.cloud.bigtable_admin_v2.BigtableInstanceAdminClient.list_hot_tablets", + "method": { + "fullName": "google.bigtable.admin.v2.BigtableInstanceAdmin.ListHotTablets", + "service": { + "fullName": "google.bigtable.admin.v2.BigtableInstanceAdmin", + "shortName": "BigtableInstanceAdmin" + }, + "shortName": "ListHotTablets" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.bigtable_admin_v2.types.ListHotTabletsRequest" + }, + { + "name": "parent", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, Union[str, bytes]]]" + } + ], + "resultType": "google.cloud.bigtable_admin_v2.services.bigtable_instance_admin.pagers.ListHotTabletsPager", + "shortName": "list_hot_tablets" + }, + "description": "Sample for ListHotTablets", + "file": "bigtableadmin_v2_generated_bigtable_instance_admin_list_hot_tablets_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "bigtableadmin_v2_generated_BigtableInstanceAdmin_ListHotTablets_sync", + "segments": [ + { + "end": 52, + "start": 27, + "type": "FULL" + }, + { + "end": 52, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 45, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 48, + "start": 46, + "type": "REQUEST_EXECUTION" + }, + { + "end": 53, + "start": 49, + "type": "RESPONSE_HANDLING" + } + ], + "title": "bigtableadmin_v2_generated_bigtable_instance_admin_list_hot_tablets_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.bigtable_admin_v2.BigtableInstanceAdminAsyncClient", + "shortName": "BigtableInstanceAdminAsyncClient" + }, + "fullName": "google.cloud.bigtable_admin_v2.BigtableInstanceAdminAsyncClient.list_instances", + "method": { + "fullName": "google.bigtable.admin.v2.BigtableInstanceAdmin.ListInstances", + "service": { + "fullName": "google.bigtable.admin.v2.BigtableInstanceAdmin", + "shortName": "BigtableInstanceAdmin" + }, + "shortName": "ListInstances" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.bigtable_admin_v2.types.ListInstancesRequest" + }, + { + "name": "parent", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, Union[str, bytes]]]" + } + ], + "resultType": "google.cloud.bigtable_admin_v2.types.ListInstancesResponse", + "shortName": "list_instances" + }, + "description": "Sample for ListInstances", + "file": "bigtableadmin_v2_generated_bigtable_instance_admin_list_instances_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "bigtableadmin_v2_generated_BigtableInstanceAdmin_ListInstances_async", + "segments": [ + { + "end": 51, + "start": 27, + "type": "FULL" + }, + { + "end": 51, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 45, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 48, + "start": 46, + "type": "REQUEST_EXECUTION" + }, + { + "end": 52, + "start": 49, + "type": "RESPONSE_HANDLING" + } + ], + "title": "bigtableadmin_v2_generated_bigtable_instance_admin_list_instances_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.bigtable_admin_v2.BigtableInstanceAdminClient", + "shortName": "BigtableInstanceAdminClient" + }, + "fullName": "google.cloud.bigtable_admin_v2.BigtableInstanceAdminClient.list_instances", + "method": { + "fullName": "google.bigtable.admin.v2.BigtableInstanceAdmin.ListInstances", + "service": { + "fullName": "google.bigtable.admin.v2.BigtableInstanceAdmin", + "shortName": "BigtableInstanceAdmin" + }, + "shortName": "ListInstances" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.bigtable_admin_v2.types.ListInstancesRequest" + }, + { + "name": "parent", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, Union[str, bytes]]]" + } + ], + "resultType": "google.cloud.bigtable_admin_v2.types.ListInstancesResponse", + "shortName": "list_instances" + }, + "description": "Sample for ListInstances", + "file": "bigtableadmin_v2_generated_bigtable_instance_admin_list_instances_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "bigtableadmin_v2_generated_BigtableInstanceAdmin_ListInstances_sync", + "segments": [ + { + "end": 51, + "start": 27, + "type": "FULL" + }, + { + "end": 51, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 45, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 48, + "start": 46, + "type": "REQUEST_EXECUTION" + }, + { + "end": 52, + "start": 49, + "type": "RESPONSE_HANDLING" + } + ], + "title": "bigtableadmin_v2_generated_bigtable_instance_admin_list_instances_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.bigtable_admin_v2.BigtableInstanceAdminAsyncClient", + "shortName": "BigtableInstanceAdminAsyncClient" + }, + "fullName": "google.cloud.bigtable_admin_v2.BigtableInstanceAdminAsyncClient.list_logical_views", + "method": { + "fullName": "google.bigtable.admin.v2.BigtableInstanceAdmin.ListLogicalViews", + "service": { + "fullName": "google.bigtable.admin.v2.BigtableInstanceAdmin", + "shortName": "BigtableInstanceAdmin" + }, + "shortName": "ListLogicalViews" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.bigtable_admin_v2.types.ListLogicalViewsRequest" + }, + { + "name": "parent", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, Union[str, bytes]]]" + } + ], + "resultType": "google.cloud.bigtable_admin_v2.services.bigtable_instance_admin.pagers.ListLogicalViewsAsyncPager", + "shortName": "list_logical_views" + }, + "description": "Sample for ListLogicalViews", + "file": "bigtableadmin_v2_generated_bigtable_instance_admin_list_logical_views_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "bigtableadmin_v2_generated_BigtableInstanceAdmin_ListLogicalViews_async", + "segments": [ + { + "end": 52, + "start": 27, + "type": "FULL" + }, + { + "end": 52, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 45, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 48, + "start": 46, + "type": "REQUEST_EXECUTION" + }, + { + "end": 53, + "start": 49, + "type": "RESPONSE_HANDLING" + } + ], + "title": "bigtableadmin_v2_generated_bigtable_instance_admin_list_logical_views_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.bigtable_admin_v2.BigtableInstanceAdminClient", + "shortName": "BigtableInstanceAdminClient" + }, + "fullName": "google.cloud.bigtable_admin_v2.BigtableInstanceAdminClient.list_logical_views", + "method": { + "fullName": "google.bigtable.admin.v2.BigtableInstanceAdmin.ListLogicalViews", + "service": { + "fullName": "google.bigtable.admin.v2.BigtableInstanceAdmin", + "shortName": "BigtableInstanceAdmin" + }, + "shortName": "ListLogicalViews" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.bigtable_admin_v2.types.ListLogicalViewsRequest" + }, + { + "name": "parent", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, Union[str, bytes]]]" + } + ], + "resultType": "google.cloud.bigtable_admin_v2.services.bigtable_instance_admin.pagers.ListLogicalViewsPager", + "shortName": "list_logical_views" + }, + "description": "Sample for ListLogicalViews", + "file": "bigtableadmin_v2_generated_bigtable_instance_admin_list_logical_views_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "bigtableadmin_v2_generated_BigtableInstanceAdmin_ListLogicalViews_sync", + "segments": [ + { + "end": 52, + "start": 27, + "type": "FULL" + }, + { + "end": 52, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 45, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 48, + "start": 46, + "type": "REQUEST_EXECUTION" + }, + { + "end": 53, + "start": 49, + "type": "RESPONSE_HANDLING" + } + ], + "title": "bigtableadmin_v2_generated_bigtable_instance_admin_list_logical_views_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.bigtable_admin_v2.BigtableInstanceAdminAsyncClient", + "shortName": "BigtableInstanceAdminAsyncClient" + }, + "fullName": "google.cloud.bigtable_admin_v2.BigtableInstanceAdminAsyncClient.list_materialized_views", + "method": { + "fullName": "google.bigtable.admin.v2.BigtableInstanceAdmin.ListMaterializedViews", + "service": { + "fullName": "google.bigtable.admin.v2.BigtableInstanceAdmin", + "shortName": "BigtableInstanceAdmin" + }, + "shortName": "ListMaterializedViews" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.bigtable_admin_v2.types.ListMaterializedViewsRequest" + }, + { + "name": "parent", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, Union[str, bytes]]]" + } + ], + "resultType": "google.cloud.bigtable_admin_v2.services.bigtable_instance_admin.pagers.ListMaterializedViewsAsyncPager", + "shortName": "list_materialized_views" + }, + "description": "Sample for ListMaterializedViews", + "file": "bigtableadmin_v2_generated_bigtable_instance_admin_list_materialized_views_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "bigtableadmin_v2_generated_BigtableInstanceAdmin_ListMaterializedViews_async", + "segments": [ + { + "end": 52, + "start": 27, + "type": "FULL" + }, + { + "end": 52, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 45, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 48, + "start": 46, + "type": "REQUEST_EXECUTION" + }, + { + "end": 53, + "start": 49, + "type": "RESPONSE_HANDLING" + } + ], + "title": "bigtableadmin_v2_generated_bigtable_instance_admin_list_materialized_views_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.bigtable_admin_v2.BigtableInstanceAdminClient", + "shortName": "BigtableInstanceAdminClient" + }, + "fullName": "google.cloud.bigtable_admin_v2.BigtableInstanceAdminClient.list_materialized_views", + "method": { + "fullName": "google.bigtable.admin.v2.BigtableInstanceAdmin.ListMaterializedViews", + "service": { + "fullName": "google.bigtable.admin.v2.BigtableInstanceAdmin", + "shortName": "BigtableInstanceAdmin" + }, + "shortName": "ListMaterializedViews" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.bigtable_admin_v2.types.ListMaterializedViewsRequest" + }, + { + "name": "parent", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, Union[str, bytes]]]" + } + ], + "resultType": "google.cloud.bigtable_admin_v2.services.bigtable_instance_admin.pagers.ListMaterializedViewsPager", + "shortName": "list_materialized_views" + }, + "description": "Sample for ListMaterializedViews", + "file": "bigtableadmin_v2_generated_bigtable_instance_admin_list_materialized_views_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "bigtableadmin_v2_generated_BigtableInstanceAdmin_ListMaterializedViews_sync", + "segments": [ + { + "end": 52, + "start": 27, + "type": "FULL" + }, + { + "end": 52, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 45, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 48, + "start": 46, + "type": "REQUEST_EXECUTION" + }, + { + "end": 53, + "start": 49, + "type": "RESPONSE_HANDLING" + } + ], + "title": "bigtableadmin_v2_generated_bigtable_instance_admin_list_materialized_views_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.bigtable_admin_v2.BigtableInstanceAdminAsyncClient", + "shortName": "BigtableInstanceAdminAsyncClient" + }, + "fullName": "google.cloud.bigtable_admin_v2.BigtableInstanceAdminAsyncClient.partial_update_cluster", + "method": { + "fullName": "google.bigtable.admin.v2.BigtableInstanceAdmin.PartialUpdateCluster", + "service": { + "fullName": "google.bigtable.admin.v2.BigtableInstanceAdmin", + "shortName": "BigtableInstanceAdmin" + }, + "shortName": "PartialUpdateCluster" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.bigtable_admin_v2.types.PartialUpdateClusterRequest" + }, + { + "name": "cluster", + "type": "google.cloud.bigtable_admin_v2.types.Cluster" + }, + { + "name": "update_mask", + "type": "google.protobuf.field_mask_pb2.FieldMask" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, Union[str, bytes]]]" + } + ], + "resultType": "google.api_core.operation_async.AsyncOperation", + "shortName": "partial_update_cluster" + }, + "description": "Sample for PartialUpdateCluster", + "file": "bigtableadmin_v2_generated_bigtable_instance_admin_partial_update_cluster_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "bigtableadmin_v2_generated_BigtableInstanceAdmin_PartialUpdateCluster_async", + "segments": [ + { + "end": 54, + "start": 27, + "type": "FULL" + }, + { + "end": 54, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 44, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 51, + "start": 45, + "type": "REQUEST_EXECUTION" + }, + { + "end": 55, + "start": 52, + "type": "RESPONSE_HANDLING" + } + ], + "title": "bigtableadmin_v2_generated_bigtable_instance_admin_partial_update_cluster_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.bigtable_admin_v2.BigtableInstanceAdminClient", + "shortName": "BigtableInstanceAdminClient" + }, + "fullName": "google.cloud.bigtable_admin_v2.BigtableInstanceAdminClient.partial_update_cluster", + "method": { + "fullName": "google.bigtable.admin.v2.BigtableInstanceAdmin.PartialUpdateCluster", + "service": { + "fullName": "google.bigtable.admin.v2.BigtableInstanceAdmin", + "shortName": "BigtableInstanceAdmin" + }, + "shortName": "PartialUpdateCluster" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.bigtable_admin_v2.types.PartialUpdateClusterRequest" + }, + { + "name": "cluster", + "type": "google.cloud.bigtable_admin_v2.types.Cluster" + }, + { + "name": "update_mask", + "type": "google.protobuf.field_mask_pb2.FieldMask" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, Union[str, bytes]]]" + } + ], + "resultType": "google.api_core.operation.Operation", + "shortName": "partial_update_cluster" + }, + "description": "Sample for PartialUpdateCluster", + "file": "bigtableadmin_v2_generated_bigtable_instance_admin_partial_update_cluster_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "bigtableadmin_v2_generated_BigtableInstanceAdmin_PartialUpdateCluster_sync", + "segments": [ + { + "end": 54, + "start": 27, + "type": "FULL" + }, + { + "end": 54, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 44, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 51, + "start": 45, + "type": "REQUEST_EXECUTION" + }, + { + "end": 55, + "start": 52, + "type": "RESPONSE_HANDLING" + } + ], + "title": "bigtableadmin_v2_generated_bigtable_instance_admin_partial_update_cluster_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.bigtable_admin_v2.BigtableInstanceAdminAsyncClient", + "shortName": "BigtableInstanceAdminAsyncClient" + }, + "fullName": "google.cloud.bigtable_admin_v2.BigtableInstanceAdminAsyncClient.partial_update_instance", + "method": { + "fullName": "google.bigtable.admin.v2.BigtableInstanceAdmin.PartialUpdateInstance", + "service": { + "fullName": "google.bigtable.admin.v2.BigtableInstanceAdmin", + "shortName": "BigtableInstanceAdmin" + }, + "shortName": "PartialUpdateInstance" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.bigtable_admin_v2.types.PartialUpdateInstanceRequest" + }, + { + "name": "instance", + "type": "google.cloud.bigtable_admin_v2.types.Instance" + }, + { + "name": "update_mask", + "type": "google.protobuf.field_mask_pb2.FieldMask" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, Union[str, bytes]]]" + } + ], + "resultType": "google.api_core.operation_async.AsyncOperation", + "shortName": "partial_update_instance" + }, + "description": "Sample for PartialUpdateInstance", + "file": "bigtableadmin_v2_generated_bigtable_instance_admin_partial_update_instance_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "bigtableadmin_v2_generated_BigtableInstanceAdmin_PartialUpdateInstance_async", + "segments": [ + { + "end": 58, + "start": 27, + "type": "FULL" + }, + { + "end": 58, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 48, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 55, + "start": 49, + "type": "REQUEST_EXECUTION" + }, + { + "end": 59, + "start": 56, + "type": "RESPONSE_HANDLING" + } + ], + "title": "bigtableadmin_v2_generated_bigtable_instance_admin_partial_update_instance_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.bigtable_admin_v2.BigtableInstanceAdminClient", + "shortName": "BigtableInstanceAdminClient" + }, + "fullName": "google.cloud.bigtable_admin_v2.BigtableInstanceAdminClient.partial_update_instance", + "method": { + "fullName": "google.bigtable.admin.v2.BigtableInstanceAdmin.PartialUpdateInstance", + "service": { + "fullName": "google.bigtable.admin.v2.BigtableInstanceAdmin", + "shortName": "BigtableInstanceAdmin" + }, + "shortName": "PartialUpdateInstance" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.bigtable_admin_v2.types.PartialUpdateInstanceRequest" + }, + { + "name": "instance", + "type": "google.cloud.bigtable_admin_v2.types.Instance" + }, + { + "name": "update_mask", + "type": "google.protobuf.field_mask_pb2.FieldMask" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, Union[str, bytes]]]" + } + ], + "resultType": "google.api_core.operation.Operation", + "shortName": "partial_update_instance" + }, + "description": "Sample for PartialUpdateInstance", + "file": "bigtableadmin_v2_generated_bigtable_instance_admin_partial_update_instance_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "bigtableadmin_v2_generated_BigtableInstanceAdmin_PartialUpdateInstance_sync", + "segments": [ + { + "end": 58, + "start": 27, + "type": "FULL" + }, + { + "end": 58, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 48, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 55, + "start": 49, + "type": "REQUEST_EXECUTION" + }, + { + "end": 59, + "start": 56, + "type": "RESPONSE_HANDLING" + } + ], + "title": "bigtableadmin_v2_generated_bigtable_instance_admin_partial_update_instance_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.bigtable_admin_v2.BigtableInstanceAdminAsyncClient", + "shortName": "BigtableInstanceAdminAsyncClient" + }, + "fullName": "google.cloud.bigtable_admin_v2.BigtableInstanceAdminAsyncClient.set_iam_policy", + "method": { + "fullName": "google.bigtable.admin.v2.BigtableInstanceAdmin.SetIamPolicy", + "service": { + "fullName": "google.bigtable.admin.v2.BigtableInstanceAdmin", + "shortName": "BigtableInstanceAdmin" + }, + "shortName": "SetIamPolicy" + }, + "parameters": [ + { + "name": "request", + "type": "google.iam.v1.iam_policy_pb2.SetIamPolicyRequest" + }, + { + "name": "resource", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, Union[str, bytes]]]" + } + ], + "resultType": "google.iam.v1.policy_pb2.Policy", + "shortName": "set_iam_policy" + }, + "description": "Sample for SetIamPolicy", + "file": "bigtableadmin_v2_generated_bigtable_instance_admin_set_iam_policy_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "bigtableadmin_v2_generated_BigtableInstanceAdmin_SetIamPolicy_async", + "segments": [ + { + "end": 52, + "start": 27, + "type": "FULL" + }, + { + "end": 52, + "start": 27, + "type": "SHORT" + }, + { + "end": 41, + "start": 39, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 46, + "start": 42, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 49, + "start": 47, + "type": "REQUEST_EXECUTION" + }, + { + "end": 53, + "start": 50, + "type": "RESPONSE_HANDLING" + } + ], + "title": "bigtableadmin_v2_generated_bigtable_instance_admin_set_iam_policy_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.bigtable_admin_v2.BigtableInstanceAdminClient", + "shortName": "BigtableInstanceAdminClient" + }, + "fullName": "google.cloud.bigtable_admin_v2.BigtableInstanceAdminClient.set_iam_policy", + "method": { + "fullName": "google.bigtable.admin.v2.BigtableInstanceAdmin.SetIamPolicy", + "service": { + "fullName": "google.bigtable.admin.v2.BigtableInstanceAdmin", + "shortName": "BigtableInstanceAdmin" + }, + "shortName": "SetIamPolicy" + }, + "parameters": [ + { + "name": "request", + "type": "google.iam.v1.iam_policy_pb2.SetIamPolicyRequest" + }, + { + "name": "resource", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, Union[str, bytes]]]" + } + ], + "resultType": "google.iam.v1.policy_pb2.Policy", + "shortName": "set_iam_policy" + }, + "description": "Sample for SetIamPolicy", + "file": "bigtableadmin_v2_generated_bigtable_instance_admin_set_iam_policy_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "bigtableadmin_v2_generated_BigtableInstanceAdmin_SetIamPolicy_sync", + "segments": [ + { + "end": 52, + "start": 27, + "type": "FULL" + }, + { + "end": 52, + "start": 27, + "type": "SHORT" + }, + { + "end": 41, + "start": 39, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 46, + "start": 42, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 49, + "start": 47, + "type": "REQUEST_EXECUTION" + }, + { + "end": 53, + "start": 50, + "type": "RESPONSE_HANDLING" + } + ], + "title": "bigtableadmin_v2_generated_bigtable_instance_admin_set_iam_policy_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.bigtable_admin_v2.BigtableInstanceAdminAsyncClient", + "shortName": "BigtableInstanceAdminAsyncClient" + }, + "fullName": "google.cloud.bigtable_admin_v2.BigtableInstanceAdminAsyncClient.test_iam_permissions", + "method": { + "fullName": "google.bigtable.admin.v2.BigtableInstanceAdmin.TestIamPermissions", + "service": { + "fullName": "google.bigtable.admin.v2.BigtableInstanceAdmin", + "shortName": "BigtableInstanceAdmin" + }, + "shortName": "TestIamPermissions" + }, + "parameters": [ + { + "name": "request", + "type": "google.iam.v1.iam_policy_pb2.TestIamPermissionsRequest" + }, + { + "name": "resource", + "type": "str" + }, + { + "name": "permissions", + "type": "MutableSequence[str]" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, Union[str, bytes]]]" + } + ], + "resultType": "google.iam.v1.iam_policy_pb2.TestIamPermissionsResponse", + "shortName": "test_iam_permissions" + }, + "description": "Sample for TestIamPermissions", + "file": "bigtableadmin_v2_generated_bigtable_instance_admin_test_iam_permissions_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "bigtableadmin_v2_generated_BigtableInstanceAdmin_TestIamPermissions_async", + "segments": [ + { + "end": 53, + "start": 27, + "type": "FULL" + }, + { + "end": 53, + "start": 27, + "type": "SHORT" + }, + { + "end": 41, + "start": 39, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 47, + "start": 42, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 50, + "start": 48, + "type": "REQUEST_EXECUTION" + }, + { + "end": 54, + "start": 51, + "type": "RESPONSE_HANDLING" + } + ], + "title": "bigtableadmin_v2_generated_bigtable_instance_admin_test_iam_permissions_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.bigtable_admin_v2.BigtableInstanceAdminClient", + "shortName": "BigtableInstanceAdminClient" + }, + "fullName": "google.cloud.bigtable_admin_v2.BigtableInstanceAdminClient.test_iam_permissions", + "method": { + "fullName": "google.bigtable.admin.v2.BigtableInstanceAdmin.TestIamPermissions", + "service": { + "fullName": "google.bigtable.admin.v2.BigtableInstanceAdmin", + "shortName": "BigtableInstanceAdmin" + }, + "shortName": "TestIamPermissions" + }, + "parameters": [ + { + "name": "request", + "type": "google.iam.v1.iam_policy_pb2.TestIamPermissionsRequest" + }, + { + "name": "resource", + "type": "str" + }, + { + "name": "permissions", + "type": "MutableSequence[str]" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, Union[str, bytes]]]" + } + ], + "resultType": "google.iam.v1.iam_policy_pb2.TestIamPermissionsResponse", + "shortName": "test_iam_permissions" + }, + "description": "Sample for TestIamPermissions", + "file": "bigtableadmin_v2_generated_bigtable_instance_admin_test_iam_permissions_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "bigtableadmin_v2_generated_BigtableInstanceAdmin_TestIamPermissions_sync", + "segments": [ + { + "end": 53, + "start": 27, + "type": "FULL" + }, + { + "end": 53, + "start": 27, + "type": "SHORT" + }, + { + "end": 41, + "start": 39, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 47, + "start": 42, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 50, + "start": 48, + "type": "REQUEST_EXECUTION" + }, + { + "end": 54, + "start": 51, + "type": "RESPONSE_HANDLING" + } + ], + "title": "bigtableadmin_v2_generated_bigtable_instance_admin_test_iam_permissions_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.bigtable_admin_v2.BigtableInstanceAdminAsyncClient", + "shortName": "BigtableInstanceAdminAsyncClient" + }, + "fullName": "google.cloud.bigtable_admin_v2.BigtableInstanceAdminAsyncClient.update_app_profile", + "method": { + "fullName": "google.bigtable.admin.v2.BigtableInstanceAdmin.UpdateAppProfile", + "service": { + "fullName": "google.bigtable.admin.v2.BigtableInstanceAdmin", + "shortName": "BigtableInstanceAdmin" + }, + "shortName": "UpdateAppProfile" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.bigtable_admin_v2.types.UpdateAppProfileRequest" + }, + { + "name": "app_profile", + "type": "google.cloud.bigtable_admin_v2.types.AppProfile" + }, + { + "name": "update_mask", + "type": "google.protobuf.field_mask_pb2.FieldMask" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, Union[str, bytes]]]" + } + ], + "resultType": "google.api_core.operation_async.AsyncOperation", + "shortName": "update_app_profile" + }, + "description": "Sample for UpdateAppProfile", + "file": "bigtableadmin_v2_generated_bigtable_instance_admin_update_app_profile_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "bigtableadmin_v2_generated_BigtableInstanceAdmin_UpdateAppProfile_async", + "segments": [ + { + "end": 58, + "start": 27, + "type": "FULL" + }, + { + "end": 58, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 48, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 55, + "start": 49, + "type": "REQUEST_EXECUTION" + }, + { + "end": 59, + "start": 56, + "type": "RESPONSE_HANDLING" + } + ], + "title": "bigtableadmin_v2_generated_bigtable_instance_admin_update_app_profile_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.bigtable_admin_v2.BigtableInstanceAdminClient", + "shortName": "BigtableInstanceAdminClient" + }, + "fullName": "google.cloud.bigtable_admin_v2.BigtableInstanceAdminClient.update_app_profile", + "method": { + "fullName": "google.bigtable.admin.v2.BigtableInstanceAdmin.UpdateAppProfile", + "service": { + "fullName": "google.bigtable.admin.v2.BigtableInstanceAdmin", + "shortName": "BigtableInstanceAdmin" + }, + "shortName": "UpdateAppProfile" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.bigtable_admin_v2.types.UpdateAppProfileRequest" + }, + { + "name": "app_profile", + "type": "google.cloud.bigtable_admin_v2.types.AppProfile" + }, + { + "name": "update_mask", + "type": "google.protobuf.field_mask_pb2.FieldMask" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, Union[str, bytes]]]" + } + ], + "resultType": "google.api_core.operation.Operation", + "shortName": "update_app_profile" + }, + "description": "Sample for UpdateAppProfile", + "file": "bigtableadmin_v2_generated_bigtable_instance_admin_update_app_profile_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "bigtableadmin_v2_generated_BigtableInstanceAdmin_UpdateAppProfile_sync", + "segments": [ + { + "end": 58, + "start": 27, + "type": "FULL" + }, + { + "end": 58, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 48, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 55, + "start": 49, + "type": "REQUEST_EXECUTION" + }, + { + "end": 59, + "start": 56, + "type": "RESPONSE_HANDLING" + } + ], + "title": "bigtableadmin_v2_generated_bigtable_instance_admin_update_app_profile_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.bigtable_admin_v2.BigtableInstanceAdminAsyncClient", + "shortName": "BigtableInstanceAdminAsyncClient" + }, + "fullName": "google.cloud.bigtable_admin_v2.BigtableInstanceAdminAsyncClient.update_cluster", + "method": { + "fullName": "google.bigtable.admin.v2.BigtableInstanceAdmin.UpdateCluster", + "service": { + "fullName": "google.bigtable.admin.v2.BigtableInstanceAdmin", + "shortName": "BigtableInstanceAdmin" + }, + "shortName": "UpdateCluster" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.bigtable_admin_v2.types.Cluster" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, Union[str, bytes]]]" + } + ], + "resultType": "google.api_core.operation_async.AsyncOperation", + "shortName": "update_cluster" + }, + "description": "Sample for UpdateCluster", + "file": "bigtableadmin_v2_generated_bigtable_instance_admin_update_cluster_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "bigtableadmin_v2_generated_BigtableInstanceAdmin_UpdateCluster_async", + "segments": [ + { + "end": 54, + "start": 27, + "type": "FULL" + }, + { + "end": 54, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 44, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 51, + "start": 45, + "type": "REQUEST_EXECUTION" + }, + { + "end": 55, + "start": 52, + "type": "RESPONSE_HANDLING" + } + ], + "title": "bigtableadmin_v2_generated_bigtable_instance_admin_update_cluster_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.bigtable_admin_v2.BigtableInstanceAdminClient", + "shortName": "BigtableInstanceAdminClient" + }, + "fullName": "google.cloud.bigtable_admin_v2.BigtableInstanceAdminClient.update_cluster", + "method": { + "fullName": "google.bigtable.admin.v2.BigtableInstanceAdmin.UpdateCluster", + "service": { + "fullName": "google.bigtable.admin.v2.BigtableInstanceAdmin", + "shortName": "BigtableInstanceAdmin" + }, + "shortName": "UpdateCluster" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.bigtable_admin_v2.types.Cluster" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, Union[str, bytes]]]" + } + ], + "resultType": "google.api_core.operation.Operation", + "shortName": "update_cluster" + }, + "description": "Sample for UpdateCluster", + "file": "bigtableadmin_v2_generated_bigtable_instance_admin_update_cluster_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "bigtableadmin_v2_generated_BigtableInstanceAdmin_UpdateCluster_sync", + "segments": [ + { + "end": 54, + "start": 27, + "type": "FULL" + }, + { + "end": 54, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 44, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 51, + "start": 45, + "type": "REQUEST_EXECUTION" + }, + { + "end": 55, + "start": 52, + "type": "RESPONSE_HANDLING" + } + ], + "title": "bigtableadmin_v2_generated_bigtable_instance_admin_update_cluster_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.bigtable_admin_v2.BigtableInstanceAdminAsyncClient", + "shortName": "BigtableInstanceAdminAsyncClient" + }, + "fullName": "google.cloud.bigtable_admin_v2.BigtableInstanceAdminAsyncClient.update_instance", + "method": { + "fullName": "google.bigtable.admin.v2.BigtableInstanceAdmin.UpdateInstance", + "service": { + "fullName": "google.bigtable.admin.v2.BigtableInstanceAdmin", + "shortName": "BigtableInstanceAdmin" + }, + "shortName": "UpdateInstance" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.bigtable_admin_v2.types.Instance" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, Union[str, bytes]]]" + } + ], + "resultType": "google.cloud.bigtable_admin_v2.types.Instance", + "shortName": "update_instance" + }, + "description": "Sample for UpdateInstance", + "file": "bigtableadmin_v2_generated_bigtable_instance_admin_update_instance_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "bigtableadmin_v2_generated_BigtableInstanceAdmin_UpdateInstance_async", + "segments": [ + { + "end": 51, + "start": 27, + "type": "FULL" + }, + { + "end": 51, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 45, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 48, + "start": 46, + "type": "REQUEST_EXECUTION" + }, + { + "end": 52, + "start": 49, + "type": "RESPONSE_HANDLING" + } + ], + "title": "bigtableadmin_v2_generated_bigtable_instance_admin_update_instance_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.bigtable_admin_v2.BigtableInstanceAdminClient", + "shortName": "BigtableInstanceAdminClient" + }, + "fullName": "google.cloud.bigtable_admin_v2.BigtableInstanceAdminClient.update_instance", + "method": { + "fullName": "google.bigtable.admin.v2.BigtableInstanceAdmin.UpdateInstance", + "service": { + "fullName": "google.bigtable.admin.v2.BigtableInstanceAdmin", + "shortName": "BigtableInstanceAdmin" + }, + "shortName": "UpdateInstance" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.bigtable_admin_v2.types.Instance" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, Union[str, bytes]]]" + } + ], + "resultType": "google.cloud.bigtable_admin_v2.types.Instance", + "shortName": "update_instance" + }, + "description": "Sample for UpdateInstance", + "file": "bigtableadmin_v2_generated_bigtable_instance_admin_update_instance_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "bigtableadmin_v2_generated_BigtableInstanceAdmin_UpdateInstance_sync", + "segments": [ + { + "end": 51, + "start": 27, + "type": "FULL" + }, + { + "end": 51, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 45, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 48, + "start": 46, + "type": "REQUEST_EXECUTION" + }, + { + "end": 52, + "start": 49, + "type": "RESPONSE_HANDLING" + } + ], + "title": "bigtableadmin_v2_generated_bigtable_instance_admin_update_instance_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.bigtable_admin_v2.BigtableInstanceAdminAsyncClient", + "shortName": "BigtableInstanceAdminAsyncClient" + }, + "fullName": "google.cloud.bigtable_admin_v2.BigtableInstanceAdminAsyncClient.update_logical_view", + "method": { + "fullName": "google.bigtable.admin.v2.BigtableInstanceAdmin.UpdateLogicalView", + "service": { + "fullName": "google.bigtable.admin.v2.BigtableInstanceAdmin", + "shortName": "BigtableInstanceAdmin" + }, + "shortName": "UpdateLogicalView" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.bigtable_admin_v2.types.UpdateLogicalViewRequest" + }, + { + "name": "logical_view", + "type": "google.cloud.bigtable_admin_v2.types.LogicalView" + }, + { + "name": "update_mask", + "type": "google.protobuf.field_mask_pb2.FieldMask" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, Union[str, bytes]]]" + } + ], + "resultType": "google.api_core.operation_async.AsyncOperation", + "shortName": "update_logical_view" + }, + "description": "Sample for UpdateLogicalView", + "file": "bigtableadmin_v2_generated_bigtable_instance_admin_update_logical_view_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "bigtableadmin_v2_generated_BigtableInstanceAdmin_UpdateLogicalView_async", + "segments": [ + { + "end": 58, + "start": 27, + "type": "FULL" + }, + { + "end": 58, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 48, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 55, + "start": 49, + "type": "REQUEST_EXECUTION" + }, + { + "end": 59, + "start": 56, + "type": "RESPONSE_HANDLING" + } + ], + "title": "bigtableadmin_v2_generated_bigtable_instance_admin_update_logical_view_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.bigtable_admin_v2.BigtableInstanceAdminClient", + "shortName": "BigtableInstanceAdminClient" + }, + "fullName": "google.cloud.bigtable_admin_v2.BigtableInstanceAdminClient.update_logical_view", + "method": { + "fullName": "google.bigtable.admin.v2.BigtableInstanceAdmin.UpdateLogicalView", + "service": { + "fullName": "google.bigtable.admin.v2.BigtableInstanceAdmin", + "shortName": "BigtableInstanceAdmin" + }, + "shortName": "UpdateLogicalView" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.bigtable_admin_v2.types.UpdateLogicalViewRequest" + }, + { + "name": "logical_view", + "type": "google.cloud.bigtable_admin_v2.types.LogicalView" + }, + { + "name": "update_mask", + "type": "google.protobuf.field_mask_pb2.FieldMask" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, Union[str, bytes]]]" + } + ], + "resultType": "google.api_core.operation.Operation", + "shortName": "update_logical_view" + }, + "description": "Sample for UpdateLogicalView", + "file": "bigtableadmin_v2_generated_bigtable_instance_admin_update_logical_view_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "bigtableadmin_v2_generated_BigtableInstanceAdmin_UpdateLogicalView_sync", + "segments": [ + { + "end": 58, + "start": 27, + "type": "FULL" + }, + { + "end": 58, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 48, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 55, + "start": 49, + "type": "REQUEST_EXECUTION" + }, + { + "end": 59, + "start": 56, + "type": "RESPONSE_HANDLING" + } + ], + "title": "bigtableadmin_v2_generated_bigtable_instance_admin_update_logical_view_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.bigtable_admin_v2.BigtableInstanceAdminAsyncClient", + "shortName": "BigtableInstanceAdminAsyncClient" + }, + "fullName": "google.cloud.bigtable_admin_v2.BigtableInstanceAdminAsyncClient.update_materialized_view", + "method": { + "fullName": "google.bigtable.admin.v2.BigtableInstanceAdmin.UpdateMaterializedView", + "service": { + "fullName": "google.bigtable.admin.v2.BigtableInstanceAdmin", + "shortName": "BigtableInstanceAdmin" + }, + "shortName": "UpdateMaterializedView" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.bigtable_admin_v2.types.UpdateMaterializedViewRequest" + }, + { + "name": "materialized_view", + "type": "google.cloud.bigtable_admin_v2.types.MaterializedView" + }, + { + "name": "update_mask", + "type": "google.protobuf.field_mask_pb2.FieldMask" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, Union[str, bytes]]]" + } + ], + "resultType": "google.api_core.operation_async.AsyncOperation", + "shortName": "update_materialized_view" + }, + "description": "Sample for UpdateMaterializedView", + "file": "bigtableadmin_v2_generated_bigtable_instance_admin_update_materialized_view_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "bigtableadmin_v2_generated_BigtableInstanceAdmin_UpdateMaterializedView_async", + "segments": [ + { + "end": 58, + "start": 27, + "type": "FULL" + }, + { + "end": 58, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 48, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 55, + "start": 49, + "type": "REQUEST_EXECUTION" + }, + { + "end": 59, + "start": 56, + "type": "RESPONSE_HANDLING" + } + ], + "title": "bigtableadmin_v2_generated_bigtable_instance_admin_update_materialized_view_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.bigtable_admin_v2.BigtableInstanceAdminClient", + "shortName": "BigtableInstanceAdminClient" + }, + "fullName": "google.cloud.bigtable_admin_v2.BigtableInstanceAdminClient.update_materialized_view", + "method": { + "fullName": "google.bigtable.admin.v2.BigtableInstanceAdmin.UpdateMaterializedView", + "service": { + "fullName": "google.bigtable.admin.v2.BigtableInstanceAdmin", + "shortName": "BigtableInstanceAdmin" + }, + "shortName": "UpdateMaterializedView" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.bigtable_admin_v2.types.UpdateMaterializedViewRequest" + }, + { + "name": "materialized_view", + "type": "google.cloud.bigtable_admin_v2.types.MaterializedView" + }, + { + "name": "update_mask", + "type": "google.protobuf.field_mask_pb2.FieldMask" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, Union[str, bytes]]]" + } + ], + "resultType": "google.api_core.operation.Operation", + "shortName": "update_materialized_view" + }, + "description": "Sample for UpdateMaterializedView", + "file": "bigtableadmin_v2_generated_bigtable_instance_admin_update_materialized_view_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "bigtableadmin_v2_generated_BigtableInstanceAdmin_UpdateMaterializedView_sync", + "segments": [ + { + "end": 58, + "start": 27, + "type": "FULL" + }, + { + "end": 58, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 48, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 55, + "start": 49, + "type": "REQUEST_EXECUTION" + }, + { + "end": 59, + "start": 56, + "type": "RESPONSE_HANDLING" + } + ], + "title": "bigtableadmin_v2_generated_bigtable_instance_admin_update_materialized_view_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.bigtable_admin_v2.BaseBigtableTableAdminAsyncClient", + "shortName": "BaseBigtableTableAdminAsyncClient" + }, + "fullName": "google.cloud.bigtable_admin_v2.BaseBigtableTableAdminAsyncClient.check_consistency", + "method": { + "fullName": "google.bigtable.admin.v2.BigtableTableAdmin.CheckConsistency", + "service": { + "fullName": "google.bigtable.admin.v2.BigtableTableAdmin", + "shortName": "BigtableTableAdmin" + }, + "shortName": "CheckConsistency" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.bigtable_admin_v2.types.CheckConsistencyRequest" + }, + { + "name": "name", + "type": "str" + }, + { + "name": "consistency_token", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, Union[str, bytes]]]" + } + ], + "resultType": "google.cloud.bigtable_admin_v2.types.CheckConsistencyResponse", + "shortName": "check_consistency" + }, + "description": "Sample for CheckConsistency", + "file": "bigtableadmin_v2_generated_bigtable_table_admin_check_consistency_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "bigtableadmin_v2_generated_BigtableTableAdmin_CheckConsistency_async", + "segments": [ + { + "end": 52, + "start": 27, + "type": "FULL" + }, + { + "end": 52, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 46, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 49, + "start": 47, + "type": "REQUEST_EXECUTION" + }, + { + "end": 53, + "start": 50, + "type": "RESPONSE_HANDLING" + } + ], + "title": "bigtableadmin_v2_generated_bigtable_table_admin_check_consistency_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.bigtable_admin_v2.BaseBigtableTableAdminClient", + "shortName": "BaseBigtableTableAdminClient" + }, + "fullName": "google.cloud.bigtable_admin_v2.BaseBigtableTableAdminClient.check_consistency", + "method": { + "fullName": "google.bigtable.admin.v2.BigtableTableAdmin.CheckConsistency", + "service": { + "fullName": "google.bigtable.admin.v2.BigtableTableAdmin", + "shortName": "BigtableTableAdmin" + }, + "shortName": "CheckConsistency" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.bigtable_admin_v2.types.CheckConsistencyRequest" + }, + { + "name": "name", + "type": "str" + }, + { + "name": "consistency_token", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, Union[str, bytes]]]" + } + ], + "resultType": "google.cloud.bigtable_admin_v2.types.CheckConsistencyResponse", + "shortName": "check_consistency" + }, + "description": "Sample for CheckConsistency", + "file": "bigtableadmin_v2_generated_bigtable_table_admin_check_consistency_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "bigtableadmin_v2_generated_BigtableTableAdmin_CheckConsistency_sync", + "segments": [ + { + "end": 52, + "start": 27, + "type": "FULL" + }, + { + "end": 52, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 46, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 49, + "start": 47, + "type": "REQUEST_EXECUTION" + }, + { + "end": 53, + "start": 50, + "type": "RESPONSE_HANDLING" + } + ], + "title": "bigtableadmin_v2_generated_bigtable_table_admin_check_consistency_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.bigtable_admin_v2.BaseBigtableTableAdminAsyncClient", + "shortName": "BaseBigtableTableAdminAsyncClient" + }, + "fullName": "google.cloud.bigtable_admin_v2.BaseBigtableTableAdminAsyncClient.copy_backup", + "method": { + "fullName": "google.bigtable.admin.v2.BigtableTableAdmin.CopyBackup", + "service": { + "fullName": "google.bigtable.admin.v2.BigtableTableAdmin", + "shortName": "BigtableTableAdmin" + }, + "shortName": "CopyBackup" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.bigtable_admin_v2.types.CopyBackupRequest" + }, + { + "name": "parent", + "type": "str" + }, + { + "name": "backup_id", + "type": "str" + }, + { + "name": "source_backup", + "type": "str" + }, + { + "name": "expire_time", + "type": "google.protobuf.timestamp_pb2.Timestamp" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, Union[str, bytes]]]" + } + ], + "resultType": "google.api_core.operation_async.AsyncOperation", + "shortName": "copy_backup" + }, + "description": "Sample for CopyBackup", + "file": "bigtableadmin_v2_generated_bigtable_table_admin_copy_backup_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "bigtableadmin_v2_generated_BigtableTableAdmin_CopyBackup_async", + "segments": [ + { + "end": 57, + "start": 27, + "type": "FULL" + }, + { + "end": 57, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 47, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 54, + "start": 48, + "type": "REQUEST_EXECUTION" + }, + { + "end": 58, + "start": 55, + "type": "RESPONSE_HANDLING" + } + ], + "title": "bigtableadmin_v2_generated_bigtable_table_admin_copy_backup_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.bigtable_admin_v2.BaseBigtableTableAdminClient", + "shortName": "BaseBigtableTableAdminClient" + }, + "fullName": "google.cloud.bigtable_admin_v2.BaseBigtableTableAdminClient.copy_backup", + "method": { + "fullName": "google.bigtable.admin.v2.BigtableTableAdmin.CopyBackup", + "service": { + "fullName": "google.bigtable.admin.v2.BigtableTableAdmin", + "shortName": "BigtableTableAdmin" + }, + "shortName": "CopyBackup" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.bigtable_admin_v2.types.CopyBackupRequest" + }, + { + "name": "parent", + "type": "str" + }, + { + "name": "backup_id", + "type": "str" + }, + { + "name": "source_backup", + "type": "str" + }, + { + "name": "expire_time", + "type": "google.protobuf.timestamp_pb2.Timestamp" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, Union[str, bytes]]]" + } + ], + "resultType": "google.api_core.operation.Operation", + "shortName": "copy_backup" + }, + "description": "Sample for CopyBackup", + "file": "bigtableadmin_v2_generated_bigtable_table_admin_copy_backup_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "bigtableadmin_v2_generated_BigtableTableAdmin_CopyBackup_sync", + "segments": [ + { + "end": 57, + "start": 27, + "type": "FULL" + }, + { + "end": 57, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 47, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 54, + "start": 48, + "type": "REQUEST_EXECUTION" + }, + { + "end": 58, + "start": 55, + "type": "RESPONSE_HANDLING" + } + ], + "title": "bigtableadmin_v2_generated_bigtable_table_admin_copy_backup_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.bigtable_admin_v2.BaseBigtableTableAdminAsyncClient", + "shortName": "BaseBigtableTableAdminAsyncClient" + }, + "fullName": "google.cloud.bigtable_admin_v2.BaseBigtableTableAdminAsyncClient.create_authorized_view", + "method": { + "fullName": "google.bigtable.admin.v2.BigtableTableAdmin.CreateAuthorizedView", + "service": { + "fullName": "google.bigtable.admin.v2.BigtableTableAdmin", + "shortName": "BigtableTableAdmin" + }, + "shortName": "CreateAuthorizedView" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.bigtable_admin_v2.types.CreateAuthorizedViewRequest" + }, + { + "name": "parent", + "type": "str" + }, + { + "name": "authorized_view", + "type": "google.cloud.bigtable_admin_v2.types.AuthorizedView" + }, + { + "name": "authorized_view_id", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, Union[str, bytes]]]" + } + ], + "resultType": "google.api_core.operation_async.AsyncOperation", + "shortName": "create_authorized_view" + }, + "description": "Sample for CreateAuthorizedView", + "file": "bigtableadmin_v2_generated_bigtable_table_admin_create_authorized_view_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "bigtableadmin_v2_generated_BigtableTableAdmin_CreateAuthorizedView_async", + "segments": [ + { + "end": 56, + "start": 27, + "type": "FULL" + }, + { + "end": 56, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 46, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 53, + "start": 47, + "type": "REQUEST_EXECUTION" + }, + { + "end": 57, + "start": 54, + "type": "RESPONSE_HANDLING" + } + ], + "title": "bigtableadmin_v2_generated_bigtable_table_admin_create_authorized_view_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.bigtable_admin_v2.BaseBigtableTableAdminClient", + "shortName": "BaseBigtableTableAdminClient" + }, + "fullName": "google.cloud.bigtable_admin_v2.BaseBigtableTableAdminClient.create_authorized_view", + "method": { + "fullName": "google.bigtable.admin.v2.BigtableTableAdmin.CreateAuthorizedView", + "service": { + "fullName": "google.bigtable.admin.v2.BigtableTableAdmin", + "shortName": "BigtableTableAdmin" + }, + "shortName": "CreateAuthorizedView" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.bigtable_admin_v2.types.CreateAuthorizedViewRequest" + }, + { + "name": "parent", + "type": "str" + }, + { + "name": "authorized_view", + "type": "google.cloud.bigtable_admin_v2.types.AuthorizedView" + }, + { + "name": "authorized_view_id", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, Union[str, bytes]]]" + } + ], + "resultType": "google.api_core.operation.Operation", + "shortName": "create_authorized_view" + }, + "description": "Sample for CreateAuthorizedView", + "file": "bigtableadmin_v2_generated_bigtable_table_admin_create_authorized_view_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "bigtableadmin_v2_generated_BigtableTableAdmin_CreateAuthorizedView_sync", + "segments": [ + { + "end": 56, + "start": 27, + "type": "FULL" + }, + { + "end": 56, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 46, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 53, + "start": 47, + "type": "REQUEST_EXECUTION" + }, + { + "end": 57, + "start": 54, + "type": "RESPONSE_HANDLING" + } + ], + "title": "bigtableadmin_v2_generated_bigtable_table_admin_create_authorized_view_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.bigtable_admin_v2.BaseBigtableTableAdminAsyncClient", + "shortName": "BaseBigtableTableAdminAsyncClient" + }, + "fullName": "google.cloud.bigtable_admin_v2.BaseBigtableTableAdminAsyncClient.create_backup", + "method": { + "fullName": "google.bigtable.admin.v2.BigtableTableAdmin.CreateBackup", + "service": { + "fullName": "google.bigtable.admin.v2.BigtableTableAdmin", + "shortName": "BigtableTableAdmin" + }, + "shortName": "CreateBackup" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.bigtable_admin_v2.types.CreateBackupRequest" + }, + { + "name": "parent", + "type": "str" + }, + { + "name": "backup_id", + "type": "str" + }, + { + "name": "backup", + "type": "google.cloud.bigtable_admin_v2.types.Backup" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, Union[str, bytes]]]" + } + ], + "resultType": "google.api_core.operation_async.AsyncOperation", + "shortName": "create_backup" + }, + "description": "Sample for CreateBackup", + "file": "bigtableadmin_v2_generated_bigtable_table_admin_create_backup_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "bigtableadmin_v2_generated_BigtableTableAdmin_CreateBackup_async", + "segments": [ + { + "end": 60, + "start": 27, + "type": "FULL" + }, + { + "end": 60, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 50, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 57, + "start": 51, + "type": "REQUEST_EXECUTION" + }, + { + "end": 61, + "start": 58, + "type": "RESPONSE_HANDLING" + } + ], + "title": "bigtableadmin_v2_generated_bigtable_table_admin_create_backup_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.bigtable_admin_v2.BaseBigtableTableAdminClient", + "shortName": "BaseBigtableTableAdminClient" + }, + "fullName": "google.cloud.bigtable_admin_v2.BaseBigtableTableAdminClient.create_backup", + "method": { + "fullName": "google.bigtable.admin.v2.BigtableTableAdmin.CreateBackup", + "service": { + "fullName": "google.bigtable.admin.v2.BigtableTableAdmin", + "shortName": "BigtableTableAdmin" + }, + "shortName": "CreateBackup" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.bigtable_admin_v2.types.CreateBackupRequest" + }, + { + "name": "parent", + "type": "str" + }, + { + "name": "backup_id", + "type": "str" + }, + { + "name": "backup", + "type": "google.cloud.bigtable_admin_v2.types.Backup" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, Union[str, bytes]]]" + } + ], + "resultType": "google.api_core.operation.Operation", + "shortName": "create_backup" + }, + "description": "Sample for CreateBackup", + "file": "bigtableadmin_v2_generated_bigtable_table_admin_create_backup_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "bigtableadmin_v2_generated_BigtableTableAdmin_CreateBackup_sync", + "segments": [ + { + "end": 60, + "start": 27, + "type": "FULL" + }, + { + "end": 60, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 50, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 57, + "start": 51, + "type": "REQUEST_EXECUTION" + }, + { + "end": 61, + "start": 58, + "type": "RESPONSE_HANDLING" + } + ], + "title": "bigtableadmin_v2_generated_bigtable_table_admin_create_backup_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.bigtable_admin_v2.BaseBigtableTableAdminAsyncClient", + "shortName": "BaseBigtableTableAdminAsyncClient" + }, + "fullName": "google.cloud.bigtable_admin_v2.BaseBigtableTableAdminAsyncClient.create_schema_bundle", + "method": { + "fullName": "google.bigtable.admin.v2.BigtableTableAdmin.CreateSchemaBundle", + "service": { + "fullName": "google.bigtable.admin.v2.BigtableTableAdmin", + "shortName": "BigtableTableAdmin" + }, + "shortName": "CreateSchemaBundle" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.bigtable_admin_v2.types.CreateSchemaBundleRequest" + }, + { + "name": "parent", + "type": "str" + }, + { + "name": "schema_bundle_id", + "type": "str" + }, + { + "name": "schema_bundle", + "type": "google.cloud.bigtable_admin_v2.types.SchemaBundle" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, Union[str, bytes]]]" + } + ], + "resultType": "google.api_core.operation_async.AsyncOperation", + "shortName": "create_schema_bundle" + }, + "description": "Sample for CreateSchemaBundle", + "file": "bigtableadmin_v2_generated_bigtable_table_admin_create_schema_bundle_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "bigtableadmin_v2_generated_BigtableTableAdmin_CreateSchemaBundle_async", + "segments": [ + { + "end": 60, + "start": 27, + "type": "FULL" + }, + { + "end": 60, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 50, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 57, + "start": 51, + "type": "REQUEST_EXECUTION" + }, + { + "end": 61, + "start": 58, + "type": "RESPONSE_HANDLING" + } + ], + "title": "bigtableadmin_v2_generated_bigtable_table_admin_create_schema_bundle_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.bigtable_admin_v2.BaseBigtableTableAdminClient", + "shortName": "BaseBigtableTableAdminClient" + }, + "fullName": "google.cloud.bigtable_admin_v2.BaseBigtableTableAdminClient.create_schema_bundle", + "method": { + "fullName": "google.bigtable.admin.v2.BigtableTableAdmin.CreateSchemaBundle", + "service": { + "fullName": "google.bigtable.admin.v2.BigtableTableAdmin", + "shortName": "BigtableTableAdmin" + }, + "shortName": "CreateSchemaBundle" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.bigtable_admin_v2.types.CreateSchemaBundleRequest" + }, + { + "name": "parent", + "type": "str" + }, + { + "name": "schema_bundle_id", + "type": "str" + }, + { + "name": "schema_bundle", + "type": "google.cloud.bigtable_admin_v2.types.SchemaBundle" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, Union[str, bytes]]]" + } + ], + "resultType": "google.api_core.operation.Operation", + "shortName": "create_schema_bundle" + }, + "description": "Sample for CreateSchemaBundle", + "file": "bigtableadmin_v2_generated_bigtable_table_admin_create_schema_bundle_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "bigtableadmin_v2_generated_BigtableTableAdmin_CreateSchemaBundle_sync", + "segments": [ + { + "end": 60, + "start": 27, + "type": "FULL" + }, + { + "end": 60, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 50, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 57, + "start": 51, + "type": "REQUEST_EXECUTION" + }, + { + "end": 61, + "start": 58, + "type": "RESPONSE_HANDLING" + } + ], + "title": "bigtableadmin_v2_generated_bigtable_table_admin_create_schema_bundle_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.bigtable_admin_v2.BaseBigtableTableAdminAsyncClient", + "shortName": "BaseBigtableTableAdminAsyncClient" + }, + "fullName": "google.cloud.bigtable_admin_v2.BaseBigtableTableAdminAsyncClient.create_table_from_snapshot", + "method": { + "fullName": "google.bigtable.admin.v2.BigtableTableAdmin.CreateTableFromSnapshot", + "service": { + "fullName": "google.bigtable.admin.v2.BigtableTableAdmin", + "shortName": "BigtableTableAdmin" + }, + "shortName": "CreateTableFromSnapshot" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.bigtable_admin_v2.types.CreateTableFromSnapshotRequest" + }, + { + "name": "parent", + "type": "str" + }, + { + "name": "table_id", + "type": "str" + }, + { + "name": "source_snapshot", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, Union[str, bytes]]]" + } + ], + "resultType": "google.api_core.operation_async.AsyncOperation", + "shortName": "create_table_from_snapshot" + }, + "description": "Sample for CreateTableFromSnapshot", + "file": "bigtableadmin_v2_generated_bigtable_table_admin_create_table_from_snapshot_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "bigtableadmin_v2_generated_BigtableTableAdmin_CreateTableFromSnapshot_async", + "segments": [ + { + "end": 57, + "start": 27, + "type": "FULL" + }, + { + "end": 57, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 47, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 54, + "start": 48, + "type": "REQUEST_EXECUTION" + }, + { + "end": 58, + "start": 55, + "type": "RESPONSE_HANDLING" + } + ], + "title": "bigtableadmin_v2_generated_bigtable_table_admin_create_table_from_snapshot_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.bigtable_admin_v2.BaseBigtableTableAdminClient", + "shortName": "BaseBigtableTableAdminClient" + }, + "fullName": "google.cloud.bigtable_admin_v2.BaseBigtableTableAdminClient.create_table_from_snapshot", + "method": { + "fullName": "google.bigtable.admin.v2.BigtableTableAdmin.CreateTableFromSnapshot", + "service": { + "fullName": "google.bigtable.admin.v2.BigtableTableAdmin", + "shortName": "BigtableTableAdmin" + }, + "shortName": "CreateTableFromSnapshot" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.bigtable_admin_v2.types.CreateTableFromSnapshotRequest" + }, + { + "name": "parent", + "type": "str" + }, + { + "name": "table_id", + "type": "str" + }, + { + "name": "source_snapshot", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, Union[str, bytes]]]" + } + ], + "resultType": "google.api_core.operation.Operation", + "shortName": "create_table_from_snapshot" + }, + "description": "Sample for CreateTableFromSnapshot", + "file": "bigtableadmin_v2_generated_bigtable_table_admin_create_table_from_snapshot_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "bigtableadmin_v2_generated_BigtableTableAdmin_CreateTableFromSnapshot_sync", + "segments": [ + { + "end": 57, + "start": 27, + "type": "FULL" + }, + { + "end": 57, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 47, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 54, + "start": 48, + "type": "REQUEST_EXECUTION" + }, + { + "end": 58, + "start": 55, + "type": "RESPONSE_HANDLING" + } + ], + "title": "bigtableadmin_v2_generated_bigtable_table_admin_create_table_from_snapshot_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.bigtable_admin_v2.BaseBigtableTableAdminAsyncClient", + "shortName": "BaseBigtableTableAdminAsyncClient" + }, + "fullName": "google.cloud.bigtable_admin_v2.BaseBigtableTableAdminAsyncClient.create_table", + "method": { + "fullName": "google.bigtable.admin.v2.BigtableTableAdmin.CreateTable", + "service": { + "fullName": "google.bigtable.admin.v2.BigtableTableAdmin", + "shortName": "BigtableTableAdmin" + }, + "shortName": "CreateTable" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.bigtable_admin_v2.types.CreateTableRequest" + }, + { + "name": "parent", + "type": "str" + }, + { + "name": "table_id", + "type": "str" + }, + { + "name": "table", + "type": "google.cloud.bigtable_admin_v2.types.Table" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, Union[str, bytes]]]" + } + ], + "resultType": "google.cloud.bigtable_admin_v2.types.Table", + "shortName": "create_table" + }, + "description": "Sample for CreateTable", + "file": "bigtableadmin_v2_generated_bigtable_table_admin_create_table_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "bigtableadmin_v2_generated_BigtableTableAdmin_CreateTable_async", + "segments": [ + { + "end": 52, + "start": 27, + "type": "FULL" + }, + { + "end": 52, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 46, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 49, + "start": 47, + "type": "REQUEST_EXECUTION" + }, + { + "end": 53, + "start": 50, + "type": "RESPONSE_HANDLING" + } + ], + "title": "bigtableadmin_v2_generated_bigtable_table_admin_create_table_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.bigtable_admin_v2.BaseBigtableTableAdminClient", + "shortName": "BaseBigtableTableAdminClient" + }, + "fullName": "google.cloud.bigtable_admin_v2.BaseBigtableTableAdminClient.create_table", + "method": { + "fullName": "google.bigtable.admin.v2.BigtableTableAdmin.CreateTable", + "service": { + "fullName": "google.bigtable.admin.v2.BigtableTableAdmin", + "shortName": "BigtableTableAdmin" + }, + "shortName": "CreateTable" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.bigtable_admin_v2.types.CreateTableRequest" + }, + { + "name": "parent", + "type": "str" + }, + { + "name": "table_id", + "type": "str" + }, + { + "name": "table", + "type": "google.cloud.bigtable_admin_v2.types.Table" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, Union[str, bytes]]]" + } + ], + "resultType": "google.cloud.bigtable_admin_v2.types.Table", + "shortName": "create_table" + }, + "description": "Sample for CreateTable", + "file": "bigtableadmin_v2_generated_bigtable_table_admin_create_table_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "bigtableadmin_v2_generated_BigtableTableAdmin_CreateTable_sync", + "segments": [ + { + "end": 52, + "start": 27, + "type": "FULL" + }, + { + "end": 52, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 46, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 49, + "start": 47, + "type": "REQUEST_EXECUTION" + }, + { + "end": 53, + "start": 50, + "type": "RESPONSE_HANDLING" + } + ], + "title": "bigtableadmin_v2_generated_bigtable_table_admin_create_table_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.bigtable_admin_v2.BaseBigtableTableAdminAsyncClient", + "shortName": "BaseBigtableTableAdminAsyncClient" + }, + "fullName": "google.cloud.bigtable_admin_v2.BaseBigtableTableAdminAsyncClient.delete_authorized_view", + "method": { + "fullName": "google.bigtable.admin.v2.BigtableTableAdmin.DeleteAuthorizedView", + "service": { + "fullName": "google.bigtable.admin.v2.BigtableTableAdmin", + "shortName": "BigtableTableAdmin" + }, + "shortName": "DeleteAuthorizedView" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.bigtable_admin_v2.types.DeleteAuthorizedViewRequest" + }, + { + "name": "name", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, Union[str, bytes]]]" + } + ], + "shortName": "delete_authorized_view" + }, + "description": "Sample for DeleteAuthorizedView", + "file": "bigtableadmin_v2_generated_bigtable_table_admin_delete_authorized_view_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "bigtableadmin_v2_generated_BigtableTableAdmin_DeleteAuthorizedView_async", + "segments": [ + { + "end": 49, + "start": 27, + "type": "FULL" + }, + { + "end": 49, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 45, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "start": 46, + "type": "REQUEST_EXECUTION" + }, + { + "end": 50, + "type": "RESPONSE_HANDLING" + } + ], + "title": "bigtableadmin_v2_generated_bigtable_table_admin_delete_authorized_view_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.bigtable_admin_v2.BaseBigtableTableAdminClient", + "shortName": "BaseBigtableTableAdminClient" + }, + "fullName": "google.cloud.bigtable_admin_v2.BaseBigtableTableAdminClient.delete_authorized_view", + "method": { + "fullName": "google.bigtable.admin.v2.BigtableTableAdmin.DeleteAuthorizedView", + "service": { + "fullName": "google.bigtable.admin.v2.BigtableTableAdmin", + "shortName": "BigtableTableAdmin" + }, + "shortName": "DeleteAuthorizedView" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.bigtable_admin_v2.types.DeleteAuthorizedViewRequest" + }, + { + "name": "name", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, Union[str, bytes]]]" + } + ], + "shortName": "delete_authorized_view" + }, + "description": "Sample for DeleteAuthorizedView", + "file": "bigtableadmin_v2_generated_bigtable_table_admin_delete_authorized_view_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "bigtableadmin_v2_generated_BigtableTableAdmin_DeleteAuthorizedView_sync", + "segments": [ + { + "end": 49, + "start": 27, + "type": "FULL" + }, + { + "end": 49, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 45, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "start": 46, + "type": "REQUEST_EXECUTION" + }, + { + "end": 50, + "type": "RESPONSE_HANDLING" + } + ], + "title": "bigtableadmin_v2_generated_bigtable_table_admin_delete_authorized_view_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.bigtable_admin_v2.BaseBigtableTableAdminAsyncClient", + "shortName": "BaseBigtableTableAdminAsyncClient" + }, + "fullName": "google.cloud.bigtable_admin_v2.BaseBigtableTableAdminAsyncClient.delete_backup", + "method": { + "fullName": "google.bigtable.admin.v2.BigtableTableAdmin.DeleteBackup", + "service": { + "fullName": "google.bigtable.admin.v2.BigtableTableAdmin", + "shortName": "BigtableTableAdmin" + }, + "shortName": "DeleteBackup" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.bigtable_admin_v2.types.DeleteBackupRequest" + }, + { + "name": "name", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, Union[str, bytes]]]" + } + ], + "shortName": "delete_backup" + }, + "description": "Sample for DeleteBackup", + "file": "bigtableadmin_v2_generated_bigtable_table_admin_delete_backup_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "bigtableadmin_v2_generated_BigtableTableAdmin_DeleteBackup_async", + "segments": [ + { + "end": 49, + "start": 27, + "type": "FULL" + }, + { + "end": 49, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 45, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "start": 46, + "type": "REQUEST_EXECUTION" + }, + { + "end": 50, + "type": "RESPONSE_HANDLING" + } + ], + "title": "bigtableadmin_v2_generated_bigtable_table_admin_delete_backup_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.bigtable_admin_v2.BaseBigtableTableAdminClient", + "shortName": "BaseBigtableTableAdminClient" + }, + "fullName": "google.cloud.bigtable_admin_v2.BaseBigtableTableAdminClient.delete_backup", + "method": { + "fullName": "google.bigtable.admin.v2.BigtableTableAdmin.DeleteBackup", + "service": { + "fullName": "google.bigtable.admin.v2.BigtableTableAdmin", + "shortName": "BigtableTableAdmin" + }, + "shortName": "DeleteBackup" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.bigtable_admin_v2.types.DeleteBackupRequest" + }, + { + "name": "name", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, Union[str, bytes]]]" + } + ], + "shortName": "delete_backup" + }, + "description": "Sample for DeleteBackup", + "file": "bigtableadmin_v2_generated_bigtable_table_admin_delete_backup_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "bigtableadmin_v2_generated_BigtableTableAdmin_DeleteBackup_sync", + "segments": [ + { + "end": 49, + "start": 27, + "type": "FULL" + }, + { + "end": 49, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 45, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "start": 46, + "type": "REQUEST_EXECUTION" + }, + { + "end": 50, + "type": "RESPONSE_HANDLING" + } + ], + "title": "bigtableadmin_v2_generated_bigtable_table_admin_delete_backup_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.bigtable_admin_v2.BaseBigtableTableAdminAsyncClient", + "shortName": "BaseBigtableTableAdminAsyncClient" + }, + "fullName": "google.cloud.bigtable_admin_v2.BaseBigtableTableAdminAsyncClient.delete_schema_bundle", + "method": { + "fullName": "google.bigtable.admin.v2.BigtableTableAdmin.DeleteSchemaBundle", + "service": { + "fullName": "google.bigtable.admin.v2.BigtableTableAdmin", + "shortName": "BigtableTableAdmin" + }, + "shortName": "DeleteSchemaBundle" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.bigtable_admin_v2.types.DeleteSchemaBundleRequest" + }, + { + "name": "name", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, Union[str, bytes]]]" + } + ], + "shortName": "delete_schema_bundle" + }, + "description": "Sample for DeleteSchemaBundle", + "file": "bigtableadmin_v2_generated_bigtable_table_admin_delete_schema_bundle_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "bigtableadmin_v2_generated_BigtableTableAdmin_DeleteSchemaBundle_async", + "segments": [ + { + "end": 49, + "start": 27, + "type": "FULL" + }, + { + "end": 49, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 45, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "start": 46, + "type": "REQUEST_EXECUTION" + }, + { + "end": 50, + "type": "RESPONSE_HANDLING" + } + ], + "title": "bigtableadmin_v2_generated_bigtable_table_admin_delete_schema_bundle_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.bigtable_admin_v2.BaseBigtableTableAdminClient", + "shortName": "BaseBigtableTableAdminClient" + }, + "fullName": "google.cloud.bigtable_admin_v2.BaseBigtableTableAdminClient.delete_schema_bundle", + "method": { + "fullName": "google.bigtable.admin.v2.BigtableTableAdmin.DeleteSchemaBundle", + "service": { + "fullName": "google.bigtable.admin.v2.BigtableTableAdmin", + "shortName": "BigtableTableAdmin" + }, + "shortName": "DeleteSchemaBundle" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.bigtable_admin_v2.types.DeleteSchemaBundleRequest" + }, + { + "name": "name", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, Union[str, bytes]]]" + } + ], + "shortName": "delete_schema_bundle" + }, + "description": "Sample for DeleteSchemaBundle", + "file": "bigtableadmin_v2_generated_bigtable_table_admin_delete_schema_bundle_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "bigtableadmin_v2_generated_BigtableTableAdmin_DeleteSchemaBundle_sync", + "segments": [ + { + "end": 49, + "start": 27, + "type": "FULL" + }, + { + "end": 49, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 45, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "start": 46, + "type": "REQUEST_EXECUTION" + }, + { + "end": 50, + "type": "RESPONSE_HANDLING" + } + ], + "title": "bigtableadmin_v2_generated_bigtable_table_admin_delete_schema_bundle_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.bigtable_admin_v2.BaseBigtableTableAdminAsyncClient", + "shortName": "BaseBigtableTableAdminAsyncClient" + }, + "fullName": "google.cloud.bigtable_admin_v2.BaseBigtableTableAdminAsyncClient.delete_snapshot", + "method": { + "fullName": "google.bigtable.admin.v2.BigtableTableAdmin.DeleteSnapshot", + "service": { + "fullName": "google.bigtable.admin.v2.BigtableTableAdmin", + "shortName": "BigtableTableAdmin" + }, + "shortName": "DeleteSnapshot" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.bigtable_admin_v2.types.DeleteSnapshotRequest" + }, + { + "name": "name", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, Union[str, bytes]]]" + } + ], + "shortName": "delete_snapshot" + }, + "description": "Sample for DeleteSnapshot", + "file": "bigtableadmin_v2_generated_bigtable_table_admin_delete_snapshot_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "bigtableadmin_v2_generated_BigtableTableAdmin_DeleteSnapshot_async", + "segments": [ + { + "end": 49, + "start": 27, + "type": "FULL" + }, + { + "end": 49, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 45, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "start": 46, + "type": "REQUEST_EXECUTION" + }, + { + "end": 50, + "type": "RESPONSE_HANDLING" + } + ], + "title": "bigtableadmin_v2_generated_bigtable_table_admin_delete_snapshot_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.bigtable_admin_v2.BaseBigtableTableAdminClient", + "shortName": "BaseBigtableTableAdminClient" + }, + "fullName": "google.cloud.bigtable_admin_v2.BaseBigtableTableAdminClient.delete_snapshot", + "method": { + "fullName": "google.bigtable.admin.v2.BigtableTableAdmin.DeleteSnapshot", + "service": { + "fullName": "google.bigtable.admin.v2.BigtableTableAdmin", + "shortName": "BigtableTableAdmin" + }, + "shortName": "DeleteSnapshot" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.bigtable_admin_v2.types.DeleteSnapshotRequest" + }, + { + "name": "name", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, Union[str, bytes]]]" + } + ], + "shortName": "delete_snapshot" + }, + "description": "Sample for DeleteSnapshot", + "file": "bigtableadmin_v2_generated_bigtable_table_admin_delete_snapshot_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "bigtableadmin_v2_generated_BigtableTableAdmin_DeleteSnapshot_sync", + "segments": [ + { + "end": 49, + "start": 27, + "type": "FULL" + }, + { + "end": 49, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 45, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "start": 46, + "type": "REQUEST_EXECUTION" + }, + { + "end": 50, + "type": "RESPONSE_HANDLING" + } + ], + "title": "bigtableadmin_v2_generated_bigtable_table_admin_delete_snapshot_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.bigtable_admin_v2.BaseBigtableTableAdminAsyncClient", + "shortName": "BaseBigtableTableAdminAsyncClient" + }, + "fullName": "google.cloud.bigtable_admin_v2.BaseBigtableTableAdminAsyncClient.delete_table", + "method": { + "fullName": "google.bigtable.admin.v2.BigtableTableAdmin.DeleteTable", + "service": { + "fullName": "google.bigtable.admin.v2.BigtableTableAdmin", + "shortName": "BigtableTableAdmin" + }, + "shortName": "DeleteTable" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.bigtable_admin_v2.types.DeleteTableRequest" + }, + { + "name": "name", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, Union[str, bytes]]]" + } + ], + "shortName": "delete_table" + }, + "description": "Sample for DeleteTable", + "file": "bigtableadmin_v2_generated_bigtable_table_admin_delete_table_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "bigtableadmin_v2_generated_BigtableTableAdmin_DeleteTable_async", + "segments": [ + { + "end": 49, + "start": 27, + "type": "FULL" + }, + { + "end": 49, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 45, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "start": 46, + "type": "REQUEST_EXECUTION" + }, + { + "end": 50, + "type": "RESPONSE_HANDLING" + } + ], + "title": "bigtableadmin_v2_generated_bigtable_table_admin_delete_table_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.bigtable_admin_v2.BaseBigtableTableAdminClient", + "shortName": "BaseBigtableTableAdminClient" + }, + "fullName": "google.cloud.bigtable_admin_v2.BaseBigtableTableAdminClient.delete_table", + "method": { + "fullName": "google.bigtable.admin.v2.BigtableTableAdmin.DeleteTable", + "service": { + "fullName": "google.bigtable.admin.v2.BigtableTableAdmin", + "shortName": "BigtableTableAdmin" + }, + "shortName": "DeleteTable" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.bigtable_admin_v2.types.DeleteTableRequest" + }, + { + "name": "name", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, Union[str, bytes]]]" + } + ], + "shortName": "delete_table" + }, + "description": "Sample for DeleteTable", + "file": "bigtableadmin_v2_generated_bigtable_table_admin_delete_table_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "bigtableadmin_v2_generated_BigtableTableAdmin_DeleteTable_sync", + "segments": [ + { + "end": 49, + "start": 27, + "type": "FULL" + }, + { + "end": 49, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 45, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "start": 46, + "type": "REQUEST_EXECUTION" + }, + { + "end": 50, + "type": "RESPONSE_HANDLING" + } + ], + "title": "bigtableadmin_v2_generated_bigtable_table_admin_delete_table_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.bigtable_admin_v2.BaseBigtableTableAdminAsyncClient", + "shortName": "BaseBigtableTableAdminAsyncClient" + }, + "fullName": "google.cloud.bigtable_admin_v2.BaseBigtableTableAdminAsyncClient.drop_row_range", + "method": { + "fullName": "google.bigtable.admin.v2.BigtableTableAdmin.DropRowRange", + "service": { + "fullName": "google.bigtable.admin.v2.BigtableTableAdmin", + "shortName": "BigtableTableAdmin" + }, + "shortName": "DropRowRange" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.bigtable_admin_v2.types.DropRowRangeRequest" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, Union[str, bytes]]]" + } + ], + "shortName": "drop_row_range" + }, + "description": "Sample for DropRowRange", + "file": "bigtableadmin_v2_generated_bigtable_table_admin_drop_row_range_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "bigtableadmin_v2_generated_BigtableTableAdmin_DropRowRange_async", + "segments": [ + { + "end": 50, + "start": 27, + "type": "FULL" + }, + { + "end": 50, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 46, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "start": 47, + "type": "REQUEST_EXECUTION" + }, + { + "end": 51, + "type": "RESPONSE_HANDLING" + } + ], + "title": "bigtableadmin_v2_generated_bigtable_table_admin_drop_row_range_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.bigtable_admin_v2.BaseBigtableTableAdminClient", + "shortName": "BaseBigtableTableAdminClient" + }, + "fullName": "google.cloud.bigtable_admin_v2.BaseBigtableTableAdminClient.drop_row_range", + "method": { + "fullName": "google.bigtable.admin.v2.BigtableTableAdmin.DropRowRange", + "service": { + "fullName": "google.bigtable.admin.v2.BigtableTableAdmin", + "shortName": "BigtableTableAdmin" + }, + "shortName": "DropRowRange" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.bigtable_admin_v2.types.DropRowRangeRequest" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, Union[str, bytes]]]" + } + ], + "shortName": "drop_row_range" + }, + "description": "Sample for DropRowRange", + "file": "bigtableadmin_v2_generated_bigtable_table_admin_drop_row_range_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "bigtableadmin_v2_generated_BigtableTableAdmin_DropRowRange_sync", + "segments": [ + { + "end": 50, + "start": 27, + "type": "FULL" + }, + { + "end": 50, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 46, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "start": 47, + "type": "REQUEST_EXECUTION" + }, + { + "end": 51, + "type": "RESPONSE_HANDLING" + } + ], + "title": "bigtableadmin_v2_generated_bigtable_table_admin_drop_row_range_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.bigtable_admin_v2.BaseBigtableTableAdminAsyncClient", + "shortName": "BaseBigtableTableAdminAsyncClient" + }, + "fullName": "google.cloud.bigtable_admin_v2.BaseBigtableTableAdminAsyncClient.generate_consistency_token", + "method": { + "fullName": "google.bigtable.admin.v2.BigtableTableAdmin.GenerateConsistencyToken", + "service": { + "fullName": "google.bigtable.admin.v2.BigtableTableAdmin", + "shortName": "BigtableTableAdmin" + }, + "shortName": "GenerateConsistencyToken" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.bigtable_admin_v2.types.GenerateConsistencyTokenRequest" + }, + { + "name": "name", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, Union[str, bytes]]]" + } + ], + "resultType": "google.cloud.bigtable_admin_v2.types.GenerateConsistencyTokenResponse", + "shortName": "generate_consistency_token" + }, + "description": "Sample for GenerateConsistencyToken", + "file": "bigtableadmin_v2_generated_bigtable_table_admin_generate_consistency_token_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "bigtableadmin_v2_generated_BigtableTableAdmin_GenerateConsistencyToken_async", + "segments": [ + { + "end": 51, + "start": 27, + "type": "FULL" + }, + { + "end": 51, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 45, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 48, + "start": 46, + "type": "REQUEST_EXECUTION" + }, + { + "end": 52, + "start": 49, + "type": "RESPONSE_HANDLING" + } + ], + "title": "bigtableadmin_v2_generated_bigtable_table_admin_generate_consistency_token_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.bigtable_admin_v2.BaseBigtableTableAdminClient", + "shortName": "BaseBigtableTableAdminClient" + }, + "fullName": "google.cloud.bigtable_admin_v2.BaseBigtableTableAdminClient.generate_consistency_token", + "method": { + "fullName": "google.bigtable.admin.v2.BigtableTableAdmin.GenerateConsistencyToken", + "service": { + "fullName": "google.bigtable.admin.v2.BigtableTableAdmin", + "shortName": "BigtableTableAdmin" + }, + "shortName": "GenerateConsistencyToken" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.bigtable_admin_v2.types.GenerateConsistencyTokenRequest" + }, + { + "name": "name", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, Union[str, bytes]]]" + } + ], + "resultType": "google.cloud.bigtable_admin_v2.types.GenerateConsistencyTokenResponse", + "shortName": "generate_consistency_token" + }, + "description": "Sample for GenerateConsistencyToken", + "file": "bigtableadmin_v2_generated_bigtable_table_admin_generate_consistency_token_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "bigtableadmin_v2_generated_BigtableTableAdmin_GenerateConsistencyToken_sync", + "segments": [ + { + "end": 51, + "start": 27, + "type": "FULL" + }, + { + "end": 51, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 45, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 48, + "start": 46, + "type": "REQUEST_EXECUTION" + }, + { + "end": 52, + "start": 49, + "type": "RESPONSE_HANDLING" + } + ], + "title": "bigtableadmin_v2_generated_bigtable_table_admin_generate_consistency_token_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.bigtable_admin_v2.BaseBigtableTableAdminAsyncClient", + "shortName": "BaseBigtableTableAdminAsyncClient" + }, + "fullName": "google.cloud.bigtable_admin_v2.BaseBigtableTableAdminAsyncClient.get_authorized_view", + "method": { + "fullName": "google.bigtable.admin.v2.BigtableTableAdmin.GetAuthorizedView", + "service": { + "fullName": "google.bigtable.admin.v2.BigtableTableAdmin", + "shortName": "BigtableTableAdmin" + }, + "shortName": "GetAuthorizedView" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.bigtable_admin_v2.types.GetAuthorizedViewRequest" + }, + { + "name": "name", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, Union[str, bytes]]]" + } + ], + "resultType": "google.cloud.bigtable_admin_v2.types.AuthorizedView", + "shortName": "get_authorized_view" + }, + "description": "Sample for GetAuthorizedView", + "file": "bigtableadmin_v2_generated_bigtable_table_admin_get_authorized_view_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "bigtableadmin_v2_generated_BigtableTableAdmin_GetAuthorizedView_async", + "segments": [ + { + "end": 51, + "start": 27, + "type": "FULL" + }, + { + "end": 51, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 45, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 48, + "start": 46, + "type": "REQUEST_EXECUTION" + }, + { + "end": 52, + "start": 49, + "type": "RESPONSE_HANDLING" + } + ], + "title": "bigtableadmin_v2_generated_bigtable_table_admin_get_authorized_view_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.bigtable_admin_v2.BaseBigtableTableAdminClient", + "shortName": "BaseBigtableTableAdminClient" + }, + "fullName": "google.cloud.bigtable_admin_v2.BaseBigtableTableAdminClient.get_authorized_view", + "method": { + "fullName": "google.bigtable.admin.v2.BigtableTableAdmin.GetAuthorizedView", + "service": { + "fullName": "google.bigtable.admin.v2.BigtableTableAdmin", + "shortName": "BigtableTableAdmin" + }, + "shortName": "GetAuthorizedView" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.bigtable_admin_v2.types.GetAuthorizedViewRequest" + }, + { + "name": "name", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, Union[str, bytes]]]" + } + ], + "resultType": "google.cloud.bigtable_admin_v2.types.AuthorizedView", + "shortName": "get_authorized_view" + }, + "description": "Sample for GetAuthorizedView", + "file": "bigtableadmin_v2_generated_bigtable_table_admin_get_authorized_view_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "bigtableadmin_v2_generated_BigtableTableAdmin_GetAuthorizedView_sync", + "segments": [ + { + "end": 51, + "start": 27, + "type": "FULL" + }, + { + "end": 51, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 45, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 48, + "start": 46, + "type": "REQUEST_EXECUTION" + }, + { + "end": 52, + "start": 49, + "type": "RESPONSE_HANDLING" + } + ], + "title": "bigtableadmin_v2_generated_bigtable_table_admin_get_authorized_view_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.bigtable_admin_v2.BaseBigtableTableAdminAsyncClient", + "shortName": "BaseBigtableTableAdminAsyncClient" + }, + "fullName": "google.cloud.bigtable_admin_v2.BaseBigtableTableAdminAsyncClient.get_backup", + "method": { + "fullName": "google.bigtable.admin.v2.BigtableTableAdmin.GetBackup", + "service": { + "fullName": "google.bigtable.admin.v2.BigtableTableAdmin", + "shortName": "BigtableTableAdmin" + }, + "shortName": "GetBackup" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.bigtable_admin_v2.types.GetBackupRequest" + }, + { + "name": "name", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, Union[str, bytes]]]" + } + ], + "resultType": "google.cloud.bigtable_admin_v2.types.Backup", + "shortName": "get_backup" + }, + "description": "Sample for GetBackup", + "file": "bigtableadmin_v2_generated_bigtable_table_admin_get_backup_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "bigtableadmin_v2_generated_BigtableTableAdmin_GetBackup_async", + "segments": [ + { + "end": 51, + "start": 27, + "type": "FULL" + }, + { + "end": 51, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 45, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 48, + "start": 46, + "type": "REQUEST_EXECUTION" + }, + { + "end": 52, + "start": 49, + "type": "RESPONSE_HANDLING" + } + ], + "title": "bigtableadmin_v2_generated_bigtable_table_admin_get_backup_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.bigtable_admin_v2.BaseBigtableTableAdminClient", + "shortName": "BaseBigtableTableAdminClient" + }, + "fullName": "google.cloud.bigtable_admin_v2.BaseBigtableTableAdminClient.get_backup", + "method": { + "fullName": "google.bigtable.admin.v2.BigtableTableAdmin.GetBackup", + "service": { + "fullName": "google.bigtable.admin.v2.BigtableTableAdmin", + "shortName": "BigtableTableAdmin" + }, + "shortName": "GetBackup" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.bigtable_admin_v2.types.GetBackupRequest" + }, + { + "name": "name", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, Union[str, bytes]]]" + } + ], + "resultType": "google.cloud.bigtable_admin_v2.types.Backup", + "shortName": "get_backup" + }, + "description": "Sample for GetBackup", + "file": "bigtableadmin_v2_generated_bigtable_table_admin_get_backup_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "bigtableadmin_v2_generated_BigtableTableAdmin_GetBackup_sync", + "segments": [ + { + "end": 51, + "start": 27, + "type": "FULL" + }, + { + "end": 51, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 45, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 48, + "start": 46, + "type": "REQUEST_EXECUTION" + }, + { + "end": 52, + "start": 49, + "type": "RESPONSE_HANDLING" + } + ], + "title": "bigtableadmin_v2_generated_bigtable_table_admin_get_backup_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.bigtable_admin_v2.BaseBigtableTableAdminAsyncClient", + "shortName": "BaseBigtableTableAdminAsyncClient" + }, + "fullName": "google.cloud.bigtable_admin_v2.BaseBigtableTableAdminAsyncClient.get_iam_policy", + "method": { + "fullName": "google.bigtable.admin.v2.BigtableTableAdmin.GetIamPolicy", + "service": { + "fullName": "google.bigtable.admin.v2.BigtableTableAdmin", + "shortName": "BigtableTableAdmin" + }, + "shortName": "GetIamPolicy" + }, + "parameters": [ + { + "name": "request", + "type": "google.iam.v1.iam_policy_pb2.GetIamPolicyRequest" + }, + { + "name": "resource", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, Union[str, bytes]]]" + } + ], + "resultType": "google.iam.v1.policy_pb2.Policy", + "shortName": "get_iam_policy" + }, + "description": "Sample for GetIamPolicy", + "file": "bigtableadmin_v2_generated_bigtable_table_admin_get_iam_policy_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "bigtableadmin_v2_generated_BigtableTableAdmin_GetIamPolicy_async", + "segments": [ + { + "end": 52, + "start": 27, + "type": "FULL" + }, + { + "end": 52, + "start": 27, + "type": "SHORT" + }, + { + "end": 41, + "start": 39, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 46, + "start": 42, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 49, + "start": 47, + "type": "REQUEST_EXECUTION" + }, + { + "end": 53, + "start": 50, + "type": "RESPONSE_HANDLING" + } + ], + "title": "bigtableadmin_v2_generated_bigtable_table_admin_get_iam_policy_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.bigtable_admin_v2.BaseBigtableTableAdminClient", + "shortName": "BaseBigtableTableAdminClient" + }, + "fullName": "google.cloud.bigtable_admin_v2.BaseBigtableTableAdminClient.get_iam_policy", + "method": { + "fullName": "google.bigtable.admin.v2.BigtableTableAdmin.GetIamPolicy", + "service": { + "fullName": "google.bigtable.admin.v2.BigtableTableAdmin", + "shortName": "BigtableTableAdmin" + }, + "shortName": "GetIamPolicy" + }, + "parameters": [ + { + "name": "request", + "type": "google.iam.v1.iam_policy_pb2.GetIamPolicyRequest" + }, + { + "name": "resource", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, Union[str, bytes]]]" + } + ], + "resultType": "google.iam.v1.policy_pb2.Policy", + "shortName": "get_iam_policy" + }, + "description": "Sample for GetIamPolicy", + "file": "bigtableadmin_v2_generated_bigtable_table_admin_get_iam_policy_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "bigtableadmin_v2_generated_BigtableTableAdmin_GetIamPolicy_sync", + "segments": [ + { + "end": 52, + "start": 27, + "type": "FULL" + }, + { + "end": 52, + "start": 27, + "type": "SHORT" + }, + { + "end": 41, + "start": 39, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 46, + "start": 42, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 49, + "start": 47, + "type": "REQUEST_EXECUTION" + }, + { + "end": 53, + "start": 50, + "type": "RESPONSE_HANDLING" + } + ], + "title": "bigtableadmin_v2_generated_bigtable_table_admin_get_iam_policy_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.bigtable_admin_v2.BaseBigtableTableAdminAsyncClient", + "shortName": "BaseBigtableTableAdminAsyncClient" + }, + "fullName": "google.cloud.bigtable_admin_v2.BaseBigtableTableAdminAsyncClient.get_schema_bundle", + "method": { + "fullName": "google.bigtable.admin.v2.BigtableTableAdmin.GetSchemaBundle", + "service": { + "fullName": "google.bigtable.admin.v2.BigtableTableAdmin", + "shortName": "BigtableTableAdmin" + }, + "shortName": "GetSchemaBundle" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.bigtable_admin_v2.types.GetSchemaBundleRequest" + }, + { + "name": "name", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, Union[str, bytes]]]" + } + ], + "resultType": "google.cloud.bigtable_admin_v2.types.SchemaBundle", + "shortName": "get_schema_bundle" + }, + "description": "Sample for GetSchemaBundle", + "file": "bigtableadmin_v2_generated_bigtable_table_admin_get_schema_bundle_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "bigtableadmin_v2_generated_BigtableTableAdmin_GetSchemaBundle_async", + "segments": [ + { + "end": 51, + "start": 27, + "type": "FULL" + }, + { + "end": 51, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 45, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 48, + "start": 46, + "type": "REQUEST_EXECUTION" + }, + { + "end": 52, + "start": 49, + "type": "RESPONSE_HANDLING" + } + ], + "title": "bigtableadmin_v2_generated_bigtable_table_admin_get_schema_bundle_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.bigtable_admin_v2.BaseBigtableTableAdminClient", + "shortName": "BaseBigtableTableAdminClient" + }, + "fullName": "google.cloud.bigtable_admin_v2.BaseBigtableTableAdminClient.get_schema_bundle", + "method": { + "fullName": "google.bigtable.admin.v2.BigtableTableAdmin.GetSchemaBundle", + "service": { + "fullName": "google.bigtable.admin.v2.BigtableTableAdmin", + "shortName": "BigtableTableAdmin" + }, + "shortName": "GetSchemaBundle" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.bigtable_admin_v2.types.GetSchemaBundleRequest" + }, + { + "name": "name", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, Union[str, bytes]]]" + } + ], + "resultType": "google.cloud.bigtable_admin_v2.types.SchemaBundle", + "shortName": "get_schema_bundle" + }, + "description": "Sample for GetSchemaBundle", + "file": "bigtableadmin_v2_generated_bigtable_table_admin_get_schema_bundle_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "bigtableadmin_v2_generated_BigtableTableAdmin_GetSchemaBundle_sync", + "segments": [ + { + "end": 51, + "start": 27, + "type": "FULL" + }, + { + "end": 51, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 45, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 48, + "start": 46, + "type": "REQUEST_EXECUTION" + }, + { + "end": 52, + "start": 49, + "type": "RESPONSE_HANDLING" + } + ], + "title": "bigtableadmin_v2_generated_bigtable_table_admin_get_schema_bundle_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.bigtable_admin_v2.BaseBigtableTableAdminAsyncClient", + "shortName": "BaseBigtableTableAdminAsyncClient" + }, + "fullName": "google.cloud.bigtable_admin_v2.BaseBigtableTableAdminAsyncClient.get_snapshot", + "method": { + "fullName": "google.bigtable.admin.v2.BigtableTableAdmin.GetSnapshot", + "service": { + "fullName": "google.bigtable.admin.v2.BigtableTableAdmin", + "shortName": "BigtableTableAdmin" + }, + "shortName": "GetSnapshot" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.bigtable_admin_v2.types.GetSnapshotRequest" + }, + { + "name": "name", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, Union[str, bytes]]]" + } + ], + "resultType": "google.cloud.bigtable_admin_v2.types.Snapshot", + "shortName": "get_snapshot" + }, + "description": "Sample for GetSnapshot", + "file": "bigtableadmin_v2_generated_bigtable_table_admin_get_snapshot_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "bigtableadmin_v2_generated_BigtableTableAdmin_GetSnapshot_async", + "segments": [ + { + "end": 51, + "start": 27, + "type": "FULL" + }, + { + "end": 51, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 45, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 48, + "start": 46, + "type": "REQUEST_EXECUTION" + }, + { + "end": 52, + "start": 49, + "type": "RESPONSE_HANDLING" + } + ], + "title": "bigtableadmin_v2_generated_bigtable_table_admin_get_snapshot_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.bigtable_admin_v2.BaseBigtableTableAdminClient", + "shortName": "BaseBigtableTableAdminClient" + }, + "fullName": "google.cloud.bigtable_admin_v2.BaseBigtableTableAdminClient.get_snapshot", + "method": { + "fullName": "google.bigtable.admin.v2.BigtableTableAdmin.GetSnapshot", + "service": { + "fullName": "google.bigtable.admin.v2.BigtableTableAdmin", + "shortName": "BigtableTableAdmin" + }, + "shortName": "GetSnapshot" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.bigtable_admin_v2.types.GetSnapshotRequest" + }, + { + "name": "name", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, Union[str, bytes]]]" + } + ], + "resultType": "google.cloud.bigtable_admin_v2.types.Snapshot", + "shortName": "get_snapshot" + }, + "description": "Sample for GetSnapshot", + "file": "bigtableadmin_v2_generated_bigtable_table_admin_get_snapshot_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "bigtableadmin_v2_generated_BigtableTableAdmin_GetSnapshot_sync", + "segments": [ + { + "end": 51, + "start": 27, + "type": "FULL" + }, + { + "end": 51, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 45, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 48, + "start": 46, + "type": "REQUEST_EXECUTION" + }, + { + "end": 52, + "start": 49, + "type": "RESPONSE_HANDLING" + } + ], + "title": "bigtableadmin_v2_generated_bigtable_table_admin_get_snapshot_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.bigtable_admin_v2.BaseBigtableTableAdminAsyncClient", + "shortName": "BaseBigtableTableAdminAsyncClient" + }, + "fullName": "google.cloud.bigtable_admin_v2.BaseBigtableTableAdminAsyncClient.get_table", + "method": { + "fullName": "google.bigtable.admin.v2.BigtableTableAdmin.GetTable", + "service": { + "fullName": "google.bigtable.admin.v2.BigtableTableAdmin", + "shortName": "BigtableTableAdmin" + }, + "shortName": "GetTable" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.bigtable_admin_v2.types.GetTableRequest" + }, + { + "name": "name", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, Union[str, bytes]]]" + } + ], + "resultType": "google.cloud.bigtable_admin_v2.types.Table", + "shortName": "get_table" + }, + "description": "Sample for GetTable", + "file": "bigtableadmin_v2_generated_bigtable_table_admin_get_table_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "bigtableadmin_v2_generated_BigtableTableAdmin_GetTable_async", + "segments": [ + { + "end": 51, + "start": 27, + "type": "FULL" + }, + { + "end": 51, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 45, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 48, + "start": 46, + "type": "REQUEST_EXECUTION" + }, + { + "end": 52, + "start": 49, + "type": "RESPONSE_HANDLING" + } + ], + "title": "bigtableadmin_v2_generated_bigtable_table_admin_get_table_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.bigtable_admin_v2.BaseBigtableTableAdminClient", + "shortName": "BaseBigtableTableAdminClient" + }, + "fullName": "google.cloud.bigtable_admin_v2.BaseBigtableTableAdminClient.get_table", + "method": { + "fullName": "google.bigtable.admin.v2.BigtableTableAdmin.GetTable", + "service": { + "fullName": "google.bigtable.admin.v2.BigtableTableAdmin", + "shortName": "BigtableTableAdmin" + }, + "shortName": "GetTable" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.bigtable_admin_v2.types.GetTableRequest" + }, + { + "name": "name", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, Union[str, bytes]]]" + } + ], + "resultType": "google.cloud.bigtable_admin_v2.types.Table", + "shortName": "get_table" + }, + "description": "Sample for GetTable", + "file": "bigtableadmin_v2_generated_bigtable_table_admin_get_table_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "bigtableadmin_v2_generated_BigtableTableAdmin_GetTable_sync", + "segments": [ + { + "end": 51, + "start": 27, + "type": "FULL" + }, + { + "end": 51, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 45, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 48, + "start": 46, + "type": "REQUEST_EXECUTION" + }, + { + "end": 52, + "start": 49, + "type": "RESPONSE_HANDLING" + } + ], + "title": "bigtableadmin_v2_generated_bigtable_table_admin_get_table_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.bigtable_admin_v2.BaseBigtableTableAdminAsyncClient", + "shortName": "BaseBigtableTableAdminAsyncClient" + }, + "fullName": "google.cloud.bigtable_admin_v2.BaseBigtableTableAdminAsyncClient.list_authorized_views", + "method": { + "fullName": "google.bigtable.admin.v2.BigtableTableAdmin.ListAuthorizedViews", + "service": { + "fullName": "google.bigtable.admin.v2.BigtableTableAdmin", + "shortName": "BigtableTableAdmin" + }, + "shortName": "ListAuthorizedViews" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.bigtable_admin_v2.types.ListAuthorizedViewsRequest" + }, + { + "name": "parent", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, Union[str, bytes]]]" + } + ], + "resultType": "google.cloud.bigtable_admin_v2.services.bigtable_table_admin.pagers.ListAuthorizedViewsAsyncPager", + "shortName": "list_authorized_views" + }, + "description": "Sample for ListAuthorizedViews", + "file": "bigtableadmin_v2_generated_bigtable_table_admin_list_authorized_views_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "bigtableadmin_v2_generated_BigtableTableAdmin_ListAuthorizedViews_async", + "segments": [ + { + "end": 52, + "start": 27, + "type": "FULL" + }, + { + "end": 52, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 45, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 48, + "start": 46, + "type": "REQUEST_EXECUTION" + }, + { + "end": 53, + "start": 49, + "type": "RESPONSE_HANDLING" + } + ], + "title": "bigtableadmin_v2_generated_bigtable_table_admin_list_authorized_views_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.bigtable_admin_v2.BaseBigtableTableAdminClient", + "shortName": "BaseBigtableTableAdminClient" + }, + "fullName": "google.cloud.bigtable_admin_v2.BaseBigtableTableAdminClient.list_authorized_views", + "method": { + "fullName": "google.bigtable.admin.v2.BigtableTableAdmin.ListAuthorizedViews", + "service": { + "fullName": "google.bigtable.admin.v2.BigtableTableAdmin", + "shortName": "BigtableTableAdmin" + }, + "shortName": "ListAuthorizedViews" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.bigtable_admin_v2.types.ListAuthorizedViewsRequest" + }, + { + "name": "parent", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, Union[str, bytes]]]" + } + ], + "resultType": "google.cloud.bigtable_admin_v2.services.bigtable_table_admin.pagers.ListAuthorizedViewsPager", + "shortName": "list_authorized_views" + }, + "description": "Sample for ListAuthorizedViews", + "file": "bigtableadmin_v2_generated_bigtable_table_admin_list_authorized_views_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "bigtableadmin_v2_generated_BigtableTableAdmin_ListAuthorizedViews_sync", + "segments": [ + { + "end": 52, + "start": 27, + "type": "FULL" + }, + { + "end": 52, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 45, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 48, + "start": 46, + "type": "REQUEST_EXECUTION" + }, + { + "end": 53, + "start": 49, + "type": "RESPONSE_HANDLING" + } + ], + "title": "bigtableadmin_v2_generated_bigtable_table_admin_list_authorized_views_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.bigtable_admin_v2.BaseBigtableTableAdminAsyncClient", + "shortName": "BaseBigtableTableAdminAsyncClient" + }, + "fullName": "google.cloud.bigtable_admin_v2.BaseBigtableTableAdminAsyncClient.list_backups", + "method": { + "fullName": "google.bigtable.admin.v2.BigtableTableAdmin.ListBackups", + "service": { + "fullName": "google.bigtable.admin.v2.BigtableTableAdmin", + "shortName": "BigtableTableAdmin" + }, + "shortName": "ListBackups" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.bigtable_admin_v2.types.ListBackupsRequest" + }, + { + "name": "parent", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, Union[str, bytes]]]" + } + ], + "resultType": "google.cloud.bigtable_admin_v2.services.bigtable_table_admin.pagers.ListBackupsAsyncPager", + "shortName": "list_backups" + }, + "description": "Sample for ListBackups", + "file": "bigtableadmin_v2_generated_bigtable_table_admin_list_backups_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "bigtableadmin_v2_generated_BigtableTableAdmin_ListBackups_async", + "segments": [ + { + "end": 52, + "start": 27, + "type": "FULL" + }, + { + "end": 52, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 45, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 48, + "start": 46, + "type": "REQUEST_EXECUTION" + }, + { + "end": 53, + "start": 49, + "type": "RESPONSE_HANDLING" + } + ], + "title": "bigtableadmin_v2_generated_bigtable_table_admin_list_backups_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.bigtable_admin_v2.BaseBigtableTableAdminClient", + "shortName": "BaseBigtableTableAdminClient" + }, + "fullName": "google.cloud.bigtable_admin_v2.BaseBigtableTableAdminClient.list_backups", + "method": { + "fullName": "google.bigtable.admin.v2.BigtableTableAdmin.ListBackups", + "service": { + "fullName": "google.bigtable.admin.v2.BigtableTableAdmin", + "shortName": "BigtableTableAdmin" + }, + "shortName": "ListBackups" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.bigtable_admin_v2.types.ListBackupsRequest" + }, + { + "name": "parent", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, Union[str, bytes]]]" + } + ], + "resultType": "google.cloud.bigtable_admin_v2.services.bigtable_table_admin.pagers.ListBackupsPager", + "shortName": "list_backups" + }, + "description": "Sample for ListBackups", + "file": "bigtableadmin_v2_generated_bigtable_table_admin_list_backups_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "bigtableadmin_v2_generated_BigtableTableAdmin_ListBackups_sync", + "segments": [ + { + "end": 52, + "start": 27, + "type": "FULL" + }, + { + "end": 52, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 45, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 48, + "start": 46, + "type": "REQUEST_EXECUTION" + }, + { + "end": 53, + "start": 49, + "type": "RESPONSE_HANDLING" + } + ], + "title": "bigtableadmin_v2_generated_bigtable_table_admin_list_backups_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.bigtable_admin_v2.BaseBigtableTableAdminAsyncClient", + "shortName": "BaseBigtableTableAdminAsyncClient" + }, + "fullName": "google.cloud.bigtable_admin_v2.BaseBigtableTableAdminAsyncClient.list_schema_bundles", + "method": { + "fullName": "google.bigtable.admin.v2.BigtableTableAdmin.ListSchemaBundles", + "service": { + "fullName": "google.bigtable.admin.v2.BigtableTableAdmin", + "shortName": "BigtableTableAdmin" + }, + "shortName": "ListSchemaBundles" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.bigtable_admin_v2.types.ListSchemaBundlesRequest" + }, + { + "name": "parent", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, Union[str, bytes]]]" + } + ], + "resultType": "google.cloud.bigtable_admin_v2.services.bigtable_table_admin.pagers.ListSchemaBundlesAsyncPager", + "shortName": "list_schema_bundles" + }, + "description": "Sample for ListSchemaBundles", + "file": "bigtableadmin_v2_generated_bigtable_table_admin_list_schema_bundles_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "bigtableadmin_v2_generated_BigtableTableAdmin_ListSchemaBundles_async", + "segments": [ + { + "end": 52, + "start": 27, + "type": "FULL" + }, + { + "end": 52, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 45, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 48, + "start": 46, + "type": "REQUEST_EXECUTION" + }, + { + "end": 53, + "start": 49, + "type": "RESPONSE_HANDLING" + } + ], + "title": "bigtableadmin_v2_generated_bigtable_table_admin_list_schema_bundles_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.bigtable_admin_v2.BaseBigtableTableAdminClient", + "shortName": "BaseBigtableTableAdminClient" + }, + "fullName": "google.cloud.bigtable_admin_v2.BaseBigtableTableAdminClient.list_schema_bundles", + "method": { + "fullName": "google.bigtable.admin.v2.BigtableTableAdmin.ListSchemaBundles", + "service": { + "fullName": "google.bigtable.admin.v2.BigtableTableAdmin", + "shortName": "BigtableTableAdmin" + }, + "shortName": "ListSchemaBundles" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.bigtable_admin_v2.types.ListSchemaBundlesRequest" + }, + { + "name": "parent", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, Union[str, bytes]]]" + } + ], + "resultType": "google.cloud.bigtable_admin_v2.services.bigtable_table_admin.pagers.ListSchemaBundlesPager", + "shortName": "list_schema_bundles" + }, + "description": "Sample for ListSchemaBundles", + "file": "bigtableadmin_v2_generated_bigtable_table_admin_list_schema_bundles_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "bigtableadmin_v2_generated_BigtableTableAdmin_ListSchemaBundles_sync", + "segments": [ + { + "end": 52, + "start": 27, + "type": "FULL" + }, + { + "end": 52, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 45, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 48, + "start": 46, + "type": "REQUEST_EXECUTION" + }, + { + "end": 53, + "start": 49, + "type": "RESPONSE_HANDLING" + } + ], + "title": "bigtableadmin_v2_generated_bigtable_table_admin_list_schema_bundles_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.bigtable_admin_v2.BaseBigtableTableAdminAsyncClient", + "shortName": "BaseBigtableTableAdminAsyncClient" + }, + "fullName": "google.cloud.bigtable_admin_v2.BaseBigtableTableAdminAsyncClient.list_snapshots", + "method": { + "fullName": "google.bigtable.admin.v2.BigtableTableAdmin.ListSnapshots", + "service": { + "fullName": "google.bigtable.admin.v2.BigtableTableAdmin", + "shortName": "BigtableTableAdmin" + }, + "shortName": "ListSnapshots" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.bigtable_admin_v2.types.ListSnapshotsRequest" + }, + { + "name": "parent", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, Union[str, bytes]]]" + } + ], + "resultType": "google.cloud.bigtable_admin_v2.services.bigtable_table_admin.pagers.ListSnapshotsAsyncPager", + "shortName": "list_snapshots" + }, + "description": "Sample for ListSnapshots", + "file": "bigtableadmin_v2_generated_bigtable_table_admin_list_snapshots_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "bigtableadmin_v2_generated_BigtableTableAdmin_ListSnapshots_async", + "segments": [ + { + "end": 52, + "start": 27, + "type": "FULL" + }, + { + "end": 52, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 45, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 48, + "start": 46, + "type": "REQUEST_EXECUTION" + }, + { + "end": 53, + "start": 49, + "type": "RESPONSE_HANDLING" + } + ], + "title": "bigtableadmin_v2_generated_bigtable_table_admin_list_snapshots_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.bigtable_admin_v2.BaseBigtableTableAdminClient", + "shortName": "BaseBigtableTableAdminClient" + }, + "fullName": "google.cloud.bigtable_admin_v2.BaseBigtableTableAdminClient.list_snapshots", + "method": { + "fullName": "google.bigtable.admin.v2.BigtableTableAdmin.ListSnapshots", + "service": { + "fullName": "google.bigtable.admin.v2.BigtableTableAdmin", + "shortName": "BigtableTableAdmin" + }, + "shortName": "ListSnapshots" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.bigtable_admin_v2.types.ListSnapshotsRequest" + }, + { + "name": "parent", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, Union[str, bytes]]]" + } + ], + "resultType": "google.cloud.bigtable_admin_v2.services.bigtable_table_admin.pagers.ListSnapshotsPager", + "shortName": "list_snapshots" + }, + "description": "Sample for ListSnapshots", + "file": "bigtableadmin_v2_generated_bigtable_table_admin_list_snapshots_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "bigtableadmin_v2_generated_BigtableTableAdmin_ListSnapshots_sync", + "segments": [ + { + "end": 52, + "start": 27, + "type": "FULL" + }, + { + "end": 52, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 45, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 48, + "start": 46, + "type": "REQUEST_EXECUTION" + }, + { + "end": 53, + "start": 49, + "type": "RESPONSE_HANDLING" + } + ], + "title": "bigtableadmin_v2_generated_bigtable_table_admin_list_snapshots_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.bigtable_admin_v2.BaseBigtableTableAdminAsyncClient", + "shortName": "BaseBigtableTableAdminAsyncClient" + }, + "fullName": "google.cloud.bigtable_admin_v2.BaseBigtableTableAdminAsyncClient.list_tables", + "method": { + "fullName": "google.bigtable.admin.v2.BigtableTableAdmin.ListTables", + "service": { + "fullName": "google.bigtable.admin.v2.BigtableTableAdmin", + "shortName": "BigtableTableAdmin" + }, + "shortName": "ListTables" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.bigtable_admin_v2.types.ListTablesRequest" + }, + { + "name": "parent", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, Union[str, bytes]]]" + } + ], + "resultType": "google.cloud.bigtable_admin_v2.services.bigtable_table_admin.pagers.ListTablesAsyncPager", + "shortName": "list_tables" + }, + "description": "Sample for ListTables", + "file": "bigtableadmin_v2_generated_bigtable_table_admin_list_tables_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "bigtableadmin_v2_generated_BigtableTableAdmin_ListTables_async", + "segments": [ + { + "end": 52, + "start": 27, + "type": "FULL" + }, + { + "end": 52, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 45, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 48, + "start": 46, + "type": "REQUEST_EXECUTION" + }, + { + "end": 53, + "start": 49, + "type": "RESPONSE_HANDLING" + } + ], + "title": "bigtableadmin_v2_generated_bigtable_table_admin_list_tables_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.bigtable_admin_v2.BaseBigtableTableAdminClient", + "shortName": "BaseBigtableTableAdminClient" + }, + "fullName": "google.cloud.bigtable_admin_v2.BaseBigtableTableAdminClient.list_tables", + "method": { + "fullName": "google.bigtable.admin.v2.BigtableTableAdmin.ListTables", + "service": { + "fullName": "google.bigtable.admin.v2.BigtableTableAdmin", + "shortName": "BigtableTableAdmin" + }, + "shortName": "ListTables" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.bigtable_admin_v2.types.ListTablesRequest" + }, + { + "name": "parent", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, Union[str, bytes]]]" + } + ], + "resultType": "google.cloud.bigtable_admin_v2.services.bigtable_table_admin.pagers.ListTablesPager", + "shortName": "list_tables" + }, + "description": "Sample for ListTables", + "file": "bigtableadmin_v2_generated_bigtable_table_admin_list_tables_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "bigtableadmin_v2_generated_BigtableTableAdmin_ListTables_sync", + "segments": [ + { + "end": 52, + "start": 27, + "type": "FULL" + }, + { + "end": 52, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 45, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 48, + "start": 46, + "type": "REQUEST_EXECUTION" + }, + { + "end": 53, + "start": 49, + "type": "RESPONSE_HANDLING" + } + ], + "title": "bigtableadmin_v2_generated_bigtable_table_admin_list_tables_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.bigtable_admin_v2.BaseBigtableTableAdminAsyncClient", + "shortName": "BaseBigtableTableAdminAsyncClient" + }, + "fullName": "google.cloud.bigtable_admin_v2.BaseBigtableTableAdminAsyncClient.modify_column_families", + "method": { + "fullName": "google.bigtable.admin.v2.BigtableTableAdmin.ModifyColumnFamilies", + "service": { + "fullName": "google.bigtable.admin.v2.BigtableTableAdmin", + "shortName": "BigtableTableAdmin" + }, + "shortName": "ModifyColumnFamilies" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.bigtable_admin_v2.types.ModifyColumnFamiliesRequest" + }, + { + "name": "name", + "type": "str" + }, + { + "name": "modifications", + "type": "MutableSequence[google.cloud.bigtable_admin_v2.types.ModifyColumnFamiliesRequest.Modification]" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, Union[str, bytes]]]" + } + ], + "resultType": "google.cloud.bigtable_admin_v2.types.Table", + "shortName": "modify_column_families" + }, + "description": "Sample for ModifyColumnFamilies", + "file": "bigtableadmin_v2_generated_bigtable_table_admin_modify_column_families_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "bigtableadmin_v2_generated_BigtableTableAdmin_ModifyColumnFamilies_async", + "segments": [ + { + "end": 51, + "start": 27, + "type": "FULL" + }, + { + "end": 51, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 45, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 48, + "start": 46, + "type": "REQUEST_EXECUTION" + }, + { + "end": 52, + "start": 49, + "type": "RESPONSE_HANDLING" + } + ], + "title": "bigtableadmin_v2_generated_bigtable_table_admin_modify_column_families_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.bigtable_admin_v2.BaseBigtableTableAdminClient", + "shortName": "BaseBigtableTableAdminClient" + }, + "fullName": "google.cloud.bigtable_admin_v2.BaseBigtableTableAdminClient.modify_column_families", + "method": { + "fullName": "google.bigtable.admin.v2.BigtableTableAdmin.ModifyColumnFamilies", + "service": { + "fullName": "google.bigtable.admin.v2.BigtableTableAdmin", + "shortName": "BigtableTableAdmin" + }, + "shortName": "ModifyColumnFamilies" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.bigtable_admin_v2.types.ModifyColumnFamiliesRequest" + }, + { + "name": "name", + "type": "str" + }, + { + "name": "modifications", + "type": "MutableSequence[google.cloud.bigtable_admin_v2.types.ModifyColumnFamiliesRequest.Modification]" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, Union[str, bytes]]]" + } + ], + "resultType": "google.cloud.bigtable_admin_v2.types.Table", + "shortName": "modify_column_families" + }, + "description": "Sample for ModifyColumnFamilies", + "file": "bigtableadmin_v2_generated_bigtable_table_admin_modify_column_families_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "bigtableadmin_v2_generated_BigtableTableAdmin_ModifyColumnFamilies_sync", + "segments": [ + { + "end": 51, + "start": 27, + "type": "FULL" + }, + { + "end": 51, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 45, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 48, + "start": 46, + "type": "REQUEST_EXECUTION" + }, + { + "end": 52, + "start": 49, + "type": "RESPONSE_HANDLING" + } + ], + "title": "bigtableadmin_v2_generated_bigtable_table_admin_modify_column_families_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.bigtable_admin_v2.BaseBigtableTableAdminAsyncClient", + "shortName": "BaseBigtableTableAdminAsyncClient" + }, + "fullName": "google.cloud.bigtable_admin_v2.BaseBigtableTableAdminAsyncClient._restore_table", + "method": { + "fullName": "google.bigtable.admin.v2.BigtableTableAdmin.RestoreTable", + "service": { + "fullName": "google.bigtable.admin.v2.BigtableTableAdmin", + "shortName": "BigtableTableAdmin" + }, + "shortName": "RestoreTable" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.bigtable_admin_v2.types.RestoreTableRequest" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, Union[str, bytes]]]" + } + ], + "resultType": "google.api_core.operation_async.AsyncOperation", + "shortName": "_restore_table" + }, + "description": "Sample for RestoreTable", + "file": "bigtableadmin_v2_generated_bigtable_table_admin_restore_table_async_internal.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "bigtableadmin_v2_generated_BigtableTableAdmin_RestoreTable_async_internal", + "segments": [ + { + "end": 57, + "start": 27, + "type": "FULL" + }, + { + "end": 57, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 47, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 54, + "start": 48, + "type": "REQUEST_EXECUTION" + }, + { + "end": 58, + "start": 55, + "type": "RESPONSE_HANDLING" + } + ], + "title": "bigtableadmin_v2_generated_bigtable_table_admin_restore_table_async_internal.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.bigtable_admin_v2.BaseBigtableTableAdminClient", + "shortName": "BaseBigtableTableAdminClient" + }, + "fullName": "google.cloud.bigtable_admin_v2.BaseBigtableTableAdminClient._restore_table", + "method": { + "fullName": "google.bigtable.admin.v2.BigtableTableAdmin.RestoreTable", + "service": { + "fullName": "google.bigtable.admin.v2.BigtableTableAdmin", + "shortName": "BigtableTableAdmin" + }, + "shortName": "RestoreTable" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.bigtable_admin_v2.types.RestoreTableRequest" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, Union[str, bytes]]]" + } + ], + "resultType": "google.api_core.operation.Operation", + "shortName": "_restore_table" + }, + "description": "Sample for RestoreTable", + "file": "bigtableadmin_v2_generated_bigtable_table_admin_restore_table_sync_internal.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "bigtableadmin_v2_generated_BigtableTableAdmin_RestoreTable_sync_internal", + "segments": [ + { + "end": 57, + "start": 27, + "type": "FULL" + }, + { + "end": 57, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 47, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 54, + "start": 48, + "type": "REQUEST_EXECUTION" + }, + { + "end": 58, + "start": 55, + "type": "RESPONSE_HANDLING" + } + ], + "title": "bigtableadmin_v2_generated_bigtable_table_admin_restore_table_sync_internal.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.bigtable_admin_v2.BaseBigtableTableAdminAsyncClient", + "shortName": "BaseBigtableTableAdminAsyncClient" + }, + "fullName": "google.cloud.bigtable_admin_v2.BaseBigtableTableAdminAsyncClient.set_iam_policy", + "method": { + "fullName": "google.bigtable.admin.v2.BigtableTableAdmin.SetIamPolicy", + "service": { + "fullName": "google.bigtable.admin.v2.BigtableTableAdmin", + "shortName": "BigtableTableAdmin" + }, + "shortName": "SetIamPolicy" + }, + "parameters": [ + { + "name": "request", + "type": "google.iam.v1.iam_policy_pb2.SetIamPolicyRequest" + }, + { + "name": "resource", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, Union[str, bytes]]]" + } + ], + "resultType": "google.iam.v1.policy_pb2.Policy", + "shortName": "set_iam_policy" + }, + "description": "Sample for SetIamPolicy", + "file": "bigtableadmin_v2_generated_bigtable_table_admin_set_iam_policy_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "bigtableadmin_v2_generated_BigtableTableAdmin_SetIamPolicy_async", + "segments": [ + { + "end": 52, + "start": 27, + "type": "FULL" + }, + { + "end": 52, + "start": 27, + "type": "SHORT" + }, + { + "end": 41, + "start": 39, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 46, + "start": 42, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 49, + "start": 47, + "type": "REQUEST_EXECUTION" + }, + { + "end": 53, + "start": 50, + "type": "RESPONSE_HANDLING" + } + ], + "title": "bigtableadmin_v2_generated_bigtable_table_admin_set_iam_policy_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.bigtable_admin_v2.BaseBigtableTableAdminClient", + "shortName": "BaseBigtableTableAdminClient" + }, + "fullName": "google.cloud.bigtable_admin_v2.BaseBigtableTableAdminClient.set_iam_policy", + "method": { + "fullName": "google.bigtable.admin.v2.BigtableTableAdmin.SetIamPolicy", + "service": { + "fullName": "google.bigtable.admin.v2.BigtableTableAdmin", + "shortName": "BigtableTableAdmin" + }, + "shortName": "SetIamPolicy" + }, + "parameters": [ + { + "name": "request", + "type": "google.iam.v1.iam_policy_pb2.SetIamPolicyRequest" + }, + { + "name": "resource", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, Union[str, bytes]]]" + } + ], + "resultType": "google.iam.v1.policy_pb2.Policy", + "shortName": "set_iam_policy" + }, + "description": "Sample for SetIamPolicy", + "file": "bigtableadmin_v2_generated_bigtable_table_admin_set_iam_policy_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "bigtableadmin_v2_generated_BigtableTableAdmin_SetIamPolicy_sync", + "segments": [ + { + "end": 52, + "start": 27, + "type": "FULL" + }, + { + "end": 52, + "start": 27, + "type": "SHORT" + }, + { + "end": 41, + "start": 39, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 46, + "start": 42, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 49, + "start": 47, + "type": "REQUEST_EXECUTION" + }, + { + "end": 53, + "start": 50, + "type": "RESPONSE_HANDLING" + } + ], + "title": "bigtableadmin_v2_generated_bigtable_table_admin_set_iam_policy_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.bigtable_admin_v2.BaseBigtableTableAdminAsyncClient", + "shortName": "BaseBigtableTableAdminAsyncClient" + }, + "fullName": "google.cloud.bigtable_admin_v2.BaseBigtableTableAdminAsyncClient.snapshot_table", + "method": { + "fullName": "google.bigtable.admin.v2.BigtableTableAdmin.SnapshotTable", + "service": { + "fullName": "google.bigtable.admin.v2.BigtableTableAdmin", + "shortName": "BigtableTableAdmin" + }, + "shortName": "SnapshotTable" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.bigtable_admin_v2.types.SnapshotTableRequest" + }, + { + "name": "name", + "type": "str" + }, + { + "name": "cluster", + "type": "str" + }, + { + "name": "snapshot_id", + "type": "str" + }, + { + "name": "description", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, Union[str, bytes]]]" + } + ], + "resultType": "google.api_core.operation_async.AsyncOperation", + "shortName": "snapshot_table" + }, + "description": "Sample for SnapshotTable", + "file": "bigtableadmin_v2_generated_bigtable_table_admin_snapshot_table_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "bigtableadmin_v2_generated_BigtableTableAdmin_SnapshotTable_async", + "segments": [ + { + "end": 57, + "start": 27, + "type": "FULL" + }, + { + "end": 57, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 47, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 54, + "start": 48, + "type": "REQUEST_EXECUTION" + }, + { + "end": 58, + "start": 55, + "type": "RESPONSE_HANDLING" + } + ], + "title": "bigtableadmin_v2_generated_bigtable_table_admin_snapshot_table_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.bigtable_admin_v2.BaseBigtableTableAdminClient", + "shortName": "BaseBigtableTableAdminClient" + }, + "fullName": "google.cloud.bigtable_admin_v2.BaseBigtableTableAdminClient.snapshot_table", + "method": { + "fullName": "google.bigtable.admin.v2.BigtableTableAdmin.SnapshotTable", + "service": { + "fullName": "google.bigtable.admin.v2.BigtableTableAdmin", + "shortName": "BigtableTableAdmin" + }, + "shortName": "SnapshotTable" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.bigtable_admin_v2.types.SnapshotTableRequest" + }, + { + "name": "name", + "type": "str" + }, + { + "name": "cluster", + "type": "str" + }, + { + "name": "snapshot_id", + "type": "str" + }, + { + "name": "description", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, Union[str, bytes]]]" + } + ], + "resultType": "google.api_core.operation.Operation", + "shortName": "snapshot_table" + }, + "description": "Sample for SnapshotTable", + "file": "bigtableadmin_v2_generated_bigtable_table_admin_snapshot_table_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "bigtableadmin_v2_generated_BigtableTableAdmin_SnapshotTable_sync", + "segments": [ + { + "end": 57, + "start": 27, + "type": "FULL" + }, + { + "end": 57, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 47, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 54, + "start": 48, + "type": "REQUEST_EXECUTION" + }, + { + "end": 58, + "start": 55, + "type": "RESPONSE_HANDLING" + } + ], + "title": "bigtableadmin_v2_generated_bigtable_table_admin_snapshot_table_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.bigtable_admin_v2.BaseBigtableTableAdminAsyncClient", + "shortName": "BaseBigtableTableAdminAsyncClient" + }, + "fullName": "google.cloud.bigtable_admin_v2.BaseBigtableTableAdminAsyncClient.test_iam_permissions", + "method": { + "fullName": "google.bigtable.admin.v2.BigtableTableAdmin.TestIamPermissions", + "service": { + "fullName": "google.bigtable.admin.v2.BigtableTableAdmin", + "shortName": "BigtableTableAdmin" + }, + "shortName": "TestIamPermissions" + }, + "parameters": [ + { + "name": "request", + "type": "google.iam.v1.iam_policy_pb2.TestIamPermissionsRequest" + }, + { + "name": "resource", + "type": "str" + }, + { + "name": "permissions", + "type": "MutableSequence[str]" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, Union[str, bytes]]]" + } + ], + "resultType": "google.iam.v1.iam_policy_pb2.TestIamPermissionsResponse", + "shortName": "test_iam_permissions" + }, + "description": "Sample for TestIamPermissions", + "file": "bigtableadmin_v2_generated_bigtable_table_admin_test_iam_permissions_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "bigtableadmin_v2_generated_BigtableTableAdmin_TestIamPermissions_async", + "segments": [ + { + "end": 53, + "start": 27, + "type": "FULL" + }, + { + "end": 53, + "start": 27, + "type": "SHORT" + }, + { + "end": 41, + "start": 39, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 47, + "start": 42, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 50, + "start": 48, + "type": "REQUEST_EXECUTION" + }, + { + "end": 54, + "start": 51, + "type": "RESPONSE_HANDLING" + } + ], + "title": "bigtableadmin_v2_generated_bigtable_table_admin_test_iam_permissions_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.bigtable_admin_v2.BaseBigtableTableAdminClient", + "shortName": "BaseBigtableTableAdminClient" + }, + "fullName": "google.cloud.bigtable_admin_v2.BaseBigtableTableAdminClient.test_iam_permissions", + "method": { + "fullName": "google.bigtable.admin.v2.BigtableTableAdmin.TestIamPermissions", + "service": { + "fullName": "google.bigtable.admin.v2.BigtableTableAdmin", + "shortName": "BigtableTableAdmin" + }, + "shortName": "TestIamPermissions" + }, + "parameters": [ + { + "name": "request", + "type": "google.iam.v1.iam_policy_pb2.TestIamPermissionsRequest" + }, + { + "name": "resource", + "type": "str" + }, + { + "name": "permissions", + "type": "MutableSequence[str]" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, Union[str, bytes]]]" + } + ], + "resultType": "google.iam.v1.iam_policy_pb2.TestIamPermissionsResponse", + "shortName": "test_iam_permissions" + }, + "description": "Sample for TestIamPermissions", + "file": "bigtableadmin_v2_generated_bigtable_table_admin_test_iam_permissions_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "bigtableadmin_v2_generated_BigtableTableAdmin_TestIamPermissions_sync", + "segments": [ + { + "end": 53, + "start": 27, + "type": "FULL" + }, + { + "end": 53, + "start": 27, + "type": "SHORT" + }, + { + "end": 41, + "start": 39, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 47, + "start": 42, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 50, + "start": 48, + "type": "REQUEST_EXECUTION" + }, + { + "end": 54, + "start": 51, + "type": "RESPONSE_HANDLING" + } + ], + "title": "bigtableadmin_v2_generated_bigtable_table_admin_test_iam_permissions_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.bigtable_admin_v2.BaseBigtableTableAdminAsyncClient", + "shortName": "BaseBigtableTableAdminAsyncClient" + }, + "fullName": "google.cloud.bigtable_admin_v2.BaseBigtableTableAdminAsyncClient.undelete_table", + "method": { + "fullName": "google.bigtable.admin.v2.BigtableTableAdmin.UndeleteTable", + "service": { + "fullName": "google.bigtable.admin.v2.BigtableTableAdmin", + "shortName": "BigtableTableAdmin" + }, + "shortName": "UndeleteTable" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.bigtable_admin_v2.types.UndeleteTableRequest" + }, + { + "name": "name", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, Union[str, bytes]]]" + } + ], + "resultType": "google.api_core.operation_async.AsyncOperation", + "shortName": "undelete_table" + }, + "description": "Sample for UndeleteTable", + "file": "bigtableadmin_v2_generated_bigtable_table_admin_undelete_table_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "bigtableadmin_v2_generated_BigtableTableAdmin_UndeleteTable_async", + "segments": [ + { + "end": 55, + "start": 27, + "type": "FULL" + }, + { + "end": 55, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 45, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 52, + "start": 46, + "type": "REQUEST_EXECUTION" + }, + { + "end": 56, + "start": 53, + "type": "RESPONSE_HANDLING" + } + ], + "title": "bigtableadmin_v2_generated_bigtable_table_admin_undelete_table_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.bigtable_admin_v2.BaseBigtableTableAdminClient", + "shortName": "BaseBigtableTableAdminClient" + }, + "fullName": "google.cloud.bigtable_admin_v2.BaseBigtableTableAdminClient.undelete_table", + "method": { + "fullName": "google.bigtable.admin.v2.BigtableTableAdmin.UndeleteTable", + "service": { + "fullName": "google.bigtable.admin.v2.BigtableTableAdmin", + "shortName": "BigtableTableAdmin" + }, + "shortName": "UndeleteTable" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.bigtable_admin_v2.types.UndeleteTableRequest" + }, + { + "name": "name", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, Union[str, bytes]]]" + } + ], + "resultType": "google.api_core.operation.Operation", + "shortName": "undelete_table" + }, + "description": "Sample for UndeleteTable", + "file": "bigtableadmin_v2_generated_bigtable_table_admin_undelete_table_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "bigtableadmin_v2_generated_BigtableTableAdmin_UndeleteTable_sync", + "segments": [ + { + "end": 55, + "start": 27, + "type": "FULL" + }, + { + "end": 55, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 45, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 52, + "start": 46, + "type": "REQUEST_EXECUTION" + }, + { + "end": 56, + "start": 53, + "type": "RESPONSE_HANDLING" + } + ], + "title": "bigtableadmin_v2_generated_bigtable_table_admin_undelete_table_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.bigtable_admin_v2.BaseBigtableTableAdminAsyncClient", + "shortName": "BaseBigtableTableAdminAsyncClient" + }, + "fullName": "google.cloud.bigtable_admin_v2.BaseBigtableTableAdminAsyncClient.update_authorized_view", + "method": { + "fullName": "google.bigtable.admin.v2.BigtableTableAdmin.UpdateAuthorizedView", + "service": { + "fullName": "google.bigtable.admin.v2.BigtableTableAdmin", + "shortName": "BigtableTableAdmin" + }, + "shortName": "UpdateAuthorizedView" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.bigtable_admin_v2.types.UpdateAuthorizedViewRequest" + }, + { + "name": "authorized_view", + "type": "google.cloud.bigtable_admin_v2.types.AuthorizedView" + }, + { + "name": "update_mask", + "type": "google.protobuf.field_mask_pb2.FieldMask" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, Union[str, bytes]]]" + } + ], + "resultType": "google.api_core.operation_async.AsyncOperation", + "shortName": "update_authorized_view" + }, + "description": "Sample for UpdateAuthorizedView", + "file": "bigtableadmin_v2_generated_bigtable_table_admin_update_authorized_view_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "bigtableadmin_v2_generated_BigtableTableAdmin_UpdateAuthorizedView_async", + "segments": [ + { + "end": 54, + "start": 27, + "type": "FULL" + }, + { + "end": 54, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 44, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 51, + "start": 45, + "type": "REQUEST_EXECUTION" + }, + { + "end": 55, + "start": 52, + "type": "RESPONSE_HANDLING" + } + ], + "title": "bigtableadmin_v2_generated_bigtable_table_admin_update_authorized_view_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.bigtable_admin_v2.BaseBigtableTableAdminClient", + "shortName": "BaseBigtableTableAdminClient" + }, + "fullName": "google.cloud.bigtable_admin_v2.BaseBigtableTableAdminClient.update_authorized_view", + "method": { + "fullName": "google.bigtable.admin.v2.BigtableTableAdmin.UpdateAuthorizedView", + "service": { + "fullName": "google.bigtable.admin.v2.BigtableTableAdmin", + "shortName": "BigtableTableAdmin" + }, + "shortName": "UpdateAuthorizedView" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.bigtable_admin_v2.types.UpdateAuthorizedViewRequest" + }, + { + "name": "authorized_view", + "type": "google.cloud.bigtable_admin_v2.types.AuthorizedView" + }, + { + "name": "update_mask", + "type": "google.protobuf.field_mask_pb2.FieldMask" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, Union[str, bytes]]]" + } + ], + "resultType": "google.api_core.operation.Operation", + "shortName": "update_authorized_view" + }, + "description": "Sample for UpdateAuthorizedView", + "file": "bigtableadmin_v2_generated_bigtable_table_admin_update_authorized_view_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "bigtableadmin_v2_generated_BigtableTableAdmin_UpdateAuthorizedView_sync", + "segments": [ + { + "end": 54, + "start": 27, + "type": "FULL" + }, + { + "end": 54, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 44, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 51, + "start": 45, + "type": "REQUEST_EXECUTION" + }, + { + "end": 55, + "start": 52, + "type": "RESPONSE_HANDLING" + } + ], + "title": "bigtableadmin_v2_generated_bigtable_table_admin_update_authorized_view_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.bigtable_admin_v2.BaseBigtableTableAdminAsyncClient", + "shortName": "BaseBigtableTableAdminAsyncClient" + }, + "fullName": "google.cloud.bigtable_admin_v2.BaseBigtableTableAdminAsyncClient.update_backup", + "method": { + "fullName": "google.bigtable.admin.v2.BigtableTableAdmin.UpdateBackup", + "service": { + "fullName": "google.bigtable.admin.v2.BigtableTableAdmin", + "shortName": "BigtableTableAdmin" + }, + "shortName": "UpdateBackup" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.bigtable_admin_v2.types.UpdateBackupRequest" + }, + { + "name": "backup", + "type": "google.cloud.bigtable_admin_v2.types.Backup" + }, + { + "name": "update_mask", + "type": "google.protobuf.field_mask_pb2.FieldMask" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, Union[str, bytes]]]" + } + ], + "resultType": "google.cloud.bigtable_admin_v2.types.Backup", + "shortName": "update_backup" + }, + "description": "Sample for UpdateBackup", + "file": "bigtableadmin_v2_generated_bigtable_table_admin_update_backup_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "bigtableadmin_v2_generated_BigtableTableAdmin_UpdateBackup_async", + "segments": [ + { + "end": 54, + "start": 27, + "type": "FULL" + }, + { + "end": 54, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 48, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 51, + "start": 49, + "type": "REQUEST_EXECUTION" + }, + { + "end": 55, + "start": 52, + "type": "RESPONSE_HANDLING" + } + ], + "title": "bigtableadmin_v2_generated_bigtable_table_admin_update_backup_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.bigtable_admin_v2.BaseBigtableTableAdminClient", + "shortName": "BaseBigtableTableAdminClient" + }, + "fullName": "google.cloud.bigtable_admin_v2.BaseBigtableTableAdminClient.update_backup", + "method": { + "fullName": "google.bigtable.admin.v2.BigtableTableAdmin.UpdateBackup", + "service": { + "fullName": "google.bigtable.admin.v2.BigtableTableAdmin", + "shortName": "BigtableTableAdmin" + }, + "shortName": "UpdateBackup" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.bigtable_admin_v2.types.UpdateBackupRequest" + }, + { + "name": "backup", + "type": "google.cloud.bigtable_admin_v2.types.Backup" + }, + { + "name": "update_mask", + "type": "google.protobuf.field_mask_pb2.FieldMask" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, Union[str, bytes]]]" + } + ], + "resultType": "google.cloud.bigtable_admin_v2.types.Backup", + "shortName": "update_backup" + }, + "description": "Sample for UpdateBackup", + "file": "bigtableadmin_v2_generated_bigtable_table_admin_update_backup_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "bigtableadmin_v2_generated_BigtableTableAdmin_UpdateBackup_sync", + "segments": [ + { + "end": 54, + "start": 27, + "type": "FULL" + }, + { + "end": 54, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 48, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 51, + "start": 49, + "type": "REQUEST_EXECUTION" + }, + { + "end": 55, + "start": 52, + "type": "RESPONSE_HANDLING" + } + ], + "title": "bigtableadmin_v2_generated_bigtable_table_admin_update_backup_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.bigtable_admin_v2.BaseBigtableTableAdminAsyncClient", + "shortName": "BaseBigtableTableAdminAsyncClient" + }, + "fullName": "google.cloud.bigtable_admin_v2.BaseBigtableTableAdminAsyncClient.update_schema_bundle", + "method": { + "fullName": "google.bigtable.admin.v2.BigtableTableAdmin.UpdateSchemaBundle", + "service": { + "fullName": "google.bigtable.admin.v2.BigtableTableAdmin", + "shortName": "BigtableTableAdmin" + }, + "shortName": "UpdateSchemaBundle" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.bigtable_admin_v2.types.UpdateSchemaBundleRequest" + }, + { + "name": "schema_bundle", + "type": "google.cloud.bigtable_admin_v2.types.SchemaBundle" + }, + { + "name": "update_mask", + "type": "google.protobuf.field_mask_pb2.FieldMask" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, Union[str, bytes]]]" + } + ], + "resultType": "google.api_core.operation_async.AsyncOperation", + "shortName": "update_schema_bundle" + }, + "description": "Sample for UpdateSchemaBundle", + "file": "bigtableadmin_v2_generated_bigtable_table_admin_update_schema_bundle_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "bigtableadmin_v2_generated_BigtableTableAdmin_UpdateSchemaBundle_async", + "segments": [ + { + "end": 58, + "start": 27, + "type": "FULL" + }, + { + "end": 58, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 48, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 55, + "start": 49, + "type": "REQUEST_EXECUTION" + }, + { + "end": 59, + "start": 56, + "type": "RESPONSE_HANDLING" + } + ], + "title": "bigtableadmin_v2_generated_bigtable_table_admin_update_schema_bundle_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.bigtable_admin_v2.BaseBigtableTableAdminClient", + "shortName": "BaseBigtableTableAdminClient" + }, + "fullName": "google.cloud.bigtable_admin_v2.BaseBigtableTableAdminClient.update_schema_bundle", + "method": { + "fullName": "google.bigtable.admin.v2.BigtableTableAdmin.UpdateSchemaBundle", + "service": { + "fullName": "google.bigtable.admin.v2.BigtableTableAdmin", + "shortName": "BigtableTableAdmin" + }, + "shortName": "UpdateSchemaBundle" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.bigtable_admin_v2.types.UpdateSchemaBundleRequest" + }, + { + "name": "schema_bundle", + "type": "google.cloud.bigtable_admin_v2.types.SchemaBundle" + }, + { + "name": "update_mask", + "type": "google.protobuf.field_mask_pb2.FieldMask" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, Union[str, bytes]]]" + } + ], + "resultType": "google.api_core.operation.Operation", + "shortName": "update_schema_bundle" + }, + "description": "Sample for UpdateSchemaBundle", + "file": "bigtableadmin_v2_generated_bigtable_table_admin_update_schema_bundle_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "bigtableadmin_v2_generated_BigtableTableAdmin_UpdateSchemaBundle_sync", + "segments": [ + { + "end": 58, + "start": 27, + "type": "FULL" + }, + { + "end": 58, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 48, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 55, + "start": 49, + "type": "REQUEST_EXECUTION" + }, + { + "end": 59, + "start": 56, + "type": "RESPONSE_HANDLING" + } + ], + "title": "bigtableadmin_v2_generated_bigtable_table_admin_update_schema_bundle_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.bigtable_admin_v2.BaseBigtableTableAdminAsyncClient", + "shortName": "BaseBigtableTableAdminAsyncClient" + }, + "fullName": "google.cloud.bigtable_admin_v2.BaseBigtableTableAdminAsyncClient.update_table", + "method": { + "fullName": "google.bigtable.admin.v2.BigtableTableAdmin.UpdateTable", + "service": { + "fullName": "google.bigtable.admin.v2.BigtableTableAdmin", + "shortName": "BigtableTableAdmin" + }, + "shortName": "UpdateTable" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.bigtable_admin_v2.types.UpdateTableRequest" + }, + { + "name": "table", + "type": "google.cloud.bigtable_admin_v2.types.Table" + }, + { + "name": "update_mask", + "type": "google.protobuf.field_mask_pb2.FieldMask" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, Union[str, bytes]]]" + } + ], + "resultType": "google.api_core.operation_async.AsyncOperation", + "shortName": "update_table" + }, + "description": "Sample for UpdateTable", + "file": "bigtableadmin_v2_generated_bigtable_table_admin_update_table_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "bigtableadmin_v2_generated_BigtableTableAdmin_UpdateTable_async", + "segments": [ + { + "end": 54, + "start": 27, + "type": "FULL" + }, + { + "end": 54, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 44, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 51, + "start": 45, + "type": "REQUEST_EXECUTION" + }, + { + "end": 55, + "start": 52, + "type": "RESPONSE_HANDLING" + } + ], + "title": "bigtableadmin_v2_generated_bigtable_table_admin_update_table_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.bigtable_admin_v2.BaseBigtableTableAdminClient", + "shortName": "BaseBigtableTableAdminClient" + }, + "fullName": "google.cloud.bigtable_admin_v2.BaseBigtableTableAdminClient.update_table", + "method": { + "fullName": "google.bigtable.admin.v2.BigtableTableAdmin.UpdateTable", + "service": { + "fullName": "google.bigtable.admin.v2.BigtableTableAdmin", + "shortName": "BigtableTableAdmin" + }, + "shortName": "UpdateTable" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.bigtable_admin_v2.types.UpdateTableRequest" + }, + { + "name": "table", + "type": "google.cloud.bigtable_admin_v2.types.Table" + }, + { + "name": "update_mask", + "type": "google.protobuf.field_mask_pb2.FieldMask" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, Union[str, bytes]]]" + } + ], + "resultType": "google.api_core.operation.Operation", + "shortName": "update_table" + }, + "description": "Sample for UpdateTable", + "file": "bigtableadmin_v2_generated_bigtable_table_admin_update_table_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "bigtableadmin_v2_generated_BigtableTableAdmin_UpdateTable_sync", + "segments": [ + { + "end": 54, + "start": 27, + "type": "FULL" + }, + { + "end": 54, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 44, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 51, + "start": 45, + "type": "REQUEST_EXECUTION" + }, + { + "end": 55, + "start": 52, + "type": "RESPONSE_HANDLING" + } + ], + "title": "bigtableadmin_v2_generated_bigtable_table_admin_update_table_sync.py" + } + ] +} diff --git a/scripts/fixup_bigtable_admin_v2_keywords.py b/scripts/fixup_bigtable_admin_v2_keywords.py index 6265c1768..1fda05668 100644 --- a/scripts/fixup_bigtable_admin_v2_keywords.py +++ b/scripts/fixup_bigtable_admin_v2_keywords.py @@ -97,7 +97,7 @@ class bigtable_adminCallTransformer(cst.CSTTransformer): 'update_authorized_view': ('authorized_view', 'update_mask', 'ignore_warnings', ), 'update_backup': ('backup', 'update_mask', ), 'update_cluster': ('name', 'location', 'state', 'serve_nodes', 'node_scaling_factor', 'cluster_config', 'default_storage_type', 'encryption_config', ), - 'update_instance': ('display_name', 'name', 'state', 'type_', 'labels', 'create_time', 'satisfies_pzs', 'satisfies_pzi', ), + 'update_instance': ('display_name', 'name', 'state', 'type_', 'labels', 'create_time', 'satisfies_pzs', 'satisfies_pzi', 'tags', ), 'update_logical_view': ('logical_view', 'update_mask', ), 'update_materialized_view': ('materialized_view', 'update_mask', ), 'update_schema_bundle': ('schema_bundle', 'update_mask', 'ignore_warnings', ), diff --git a/tests/unit/data/_async/test_client.py b/tests/unit/data/_async/test_client.py index 5e7302d75..d47f6b8ed 100644 --- a/tests/unit/data/_async/test_client.py +++ b/tests/unit/data/_async/test_client.py @@ -1358,20 +1358,13 @@ async def test_call_metadata(self, include_app_profile, fn_name, fn_args, gapic_ # expect x-goog-request-params tag assert metadata[0][0] == "x-goog-request-params" routing_str = metadata[0][1] - assert self._expected_routing_header(table) in routing_str + assert f"table_name={table.table_name}" in routing_str if include_app_profile: assert "app_profile_id=profile" in routing_str else: # empty app_profile_id should send empty string assert "app_profile_id=" in routing_str - @staticmethod - def _expected_routing_header(table): - """ - the expected routing header for this _ApiSurface type - """ - return f"table_name={table.table_name}" - @CrossSync.convert_class( "TestAuthorizedView", add_mapping_for_name="TestAuthorizedView" @@ -1399,13 +1392,6 @@ def _make_one( client, instance_id, table_id, view_id, app_profile_id, **kwargs ) - @staticmethod - def _expected_routing_header(view): - """ - the expected routing header for this _ApiSurface type - """ - return f"authorized_view_name={view.authorized_view_name}" - @CrossSync.pytest async def test_ctor(self): from google.cloud.bigtable.data._helpers import _WarmedInstanceKey diff --git a/tests/unit/data/_sync_autogen/test_client.py b/tests/unit/data/_sync_autogen/test_client.py index 38866c9dd..22ca8ee26 100644 --- a/tests/unit/data/_sync_autogen/test_client.py +++ b/tests/unit/data/_sync_autogen/test_client.py @@ -1085,17 +1085,12 @@ def test_call_metadata(self, include_app_profile, fn_name, fn_args, gapic_fn): assert len(metadata) == 1 assert metadata[0][0] == "x-goog-request-params" routing_str = metadata[0][1] - assert self._expected_routing_header(table) in routing_str + assert f"table_name={table.table_name}" in routing_str if include_app_profile: assert "app_profile_id=profile" in routing_str else: assert "app_profile_id=" in routing_str - @staticmethod - def _expected_routing_header(table): - """the expected routing header for this _ApiSurface type""" - return f"table_name={table.table_name}" - @CrossSync._Sync_Impl.add_mapping_decorator("TestAuthorizedView") class TestAuthorizedView(CrossSync._Sync_Impl.TestTable): @@ -1120,11 +1115,6 @@ def _make_one( client, instance_id, table_id, view_id, app_profile_id, **kwargs ) - @staticmethod - def _expected_routing_header(view): - """the expected routing header for this _ApiSurface type""" - return f"authorized_view_name={view.authorized_view_name}" - def test_ctor(self): from google.cloud.bigtable.data._helpers import _WarmedInstanceKey diff --git a/tests/unit/gapic/bigtable_admin_v2/test_bigtable_instance_admin.py b/tests/unit/gapic/bigtable_admin_v2/test_bigtable_instance_admin.py index 2ad52bf52..166f27eb8 100644 --- a/tests/unit/gapic/bigtable_admin_v2/test_bigtable_instance_admin.py +++ b/tests/unit/gapic/bigtable_admin_v2/test_bigtable_instance_admin.py @@ -20687,6 +20687,7 @@ def test_partial_update_instance_rest_call_success(request_type): "create_time": {"seconds": 751, "nanos": 543}, "satisfies_pzs": True, "satisfies_pzi": True, + "tags": {}, } # The version of a generated dependency at test runtime may differ from the version used during generation. # Delete any fields which are not present in the current runtime dependency diff --git a/tests/unit/gapic/bigtable_v2/test_bigtable.py b/tests/unit/gapic/bigtable_v2/test_bigtable.py index dba535dcc..cb78d2b7a 100644 --- a/tests/unit/gapic/bigtable_v2/test_bigtable.py +++ b/tests/unit/gapic/bigtable_v2/test_bigtable.py @@ -6852,11 +6852,13 @@ def test_read_rows_routing_parameters_request_1_grpc(): expected_headers = { "table_name": "projects/sample1/instances/sample2/tables/sample3", - "app_profile_id": "", } - assert ( - gapic_v1.routing_header.to_grpc_metadata(expected_headers) in kw["metadata"] + + # assert the expected headers are present, in any order + routing_string = next( + iter([m[1] for m in kw["metadata"] if m[0] == "x-goog-request-params"]) ) + assert all([f"{k}={v}" in routing_string for k, v in expected_headers.items()]) def test_read_rows_routing_parameters_request_2_grpc(): @@ -6878,9 +6880,12 @@ def test_read_rows_routing_parameters_request_2_grpc(): assert args[0] == request_msg expected_headers = {"app_profile_id": "sample1"} - assert ( - gapic_v1.routing_header.to_grpc_metadata(expected_headers) in kw["metadata"] + + # assert the expected headers are present, in any order + routing_string = next( + iter([m[1] for m in kw["metadata"] if m[0] == "x-goog-request-params"]) ) + assert all([f"{k}={v}" in routing_string for k, v in expected_headers.items()]) def test_read_rows_routing_parameters_request_3_grpc(): @@ -6894,7 +6899,7 @@ def test_read_rows_routing_parameters_request_3_grpc(): call.return_value = iter([bigtable.ReadRowsResponse()]) client.read_rows( request={ - "authorized_view_name": "projects/sample1/instances/sample2/tables/sample3/authorizedViews/sample4" + "authorized_view_name": "projects/sample1/instances/sample2/tables/sample3/sample4" } ) @@ -6903,19 +6908,21 @@ def test_read_rows_routing_parameters_request_3_grpc(): _, args, kw = call.mock_calls[0] request_msg = bigtable.ReadRowsRequest( **{ - "authorized_view_name": "projects/sample1/instances/sample2/tables/sample3/authorizedViews/sample4" + "authorized_view_name": "projects/sample1/instances/sample2/tables/sample3/sample4" } ) assert args[0] == request_msg expected_headers = { - "app_profile_id": "", - "authorized_view_name": "projects/sample1/instances/sample2/tables/sample3/authorizedViews/sample4", + "table_name": "projects/sample1/instances/sample2/tables/sample3", } - assert ( - gapic_v1.routing_header.to_grpc_metadata(expected_headers) in kw["metadata"] + + # assert the expected headers are present, in any order + routing_string = next( + iter([m[1] for m in kw["metadata"] if m[0] == "x-goog-request-params"]) ) + assert all([f"{k}={v}" in routing_string for k, v in expected_headers.items()]) def test_sample_row_keys_routing_parameters_request_1_grpc(): @@ -6942,11 +6949,13 @@ def test_sample_row_keys_routing_parameters_request_1_grpc(): expected_headers = { "table_name": "projects/sample1/instances/sample2/tables/sample3", - "app_profile_id": "", } - assert ( - gapic_v1.routing_header.to_grpc_metadata(expected_headers) in kw["metadata"] + + # assert the expected headers are present, in any order + routing_string = next( + iter([m[1] for m in kw["metadata"] if m[0] == "x-goog-request-params"]) ) + assert all([f"{k}={v}" in routing_string for k, v in expected_headers.items()]) def test_sample_row_keys_routing_parameters_request_2_grpc(): @@ -6968,9 +6977,12 @@ def test_sample_row_keys_routing_parameters_request_2_grpc(): assert args[0] == request_msg expected_headers = {"app_profile_id": "sample1"} - assert ( - gapic_v1.routing_header.to_grpc_metadata(expected_headers) in kw["metadata"] + + # assert the expected headers are present, in any order + routing_string = next( + iter([m[1] for m in kw["metadata"] if m[0] == "x-goog-request-params"]) ) + assert all([f"{k}={v}" in routing_string for k, v in expected_headers.items()]) def test_sample_row_keys_routing_parameters_request_3_grpc(): @@ -6984,7 +6996,7 @@ def test_sample_row_keys_routing_parameters_request_3_grpc(): call.return_value = iter([bigtable.SampleRowKeysResponse()]) client.sample_row_keys( request={ - "authorized_view_name": "projects/sample1/instances/sample2/tables/sample3/authorizedViews/sample4" + "authorized_view_name": "projects/sample1/instances/sample2/tables/sample3/sample4" } ) @@ -6993,19 +7005,21 @@ def test_sample_row_keys_routing_parameters_request_3_grpc(): _, args, kw = call.mock_calls[0] request_msg = bigtable.SampleRowKeysRequest( **{ - "authorized_view_name": "projects/sample1/instances/sample2/tables/sample3/authorizedViews/sample4" + "authorized_view_name": "projects/sample1/instances/sample2/tables/sample3/sample4" } ) assert args[0] == request_msg expected_headers = { - "app_profile_id": "", - "authorized_view_name": "projects/sample1/instances/sample2/tables/sample3/authorizedViews/sample4", + "table_name": "projects/sample1/instances/sample2/tables/sample3", } - assert ( - gapic_v1.routing_header.to_grpc_metadata(expected_headers) in kw["metadata"] + + # assert the expected headers are present, in any order + routing_string = next( + iter([m[1] for m in kw["metadata"] if m[0] == "x-goog-request-params"]) ) + assert all([f"{k}={v}" in routing_string for k, v in expected_headers.items()]) def test_mutate_row_routing_parameters_request_1_grpc(): @@ -7032,11 +7046,13 @@ def test_mutate_row_routing_parameters_request_1_grpc(): expected_headers = { "table_name": "projects/sample1/instances/sample2/tables/sample3", - "app_profile_id": "", } - assert ( - gapic_v1.routing_header.to_grpc_metadata(expected_headers) in kw["metadata"] + + # assert the expected headers are present, in any order + routing_string = next( + iter([m[1] for m in kw["metadata"] if m[0] == "x-goog-request-params"]) ) + assert all([f"{k}={v}" in routing_string for k, v in expected_headers.items()]) def test_mutate_row_routing_parameters_request_2_grpc(): @@ -7058,9 +7074,12 @@ def test_mutate_row_routing_parameters_request_2_grpc(): assert args[0] == request_msg expected_headers = {"app_profile_id": "sample1"} - assert ( - gapic_v1.routing_header.to_grpc_metadata(expected_headers) in kw["metadata"] + + # assert the expected headers are present, in any order + routing_string = next( + iter([m[1] for m in kw["metadata"] if m[0] == "x-goog-request-params"]) ) + assert all([f"{k}={v}" in routing_string for k, v in expected_headers.items()]) def test_mutate_row_routing_parameters_request_3_grpc(): @@ -7074,7 +7093,7 @@ def test_mutate_row_routing_parameters_request_3_grpc(): call.return_value = bigtable.MutateRowResponse() client.mutate_row( request={ - "authorized_view_name": "projects/sample1/instances/sample2/tables/sample3/authorizedViews/sample4" + "authorized_view_name": "projects/sample1/instances/sample2/tables/sample3/sample4" } ) @@ -7083,19 +7102,21 @@ def test_mutate_row_routing_parameters_request_3_grpc(): _, args, kw = call.mock_calls[0] request_msg = bigtable.MutateRowRequest( **{ - "authorized_view_name": "projects/sample1/instances/sample2/tables/sample3/authorizedViews/sample4" + "authorized_view_name": "projects/sample1/instances/sample2/tables/sample3/sample4" } ) assert args[0] == request_msg expected_headers = { - "app_profile_id": "", - "authorized_view_name": "projects/sample1/instances/sample2/tables/sample3/authorizedViews/sample4", + "table_name": "projects/sample1/instances/sample2/tables/sample3", } - assert ( - gapic_v1.routing_header.to_grpc_metadata(expected_headers) in kw["metadata"] + + # assert the expected headers are present, in any order + routing_string = next( + iter([m[1] for m in kw["metadata"] if m[0] == "x-goog-request-params"]) ) + assert all([f"{k}={v}" in routing_string for k, v in expected_headers.items()]) def test_mutate_rows_routing_parameters_request_1_grpc(): @@ -7122,11 +7143,13 @@ def test_mutate_rows_routing_parameters_request_1_grpc(): expected_headers = { "table_name": "projects/sample1/instances/sample2/tables/sample3", - "app_profile_id": "", } - assert ( - gapic_v1.routing_header.to_grpc_metadata(expected_headers) in kw["metadata"] + + # assert the expected headers are present, in any order + routing_string = next( + iter([m[1] for m in kw["metadata"] if m[0] == "x-goog-request-params"]) ) + assert all([f"{k}={v}" in routing_string for k, v in expected_headers.items()]) def test_mutate_rows_routing_parameters_request_2_grpc(): @@ -7148,9 +7171,12 @@ def test_mutate_rows_routing_parameters_request_2_grpc(): assert args[0] == request_msg expected_headers = {"app_profile_id": "sample1"} - assert ( - gapic_v1.routing_header.to_grpc_metadata(expected_headers) in kw["metadata"] + + # assert the expected headers are present, in any order + routing_string = next( + iter([m[1] for m in kw["metadata"] if m[0] == "x-goog-request-params"]) ) + assert all([f"{k}={v}" in routing_string for k, v in expected_headers.items()]) def test_mutate_rows_routing_parameters_request_3_grpc(): @@ -7164,7 +7190,7 @@ def test_mutate_rows_routing_parameters_request_3_grpc(): call.return_value = iter([bigtable.MutateRowsResponse()]) client.mutate_rows( request={ - "authorized_view_name": "projects/sample1/instances/sample2/tables/sample3/authorizedViews/sample4" + "authorized_view_name": "projects/sample1/instances/sample2/tables/sample3/sample4" } ) @@ -7173,19 +7199,21 @@ def test_mutate_rows_routing_parameters_request_3_grpc(): _, args, kw = call.mock_calls[0] request_msg = bigtable.MutateRowsRequest( **{ - "authorized_view_name": "projects/sample1/instances/sample2/tables/sample3/authorizedViews/sample4" + "authorized_view_name": "projects/sample1/instances/sample2/tables/sample3/sample4" } ) assert args[0] == request_msg expected_headers = { - "app_profile_id": "", - "authorized_view_name": "projects/sample1/instances/sample2/tables/sample3/authorizedViews/sample4", + "table_name": "projects/sample1/instances/sample2/tables/sample3", } - assert ( - gapic_v1.routing_header.to_grpc_metadata(expected_headers) in kw["metadata"] + + # assert the expected headers are present, in any order + routing_string = next( + iter([m[1] for m in kw["metadata"] if m[0] == "x-goog-request-params"]) ) + assert all([f"{k}={v}" in routing_string for k, v in expected_headers.items()]) def test_check_and_mutate_row_routing_parameters_request_1_grpc(): @@ -7214,11 +7242,13 @@ def test_check_and_mutate_row_routing_parameters_request_1_grpc(): expected_headers = { "table_name": "projects/sample1/instances/sample2/tables/sample3", - "app_profile_id": "", } - assert ( - gapic_v1.routing_header.to_grpc_metadata(expected_headers) in kw["metadata"] + + # assert the expected headers are present, in any order + routing_string = next( + iter([m[1] for m in kw["metadata"] if m[0] == "x-goog-request-params"]) ) + assert all([f"{k}={v}" in routing_string for k, v in expected_headers.items()]) def test_check_and_mutate_row_routing_parameters_request_2_grpc(): @@ -7242,9 +7272,12 @@ def test_check_and_mutate_row_routing_parameters_request_2_grpc(): assert args[0] == request_msg expected_headers = {"app_profile_id": "sample1"} - assert ( - gapic_v1.routing_header.to_grpc_metadata(expected_headers) in kw["metadata"] + + # assert the expected headers are present, in any order + routing_string = next( + iter([m[1] for m in kw["metadata"] if m[0] == "x-goog-request-params"]) ) + assert all([f"{k}={v}" in routing_string for k, v in expected_headers.items()]) def test_check_and_mutate_row_routing_parameters_request_3_grpc(): @@ -7260,7 +7293,7 @@ def test_check_and_mutate_row_routing_parameters_request_3_grpc(): call.return_value = bigtable.CheckAndMutateRowResponse() client.check_and_mutate_row( request={ - "authorized_view_name": "projects/sample1/instances/sample2/tables/sample3/authorizedViews/sample4" + "authorized_view_name": "projects/sample1/instances/sample2/tables/sample3/sample4" } ) @@ -7269,19 +7302,21 @@ def test_check_and_mutate_row_routing_parameters_request_3_grpc(): _, args, kw = call.mock_calls[0] request_msg = bigtable.CheckAndMutateRowRequest( **{ - "authorized_view_name": "projects/sample1/instances/sample2/tables/sample3/authorizedViews/sample4" + "authorized_view_name": "projects/sample1/instances/sample2/tables/sample3/sample4" } ) assert args[0] == request_msg expected_headers = { - "app_profile_id": "", - "authorized_view_name": "projects/sample1/instances/sample2/tables/sample3/authorizedViews/sample4", + "table_name": "projects/sample1/instances/sample2/tables/sample3", } - assert ( - gapic_v1.routing_header.to_grpc_metadata(expected_headers) in kw["metadata"] + + # assert the expected headers are present, in any order + routing_string = next( + iter([m[1] for m in kw["metadata"] if m[0] == "x-goog-request-params"]) ) + assert all([f"{k}={v}" in routing_string for k, v in expected_headers.items()]) def test_ping_and_warm_routing_parameters_request_1_grpc(): @@ -7306,11 +7341,13 @@ def test_ping_and_warm_routing_parameters_request_1_grpc(): expected_headers = { "name": "projects/sample1/instances/sample2", - "app_profile_id": "", } - assert ( - gapic_v1.routing_header.to_grpc_metadata(expected_headers) in kw["metadata"] + + # assert the expected headers are present, in any order + routing_string = next( + iter([m[1] for m in kw["metadata"] if m[0] == "x-goog-request-params"]) ) + assert all([f"{k}={v}" in routing_string for k, v in expected_headers.items()]) def test_ping_and_warm_routing_parameters_request_2_grpc(): @@ -7332,9 +7369,12 @@ def test_ping_and_warm_routing_parameters_request_2_grpc(): assert args[0] == request_msg expected_headers = {"app_profile_id": "sample1"} - assert ( - gapic_v1.routing_header.to_grpc_metadata(expected_headers) in kw["metadata"] + + # assert the expected headers are present, in any order + routing_string = next( + iter([m[1] for m in kw["metadata"] if m[0] == "x-goog-request-params"]) ) + assert all([f"{k}={v}" in routing_string for k, v in expected_headers.items()]) def test_read_modify_write_row_routing_parameters_request_1_grpc(): @@ -7363,11 +7403,13 @@ def test_read_modify_write_row_routing_parameters_request_1_grpc(): expected_headers = { "table_name": "projects/sample1/instances/sample2/tables/sample3", - "app_profile_id": "", } - assert ( - gapic_v1.routing_header.to_grpc_metadata(expected_headers) in kw["metadata"] + + # assert the expected headers are present, in any order + routing_string = next( + iter([m[1] for m in kw["metadata"] if m[0] == "x-goog-request-params"]) ) + assert all([f"{k}={v}" in routing_string for k, v in expected_headers.items()]) def test_read_modify_write_row_routing_parameters_request_2_grpc(): @@ -7393,9 +7435,12 @@ def test_read_modify_write_row_routing_parameters_request_2_grpc(): assert args[0] == request_msg expected_headers = {"app_profile_id": "sample1"} - assert ( - gapic_v1.routing_header.to_grpc_metadata(expected_headers) in kw["metadata"] + + # assert the expected headers are present, in any order + routing_string = next( + iter([m[1] for m in kw["metadata"] if m[0] == "x-goog-request-params"]) ) + assert all([f"{k}={v}" in routing_string for k, v in expected_headers.items()]) def test_read_modify_write_row_routing_parameters_request_3_grpc(): @@ -7411,7 +7456,7 @@ def test_read_modify_write_row_routing_parameters_request_3_grpc(): call.return_value = bigtable.ReadModifyWriteRowResponse() client.read_modify_write_row( request={ - "authorized_view_name": "projects/sample1/instances/sample2/tables/sample3/authorizedViews/sample4" + "authorized_view_name": "projects/sample1/instances/sample2/tables/sample3/sample4" } ) @@ -7420,19 +7465,21 @@ def test_read_modify_write_row_routing_parameters_request_3_grpc(): _, args, kw = call.mock_calls[0] request_msg = bigtable.ReadModifyWriteRowRequest( **{ - "authorized_view_name": "projects/sample1/instances/sample2/tables/sample3/authorizedViews/sample4" + "authorized_view_name": "projects/sample1/instances/sample2/tables/sample3/sample4" } ) assert args[0] == request_msg expected_headers = { - "app_profile_id": "", - "authorized_view_name": "projects/sample1/instances/sample2/tables/sample3/authorizedViews/sample4", + "table_name": "projects/sample1/instances/sample2/tables/sample3", } - assert ( - gapic_v1.routing_header.to_grpc_metadata(expected_headers) in kw["metadata"] + + # assert the expected headers are present, in any order + routing_string = next( + iter([m[1] for m in kw["metadata"] if m[0] == "x-goog-request-params"]) ) + assert all([f"{k}={v}" in routing_string for k, v in expected_headers.items()]) def test_prepare_query_routing_parameters_request_1_grpc(): @@ -7459,11 +7506,13 @@ def test_prepare_query_routing_parameters_request_1_grpc(): expected_headers = { "name": "projects/sample1/instances/sample2", - "app_profile_id": "", } - assert ( - gapic_v1.routing_header.to_grpc_metadata(expected_headers) in kw["metadata"] + + # assert the expected headers are present, in any order + routing_string = next( + iter([m[1] for m in kw["metadata"] if m[0] == "x-goog-request-params"]) ) + assert all([f"{k}={v}" in routing_string for k, v in expected_headers.items()]) def test_prepare_query_routing_parameters_request_2_grpc(): @@ -7485,9 +7534,12 @@ def test_prepare_query_routing_parameters_request_2_grpc(): assert args[0] == request_msg expected_headers = {"app_profile_id": "sample1"} - assert ( - gapic_v1.routing_header.to_grpc_metadata(expected_headers) in kw["metadata"] + + # assert the expected headers are present, in any order + routing_string = next( + iter([m[1] for m in kw["metadata"] if m[0] == "x-goog-request-params"]) ) + assert all([f"{k}={v}" in routing_string for k, v in expected_headers.items()]) def test_execute_query_routing_parameters_request_1_grpc(): @@ -7514,11 +7566,13 @@ def test_execute_query_routing_parameters_request_1_grpc(): expected_headers = { "name": "projects/sample1/instances/sample2", - "app_profile_id": "", } - assert ( - gapic_v1.routing_header.to_grpc_metadata(expected_headers) in kw["metadata"] + + # assert the expected headers are present, in any order + routing_string = next( + iter([m[1] for m in kw["metadata"] if m[0] == "x-goog-request-params"]) ) + assert all([f"{k}={v}" in routing_string for k, v in expected_headers.items()]) def test_execute_query_routing_parameters_request_2_grpc(): @@ -7540,9 +7594,12 @@ def test_execute_query_routing_parameters_request_2_grpc(): assert args[0] == request_msg expected_headers = {"app_profile_id": "sample1"} - assert ( - gapic_v1.routing_header.to_grpc_metadata(expected_headers) in kw["metadata"] + + # assert the expected headers are present, in any order + routing_string = next( + iter([m[1] for m in kw["metadata"] if m[0] == "x-goog-request-params"]) ) + assert all([f"{k}={v}" in routing_string for k, v in expected_headers.items()]) def test_transport_kind_grpc_asyncio(): @@ -7881,11 +7938,13 @@ async def test_read_rows_routing_parameters_request_1_grpc_asyncio(): expected_headers = { "table_name": "projects/sample1/instances/sample2/tables/sample3", - "app_profile_id": "", } - assert ( - gapic_v1.routing_header.to_grpc_metadata(expected_headers) in kw["metadata"] + + # assert the expected headers are present, in any order + routing_string = next( + iter([m[1] for m in kw["metadata"] if m[0] == "x-goog-request-params"]) ) + assert all([f"{k}={v}" in routing_string for k, v in expected_headers.items()]) @pytest.mark.asyncio @@ -7912,9 +7971,12 @@ async def test_read_rows_routing_parameters_request_2_grpc_asyncio(): assert args[0] == request_msg expected_headers = {"app_profile_id": "sample1"} - assert ( - gapic_v1.routing_header.to_grpc_metadata(expected_headers) in kw["metadata"] + + # assert the expected headers are present, in any order + routing_string = next( + iter([m[1] for m in kw["metadata"] if m[0] == "x-goog-request-params"]) ) + assert all([f"{k}={v}" in routing_string for k, v in expected_headers.items()]) @pytest.mark.asyncio @@ -7933,7 +7995,7 @@ async def test_read_rows_routing_parameters_request_3_grpc_asyncio(): ) await client.read_rows( request={ - "authorized_view_name": "projects/sample1/instances/sample2/tables/sample3/authorizedViews/sample4" + "authorized_view_name": "projects/sample1/instances/sample2/tables/sample3/sample4" } ) @@ -7942,19 +8004,21 @@ async def test_read_rows_routing_parameters_request_3_grpc_asyncio(): _, args, kw = call.mock_calls[0] request_msg = bigtable.ReadRowsRequest( **{ - "authorized_view_name": "projects/sample1/instances/sample2/tables/sample3/authorizedViews/sample4" + "authorized_view_name": "projects/sample1/instances/sample2/tables/sample3/sample4" } ) assert args[0] == request_msg expected_headers = { - "app_profile_id": "", - "authorized_view_name": "projects/sample1/instances/sample2/tables/sample3/authorizedViews/sample4", + "table_name": "projects/sample1/instances/sample2/tables/sample3", } - assert ( - gapic_v1.routing_header.to_grpc_metadata(expected_headers) in kw["metadata"] + + # assert the expected headers are present, in any order + routing_string = next( + iter([m[1] for m in kw["metadata"] if m[0] == "x-goog-request-params"]) ) + assert all([f"{k}={v}" in routing_string for k, v in expected_headers.items()]) @pytest.mark.asyncio @@ -7986,11 +8050,13 @@ async def test_sample_row_keys_routing_parameters_request_1_grpc_asyncio(): expected_headers = { "table_name": "projects/sample1/instances/sample2/tables/sample3", - "app_profile_id": "", } - assert ( - gapic_v1.routing_header.to_grpc_metadata(expected_headers) in kw["metadata"] + + # assert the expected headers are present, in any order + routing_string = next( + iter([m[1] for m in kw["metadata"] if m[0] == "x-goog-request-params"]) ) + assert all([f"{k}={v}" in routing_string for k, v in expected_headers.items()]) @pytest.mark.asyncio @@ -8017,9 +8083,12 @@ async def test_sample_row_keys_routing_parameters_request_2_grpc_asyncio(): assert args[0] == request_msg expected_headers = {"app_profile_id": "sample1"} - assert ( - gapic_v1.routing_header.to_grpc_metadata(expected_headers) in kw["metadata"] + + # assert the expected headers are present, in any order + routing_string = next( + iter([m[1] for m in kw["metadata"] if m[0] == "x-goog-request-params"]) ) + assert all([f"{k}={v}" in routing_string for k, v in expected_headers.items()]) @pytest.mark.asyncio @@ -8038,7 +8107,7 @@ async def test_sample_row_keys_routing_parameters_request_3_grpc_asyncio(): ) await client.sample_row_keys( request={ - "authorized_view_name": "projects/sample1/instances/sample2/tables/sample3/authorizedViews/sample4" + "authorized_view_name": "projects/sample1/instances/sample2/tables/sample3/sample4" } ) @@ -8047,19 +8116,21 @@ async def test_sample_row_keys_routing_parameters_request_3_grpc_asyncio(): _, args, kw = call.mock_calls[0] request_msg = bigtable.SampleRowKeysRequest( **{ - "authorized_view_name": "projects/sample1/instances/sample2/tables/sample3/authorizedViews/sample4" + "authorized_view_name": "projects/sample1/instances/sample2/tables/sample3/sample4" } ) assert args[0] == request_msg expected_headers = { - "app_profile_id": "", - "authorized_view_name": "projects/sample1/instances/sample2/tables/sample3/authorizedViews/sample4", + "table_name": "projects/sample1/instances/sample2/tables/sample3", } - assert ( - gapic_v1.routing_header.to_grpc_metadata(expected_headers) in kw["metadata"] + + # assert the expected headers are present, in any order + routing_string = next( + iter([m[1] for m in kw["metadata"] if m[0] == "x-goog-request-params"]) ) + assert all([f"{k}={v}" in routing_string for k, v in expected_headers.items()]) @pytest.mark.asyncio @@ -8090,11 +8161,13 @@ async def test_mutate_row_routing_parameters_request_1_grpc_asyncio(): expected_headers = { "table_name": "projects/sample1/instances/sample2/tables/sample3", - "app_profile_id": "", } - assert ( - gapic_v1.routing_header.to_grpc_metadata(expected_headers) in kw["metadata"] + + # assert the expected headers are present, in any order + routing_string = next( + iter([m[1] for m in kw["metadata"] if m[0] == "x-goog-request-params"]) ) + assert all([f"{k}={v}" in routing_string for k, v in expected_headers.items()]) @pytest.mark.asyncio @@ -8120,9 +8193,12 @@ async def test_mutate_row_routing_parameters_request_2_grpc_asyncio(): assert args[0] == request_msg expected_headers = {"app_profile_id": "sample1"} - assert ( - gapic_v1.routing_header.to_grpc_metadata(expected_headers) in kw["metadata"] + + # assert the expected headers are present, in any order + routing_string = next( + iter([m[1] for m in kw["metadata"] if m[0] == "x-goog-request-params"]) ) + assert all([f"{k}={v}" in routing_string for k, v in expected_headers.items()]) @pytest.mark.asyncio @@ -8140,7 +8216,7 @@ async def test_mutate_row_routing_parameters_request_3_grpc_asyncio(): ) await client.mutate_row( request={ - "authorized_view_name": "projects/sample1/instances/sample2/tables/sample3/authorizedViews/sample4" + "authorized_view_name": "projects/sample1/instances/sample2/tables/sample3/sample4" } ) @@ -8149,19 +8225,21 @@ async def test_mutate_row_routing_parameters_request_3_grpc_asyncio(): _, args, kw = call.mock_calls[0] request_msg = bigtable.MutateRowRequest( **{ - "authorized_view_name": "projects/sample1/instances/sample2/tables/sample3/authorizedViews/sample4" + "authorized_view_name": "projects/sample1/instances/sample2/tables/sample3/sample4" } ) assert args[0] == request_msg expected_headers = { - "app_profile_id": "", - "authorized_view_name": "projects/sample1/instances/sample2/tables/sample3/authorizedViews/sample4", + "table_name": "projects/sample1/instances/sample2/tables/sample3", } - assert ( - gapic_v1.routing_header.to_grpc_metadata(expected_headers) in kw["metadata"] + + # assert the expected headers are present, in any order + routing_string = next( + iter([m[1] for m in kw["metadata"] if m[0] == "x-goog-request-params"]) ) + assert all([f"{k}={v}" in routing_string for k, v in expected_headers.items()]) @pytest.mark.asyncio @@ -8193,11 +8271,13 @@ async def test_mutate_rows_routing_parameters_request_1_grpc_asyncio(): expected_headers = { "table_name": "projects/sample1/instances/sample2/tables/sample3", - "app_profile_id": "", } - assert ( - gapic_v1.routing_header.to_grpc_metadata(expected_headers) in kw["metadata"] + + # assert the expected headers are present, in any order + routing_string = next( + iter([m[1] for m in kw["metadata"] if m[0] == "x-goog-request-params"]) ) + assert all([f"{k}={v}" in routing_string for k, v in expected_headers.items()]) @pytest.mark.asyncio @@ -8224,9 +8304,12 @@ async def test_mutate_rows_routing_parameters_request_2_grpc_asyncio(): assert args[0] == request_msg expected_headers = {"app_profile_id": "sample1"} - assert ( - gapic_v1.routing_header.to_grpc_metadata(expected_headers) in kw["metadata"] + + # assert the expected headers are present, in any order + routing_string = next( + iter([m[1] for m in kw["metadata"] if m[0] == "x-goog-request-params"]) ) + assert all([f"{k}={v}" in routing_string for k, v in expected_headers.items()]) @pytest.mark.asyncio @@ -8245,7 +8328,7 @@ async def test_mutate_rows_routing_parameters_request_3_grpc_asyncio(): ) await client.mutate_rows( request={ - "authorized_view_name": "projects/sample1/instances/sample2/tables/sample3/authorizedViews/sample4" + "authorized_view_name": "projects/sample1/instances/sample2/tables/sample3/sample4" } ) @@ -8254,19 +8337,21 @@ async def test_mutate_rows_routing_parameters_request_3_grpc_asyncio(): _, args, kw = call.mock_calls[0] request_msg = bigtable.MutateRowsRequest( **{ - "authorized_view_name": "projects/sample1/instances/sample2/tables/sample3/authorizedViews/sample4" + "authorized_view_name": "projects/sample1/instances/sample2/tables/sample3/sample4" } ) assert args[0] == request_msg expected_headers = { - "app_profile_id": "", - "authorized_view_name": "projects/sample1/instances/sample2/tables/sample3/authorizedViews/sample4", + "table_name": "projects/sample1/instances/sample2/tables/sample3", } - assert ( - gapic_v1.routing_header.to_grpc_metadata(expected_headers) in kw["metadata"] + + # assert the expected headers are present, in any order + routing_string = next( + iter([m[1] for m in kw["metadata"] if m[0] == "x-goog-request-params"]) ) + assert all([f"{k}={v}" in routing_string for k, v in expected_headers.items()]) @pytest.mark.asyncio @@ -8301,11 +8386,13 @@ async def test_check_and_mutate_row_routing_parameters_request_1_grpc_asyncio(): expected_headers = { "table_name": "projects/sample1/instances/sample2/tables/sample3", - "app_profile_id": "", } - assert ( - gapic_v1.routing_header.to_grpc_metadata(expected_headers) in kw["metadata"] + + # assert the expected headers are present, in any order + routing_string = next( + iter([m[1] for m in kw["metadata"] if m[0] == "x-goog-request-params"]) ) + assert all([f"{k}={v}" in routing_string for k, v in expected_headers.items()]) @pytest.mark.asyncio @@ -8335,9 +8422,12 @@ async def test_check_and_mutate_row_routing_parameters_request_2_grpc_asyncio(): assert args[0] == request_msg expected_headers = {"app_profile_id": "sample1"} - assert ( - gapic_v1.routing_header.to_grpc_metadata(expected_headers) in kw["metadata"] + + # assert the expected headers are present, in any order + routing_string = next( + iter([m[1] for m in kw["metadata"] if m[0] == "x-goog-request-params"]) ) + assert all([f"{k}={v}" in routing_string for k, v in expected_headers.items()]) @pytest.mark.asyncio @@ -8359,7 +8449,7 @@ async def test_check_and_mutate_row_routing_parameters_request_3_grpc_asyncio(): ) await client.check_and_mutate_row( request={ - "authorized_view_name": "projects/sample1/instances/sample2/tables/sample3/authorizedViews/sample4" + "authorized_view_name": "projects/sample1/instances/sample2/tables/sample3/sample4" } ) @@ -8368,19 +8458,21 @@ async def test_check_and_mutate_row_routing_parameters_request_3_grpc_asyncio(): _, args, kw = call.mock_calls[0] request_msg = bigtable.CheckAndMutateRowRequest( **{ - "authorized_view_name": "projects/sample1/instances/sample2/tables/sample3/authorizedViews/sample4" + "authorized_view_name": "projects/sample1/instances/sample2/tables/sample3/sample4" } ) assert args[0] == request_msg expected_headers = { - "app_profile_id": "", - "authorized_view_name": "projects/sample1/instances/sample2/tables/sample3/authorizedViews/sample4", + "table_name": "projects/sample1/instances/sample2/tables/sample3", } - assert ( - gapic_v1.routing_header.to_grpc_metadata(expected_headers) in kw["metadata"] + + # assert the expected headers are present, in any order + routing_string = next( + iter([m[1] for m in kw["metadata"] if m[0] == "x-goog-request-params"]) ) + assert all([f"{k}={v}" in routing_string for k, v in expected_headers.items()]) @pytest.mark.asyncio @@ -8411,11 +8503,13 @@ async def test_ping_and_warm_routing_parameters_request_1_grpc_asyncio(): expected_headers = { "name": "projects/sample1/instances/sample2", - "app_profile_id": "", } - assert ( - gapic_v1.routing_header.to_grpc_metadata(expected_headers) in kw["metadata"] + + # assert the expected headers are present, in any order + routing_string = next( + iter([m[1] for m in kw["metadata"] if m[0] == "x-goog-request-params"]) ) + assert all([f"{k}={v}" in routing_string for k, v in expected_headers.items()]) @pytest.mark.asyncio @@ -8441,9 +8535,12 @@ async def test_ping_and_warm_routing_parameters_request_2_grpc_asyncio(): assert args[0] == request_msg expected_headers = {"app_profile_id": "sample1"} - assert ( - gapic_v1.routing_header.to_grpc_metadata(expected_headers) in kw["metadata"] + + # assert the expected headers are present, in any order + routing_string = next( + iter([m[1] for m in kw["metadata"] if m[0] == "x-goog-request-params"]) ) + assert all([f"{k}={v}" in routing_string for k, v in expected_headers.items()]) @pytest.mark.asyncio @@ -8476,11 +8573,13 @@ async def test_read_modify_write_row_routing_parameters_request_1_grpc_asyncio() expected_headers = { "table_name": "projects/sample1/instances/sample2/tables/sample3", - "app_profile_id": "", } - assert ( - gapic_v1.routing_header.to_grpc_metadata(expected_headers) in kw["metadata"] + + # assert the expected headers are present, in any order + routing_string = next( + iter([m[1] for m in kw["metadata"] if m[0] == "x-goog-request-params"]) ) + assert all([f"{k}={v}" in routing_string for k, v in expected_headers.items()]) @pytest.mark.asyncio @@ -8510,9 +8609,12 @@ async def test_read_modify_write_row_routing_parameters_request_2_grpc_asyncio() assert args[0] == request_msg expected_headers = {"app_profile_id": "sample1"} - assert ( - gapic_v1.routing_header.to_grpc_metadata(expected_headers) in kw["metadata"] + + # assert the expected headers are present, in any order + routing_string = next( + iter([m[1] for m in kw["metadata"] if m[0] == "x-goog-request-params"]) ) + assert all([f"{k}={v}" in routing_string for k, v in expected_headers.items()]) @pytest.mark.asyncio @@ -8532,7 +8634,7 @@ async def test_read_modify_write_row_routing_parameters_request_3_grpc_asyncio() ) await client.read_modify_write_row( request={ - "authorized_view_name": "projects/sample1/instances/sample2/tables/sample3/authorizedViews/sample4" + "authorized_view_name": "projects/sample1/instances/sample2/tables/sample3/sample4" } ) @@ -8541,19 +8643,21 @@ async def test_read_modify_write_row_routing_parameters_request_3_grpc_asyncio() _, args, kw = call.mock_calls[0] request_msg = bigtable.ReadModifyWriteRowRequest( **{ - "authorized_view_name": "projects/sample1/instances/sample2/tables/sample3/authorizedViews/sample4" + "authorized_view_name": "projects/sample1/instances/sample2/tables/sample3/sample4" } ) assert args[0] == request_msg expected_headers = { - "app_profile_id": "", - "authorized_view_name": "projects/sample1/instances/sample2/tables/sample3/authorizedViews/sample4", + "table_name": "projects/sample1/instances/sample2/tables/sample3", } - assert ( - gapic_v1.routing_header.to_grpc_metadata(expected_headers) in kw["metadata"] + + # assert the expected headers are present, in any order + routing_string = next( + iter([m[1] for m in kw["metadata"] if m[0] == "x-goog-request-params"]) ) + assert all([f"{k}={v}" in routing_string for k, v in expected_headers.items()]) @pytest.mark.asyncio @@ -8586,11 +8690,13 @@ async def test_prepare_query_routing_parameters_request_1_grpc_asyncio(): expected_headers = { "name": "projects/sample1/instances/sample2", - "app_profile_id": "", } - assert ( - gapic_v1.routing_header.to_grpc_metadata(expected_headers) in kw["metadata"] + + # assert the expected headers are present, in any order + routing_string = next( + iter([m[1] for m in kw["metadata"] if m[0] == "x-goog-request-params"]) ) + assert all([f"{k}={v}" in routing_string for k, v in expected_headers.items()]) @pytest.mark.asyncio @@ -8618,9 +8724,12 @@ async def test_prepare_query_routing_parameters_request_2_grpc_asyncio(): assert args[0] == request_msg expected_headers = {"app_profile_id": "sample1"} - assert ( - gapic_v1.routing_header.to_grpc_metadata(expected_headers) in kw["metadata"] + + # assert the expected headers are present, in any order + routing_string = next( + iter([m[1] for m in kw["metadata"] if m[0] == "x-goog-request-params"]) ) + assert all([f"{k}={v}" in routing_string for k, v in expected_headers.items()]) @pytest.mark.asyncio @@ -8652,11 +8761,13 @@ async def test_execute_query_routing_parameters_request_1_grpc_asyncio(): expected_headers = { "name": "projects/sample1/instances/sample2", - "app_profile_id": "", } - assert ( - gapic_v1.routing_header.to_grpc_metadata(expected_headers) in kw["metadata"] + + # assert the expected headers are present, in any order + routing_string = next( + iter([m[1] for m in kw["metadata"] if m[0] == "x-goog-request-params"]) ) + assert all([f"{k}={v}" in routing_string for k, v in expected_headers.items()]) @pytest.mark.asyncio @@ -8683,9 +8794,12 @@ async def test_execute_query_routing_parameters_request_2_grpc_asyncio(): assert args[0] == request_msg expected_headers = {"app_profile_id": "sample1"} - assert ( - gapic_v1.routing_header.to_grpc_metadata(expected_headers) in kw["metadata"] + + # assert the expected headers are present, in any order + routing_string = next( + iter([m[1] for m in kw["metadata"] if m[0] == "x-goog-request-params"]) ) + assert all([f"{k}={v}" in routing_string for k, v in expected_headers.items()]) def test_transport_kind_rest(): @@ -10334,11 +10448,13 @@ def test_read_rows_routing_parameters_request_1_rest(): expected_headers = { "table_name": "projects/sample1/instances/sample2/tables/sample3", - "app_profile_id": "", } - assert ( - gapic_v1.routing_header.to_grpc_metadata(expected_headers) in kw["metadata"] + + # assert the expected headers are present, in any order + routing_string = next( + iter([m[1] for m in kw["metadata"] if m[0] == "x-goog-request-params"]) ) + assert all([f"{k}={v}" in routing_string for k, v in expected_headers.items()]) def test_read_rows_routing_parameters_request_2_rest(): @@ -10359,9 +10475,12 @@ def test_read_rows_routing_parameters_request_2_rest(): assert args[0] == request_msg expected_headers = {"app_profile_id": "sample1"} - assert ( - gapic_v1.routing_header.to_grpc_metadata(expected_headers) in kw["metadata"] + + # assert the expected headers are present, in any order + routing_string = next( + iter([m[1] for m in kw["metadata"] if m[0] == "x-goog-request-params"]) ) + assert all([f"{k}={v}" in routing_string for k, v in expected_headers.items()]) def test_read_rows_routing_parameters_request_3_rest(): @@ -10374,7 +10493,7 @@ def test_read_rows_routing_parameters_request_3_rest(): with mock.patch.object(type(client.transport.read_rows), "__call__") as call: client.read_rows( request={ - "authorized_view_name": "projects/sample1/instances/sample2/tables/sample3/authorizedViews/sample4" + "authorized_view_name": "projects/sample1/instances/sample2/tables/sample3/sample4" } ) @@ -10383,19 +10502,21 @@ def test_read_rows_routing_parameters_request_3_rest(): _, args, kw = call.mock_calls[0] request_msg = bigtable.ReadRowsRequest( **{ - "authorized_view_name": "projects/sample1/instances/sample2/tables/sample3/authorizedViews/sample4" + "authorized_view_name": "projects/sample1/instances/sample2/tables/sample3/sample4" } ) assert args[0] == request_msg expected_headers = { - "app_profile_id": "", - "authorized_view_name": "projects/sample1/instances/sample2/tables/sample3/authorizedViews/sample4", + "table_name": "projects/sample1/instances/sample2/tables/sample3", } - assert ( - gapic_v1.routing_header.to_grpc_metadata(expected_headers) in kw["metadata"] + + # assert the expected headers are present, in any order + routing_string = next( + iter([m[1] for m in kw["metadata"] if m[0] == "x-goog-request-params"]) ) + assert all([f"{k}={v}" in routing_string for k, v in expected_headers.items()]) def test_sample_row_keys_routing_parameters_request_1_rest(): @@ -10421,11 +10542,13 @@ def test_sample_row_keys_routing_parameters_request_1_rest(): expected_headers = { "table_name": "projects/sample1/instances/sample2/tables/sample3", - "app_profile_id": "", } - assert ( - gapic_v1.routing_header.to_grpc_metadata(expected_headers) in kw["metadata"] + + # assert the expected headers are present, in any order + routing_string = next( + iter([m[1] for m in kw["metadata"] if m[0] == "x-goog-request-params"]) ) + assert all([f"{k}={v}" in routing_string for k, v in expected_headers.items()]) def test_sample_row_keys_routing_parameters_request_2_rest(): @@ -10446,9 +10569,12 @@ def test_sample_row_keys_routing_parameters_request_2_rest(): assert args[0] == request_msg expected_headers = {"app_profile_id": "sample1"} - assert ( - gapic_v1.routing_header.to_grpc_metadata(expected_headers) in kw["metadata"] + + # assert the expected headers are present, in any order + routing_string = next( + iter([m[1] for m in kw["metadata"] if m[0] == "x-goog-request-params"]) ) + assert all([f"{k}={v}" in routing_string for k, v in expected_headers.items()]) def test_sample_row_keys_routing_parameters_request_3_rest(): @@ -10461,7 +10587,7 @@ def test_sample_row_keys_routing_parameters_request_3_rest(): with mock.patch.object(type(client.transport.sample_row_keys), "__call__") as call: client.sample_row_keys( request={ - "authorized_view_name": "projects/sample1/instances/sample2/tables/sample3/authorizedViews/sample4" + "authorized_view_name": "projects/sample1/instances/sample2/tables/sample3/sample4" } ) @@ -10470,19 +10596,21 @@ def test_sample_row_keys_routing_parameters_request_3_rest(): _, args, kw = call.mock_calls[0] request_msg = bigtable.SampleRowKeysRequest( **{ - "authorized_view_name": "projects/sample1/instances/sample2/tables/sample3/authorizedViews/sample4" + "authorized_view_name": "projects/sample1/instances/sample2/tables/sample3/sample4" } ) assert args[0] == request_msg expected_headers = { - "app_profile_id": "", - "authorized_view_name": "projects/sample1/instances/sample2/tables/sample3/authorizedViews/sample4", + "table_name": "projects/sample1/instances/sample2/tables/sample3", } - assert ( - gapic_v1.routing_header.to_grpc_metadata(expected_headers) in kw["metadata"] + + # assert the expected headers are present, in any order + routing_string = next( + iter([m[1] for m in kw["metadata"] if m[0] == "x-goog-request-params"]) ) + assert all([f"{k}={v}" in routing_string for k, v in expected_headers.items()]) def test_mutate_row_routing_parameters_request_1_rest(): @@ -10508,11 +10636,13 @@ def test_mutate_row_routing_parameters_request_1_rest(): expected_headers = { "table_name": "projects/sample1/instances/sample2/tables/sample3", - "app_profile_id": "", } - assert ( - gapic_v1.routing_header.to_grpc_metadata(expected_headers) in kw["metadata"] + + # assert the expected headers are present, in any order + routing_string = next( + iter([m[1] for m in kw["metadata"] if m[0] == "x-goog-request-params"]) ) + assert all([f"{k}={v}" in routing_string for k, v in expected_headers.items()]) def test_mutate_row_routing_parameters_request_2_rest(): @@ -10533,9 +10663,12 @@ def test_mutate_row_routing_parameters_request_2_rest(): assert args[0] == request_msg expected_headers = {"app_profile_id": "sample1"} - assert ( - gapic_v1.routing_header.to_grpc_metadata(expected_headers) in kw["metadata"] + + # assert the expected headers are present, in any order + routing_string = next( + iter([m[1] for m in kw["metadata"] if m[0] == "x-goog-request-params"]) ) + assert all([f"{k}={v}" in routing_string for k, v in expected_headers.items()]) def test_mutate_row_routing_parameters_request_3_rest(): @@ -10548,7 +10681,7 @@ def test_mutate_row_routing_parameters_request_3_rest(): with mock.patch.object(type(client.transport.mutate_row), "__call__") as call: client.mutate_row( request={ - "authorized_view_name": "projects/sample1/instances/sample2/tables/sample3/authorizedViews/sample4" + "authorized_view_name": "projects/sample1/instances/sample2/tables/sample3/sample4" } ) @@ -10557,19 +10690,21 @@ def test_mutate_row_routing_parameters_request_3_rest(): _, args, kw = call.mock_calls[0] request_msg = bigtable.MutateRowRequest( **{ - "authorized_view_name": "projects/sample1/instances/sample2/tables/sample3/authorizedViews/sample4" + "authorized_view_name": "projects/sample1/instances/sample2/tables/sample3/sample4" } ) assert args[0] == request_msg expected_headers = { - "app_profile_id": "", - "authorized_view_name": "projects/sample1/instances/sample2/tables/sample3/authorizedViews/sample4", + "table_name": "projects/sample1/instances/sample2/tables/sample3", } - assert ( - gapic_v1.routing_header.to_grpc_metadata(expected_headers) in kw["metadata"] + + # assert the expected headers are present, in any order + routing_string = next( + iter([m[1] for m in kw["metadata"] if m[0] == "x-goog-request-params"]) ) + assert all([f"{k}={v}" in routing_string for k, v in expected_headers.items()]) def test_mutate_rows_routing_parameters_request_1_rest(): @@ -10595,11 +10730,13 @@ def test_mutate_rows_routing_parameters_request_1_rest(): expected_headers = { "table_name": "projects/sample1/instances/sample2/tables/sample3", - "app_profile_id": "", } - assert ( - gapic_v1.routing_header.to_grpc_metadata(expected_headers) in kw["metadata"] + + # assert the expected headers are present, in any order + routing_string = next( + iter([m[1] for m in kw["metadata"] if m[0] == "x-goog-request-params"]) ) + assert all([f"{k}={v}" in routing_string for k, v in expected_headers.items()]) def test_mutate_rows_routing_parameters_request_2_rest(): @@ -10620,9 +10757,12 @@ def test_mutate_rows_routing_parameters_request_2_rest(): assert args[0] == request_msg expected_headers = {"app_profile_id": "sample1"} - assert ( - gapic_v1.routing_header.to_grpc_metadata(expected_headers) in kw["metadata"] + + # assert the expected headers are present, in any order + routing_string = next( + iter([m[1] for m in kw["metadata"] if m[0] == "x-goog-request-params"]) ) + assert all([f"{k}={v}" in routing_string for k, v in expected_headers.items()]) def test_mutate_rows_routing_parameters_request_3_rest(): @@ -10635,7 +10775,7 @@ def test_mutate_rows_routing_parameters_request_3_rest(): with mock.patch.object(type(client.transport.mutate_rows), "__call__") as call: client.mutate_rows( request={ - "authorized_view_name": "projects/sample1/instances/sample2/tables/sample3/authorizedViews/sample4" + "authorized_view_name": "projects/sample1/instances/sample2/tables/sample3/sample4" } ) @@ -10644,19 +10784,21 @@ def test_mutate_rows_routing_parameters_request_3_rest(): _, args, kw = call.mock_calls[0] request_msg = bigtable.MutateRowsRequest( **{ - "authorized_view_name": "projects/sample1/instances/sample2/tables/sample3/authorizedViews/sample4" + "authorized_view_name": "projects/sample1/instances/sample2/tables/sample3/sample4" } ) assert args[0] == request_msg expected_headers = { - "app_profile_id": "", - "authorized_view_name": "projects/sample1/instances/sample2/tables/sample3/authorizedViews/sample4", + "table_name": "projects/sample1/instances/sample2/tables/sample3", } - assert ( - gapic_v1.routing_header.to_grpc_metadata(expected_headers) in kw["metadata"] + + # assert the expected headers are present, in any order + routing_string = next( + iter([m[1] for m in kw["metadata"] if m[0] == "x-goog-request-params"]) ) + assert all([f"{k}={v}" in routing_string for k, v in expected_headers.items()]) def test_check_and_mutate_row_routing_parameters_request_1_rest(): @@ -10684,11 +10826,13 @@ def test_check_and_mutate_row_routing_parameters_request_1_rest(): expected_headers = { "table_name": "projects/sample1/instances/sample2/tables/sample3", - "app_profile_id": "", } - assert ( - gapic_v1.routing_header.to_grpc_metadata(expected_headers) in kw["metadata"] + + # assert the expected headers are present, in any order + routing_string = next( + iter([m[1] for m in kw["metadata"] if m[0] == "x-goog-request-params"]) ) + assert all([f"{k}={v}" in routing_string for k, v in expected_headers.items()]) def test_check_and_mutate_row_routing_parameters_request_2_rest(): @@ -10711,9 +10855,12 @@ def test_check_and_mutate_row_routing_parameters_request_2_rest(): assert args[0] == request_msg expected_headers = {"app_profile_id": "sample1"} - assert ( - gapic_v1.routing_header.to_grpc_metadata(expected_headers) in kw["metadata"] + + # assert the expected headers are present, in any order + routing_string = next( + iter([m[1] for m in kw["metadata"] if m[0] == "x-goog-request-params"]) ) + assert all([f"{k}={v}" in routing_string for k, v in expected_headers.items()]) def test_check_and_mutate_row_routing_parameters_request_3_rest(): @@ -10728,7 +10875,7 @@ def test_check_and_mutate_row_routing_parameters_request_3_rest(): ) as call: client.check_and_mutate_row( request={ - "authorized_view_name": "projects/sample1/instances/sample2/tables/sample3/authorizedViews/sample4" + "authorized_view_name": "projects/sample1/instances/sample2/tables/sample3/sample4" } ) @@ -10737,19 +10884,21 @@ def test_check_and_mutate_row_routing_parameters_request_3_rest(): _, args, kw = call.mock_calls[0] request_msg = bigtable.CheckAndMutateRowRequest( **{ - "authorized_view_name": "projects/sample1/instances/sample2/tables/sample3/authorizedViews/sample4" + "authorized_view_name": "projects/sample1/instances/sample2/tables/sample3/sample4" } ) assert args[0] == request_msg expected_headers = { - "app_profile_id": "", - "authorized_view_name": "projects/sample1/instances/sample2/tables/sample3/authorizedViews/sample4", + "table_name": "projects/sample1/instances/sample2/tables/sample3", } - assert ( - gapic_v1.routing_header.to_grpc_metadata(expected_headers) in kw["metadata"] + + # assert the expected headers are present, in any order + routing_string = next( + iter([m[1] for m in kw["metadata"] if m[0] == "x-goog-request-params"]) ) + assert all([f"{k}={v}" in routing_string for k, v in expected_headers.items()]) def test_ping_and_warm_routing_parameters_request_1_rest(): @@ -10773,11 +10922,13 @@ def test_ping_and_warm_routing_parameters_request_1_rest(): expected_headers = { "name": "projects/sample1/instances/sample2", - "app_profile_id": "", } - assert ( - gapic_v1.routing_header.to_grpc_metadata(expected_headers) in kw["metadata"] + + # assert the expected headers are present, in any order + routing_string = next( + iter([m[1] for m in kw["metadata"] if m[0] == "x-goog-request-params"]) ) + assert all([f"{k}={v}" in routing_string for k, v in expected_headers.items()]) def test_ping_and_warm_routing_parameters_request_2_rest(): @@ -10798,9 +10949,12 @@ def test_ping_and_warm_routing_parameters_request_2_rest(): assert args[0] == request_msg expected_headers = {"app_profile_id": "sample1"} - assert ( - gapic_v1.routing_header.to_grpc_metadata(expected_headers) in kw["metadata"] + + # assert the expected headers are present, in any order + routing_string = next( + iter([m[1] for m in kw["metadata"] if m[0] == "x-goog-request-params"]) ) + assert all([f"{k}={v}" in routing_string for k, v in expected_headers.items()]) def test_read_modify_write_row_routing_parameters_request_1_rest(): @@ -10828,11 +10982,13 @@ def test_read_modify_write_row_routing_parameters_request_1_rest(): expected_headers = { "table_name": "projects/sample1/instances/sample2/tables/sample3", - "app_profile_id": "", } - assert ( - gapic_v1.routing_header.to_grpc_metadata(expected_headers) in kw["metadata"] + + # assert the expected headers are present, in any order + routing_string = next( + iter([m[1] for m in kw["metadata"] if m[0] == "x-goog-request-params"]) ) + assert all([f"{k}={v}" in routing_string for k, v in expected_headers.items()]) def test_read_modify_write_row_routing_parameters_request_2_rest(): @@ -10857,9 +11013,12 @@ def test_read_modify_write_row_routing_parameters_request_2_rest(): assert args[0] == request_msg expected_headers = {"app_profile_id": "sample1"} - assert ( - gapic_v1.routing_header.to_grpc_metadata(expected_headers) in kw["metadata"] + + # assert the expected headers are present, in any order + routing_string = next( + iter([m[1] for m in kw["metadata"] if m[0] == "x-goog-request-params"]) ) + assert all([f"{k}={v}" in routing_string for k, v in expected_headers.items()]) def test_read_modify_write_row_routing_parameters_request_3_rest(): @@ -10874,7 +11033,7 @@ def test_read_modify_write_row_routing_parameters_request_3_rest(): ) as call: client.read_modify_write_row( request={ - "authorized_view_name": "projects/sample1/instances/sample2/tables/sample3/authorizedViews/sample4" + "authorized_view_name": "projects/sample1/instances/sample2/tables/sample3/sample4" } ) @@ -10883,19 +11042,21 @@ def test_read_modify_write_row_routing_parameters_request_3_rest(): _, args, kw = call.mock_calls[0] request_msg = bigtable.ReadModifyWriteRowRequest( **{ - "authorized_view_name": "projects/sample1/instances/sample2/tables/sample3/authorizedViews/sample4" + "authorized_view_name": "projects/sample1/instances/sample2/tables/sample3/sample4" } ) assert args[0] == request_msg expected_headers = { - "app_profile_id": "", - "authorized_view_name": "projects/sample1/instances/sample2/tables/sample3/authorizedViews/sample4", + "table_name": "projects/sample1/instances/sample2/tables/sample3", } - assert ( - gapic_v1.routing_header.to_grpc_metadata(expected_headers) in kw["metadata"] + + # assert the expected headers are present, in any order + routing_string = next( + iter([m[1] for m in kw["metadata"] if m[0] == "x-goog-request-params"]) ) + assert all([f"{k}={v}" in routing_string for k, v in expected_headers.items()]) def test_prepare_query_routing_parameters_request_1_rest(): @@ -10921,11 +11082,13 @@ def test_prepare_query_routing_parameters_request_1_rest(): expected_headers = { "name": "projects/sample1/instances/sample2", - "app_profile_id": "", } - assert ( - gapic_v1.routing_header.to_grpc_metadata(expected_headers) in kw["metadata"] + + # assert the expected headers are present, in any order + routing_string = next( + iter([m[1] for m in kw["metadata"] if m[0] == "x-goog-request-params"]) ) + assert all([f"{k}={v}" in routing_string for k, v in expected_headers.items()]) def test_prepare_query_routing_parameters_request_2_rest(): @@ -10946,9 +11109,12 @@ def test_prepare_query_routing_parameters_request_2_rest(): assert args[0] == request_msg expected_headers = {"app_profile_id": "sample1"} - assert ( - gapic_v1.routing_header.to_grpc_metadata(expected_headers) in kw["metadata"] + + # assert the expected headers are present, in any order + routing_string = next( + iter([m[1] for m in kw["metadata"] if m[0] == "x-goog-request-params"]) ) + assert all([f"{k}={v}" in routing_string for k, v in expected_headers.items()]) def test_execute_query_routing_parameters_request_1_rest(): @@ -10974,11 +11140,13 @@ def test_execute_query_routing_parameters_request_1_rest(): expected_headers = { "name": "projects/sample1/instances/sample2", - "app_profile_id": "", } - assert ( - gapic_v1.routing_header.to_grpc_metadata(expected_headers) in kw["metadata"] + + # assert the expected headers are present, in any order + routing_string = next( + iter([m[1] for m in kw["metadata"] if m[0] == "x-goog-request-params"]) ) + assert all([f"{k}={v}" in routing_string for k, v in expected_headers.items()]) def test_execute_query_routing_parameters_request_2_rest(): @@ -10999,9 +11167,12 @@ def test_execute_query_routing_parameters_request_2_rest(): assert args[0] == request_msg expected_headers = {"app_profile_id": "sample1"} - assert ( - gapic_v1.routing_header.to_grpc_metadata(expected_headers) in kw["metadata"] + + # assert the expected headers are present, in any order + routing_string = next( + iter([m[1] for m in kw["metadata"] if m[0] == "x-goog-request-params"]) ) + assert all([f"{k}={v}" in routing_string for k, v in expected_headers.items()]) def test_transport_grpc_default(): From 451fd97e435218ffed47d39423680ffc4feccac4 Mon Sep 17 00:00:00 2001 From: Daniel Sanche Date: Thu, 7 Aug 2025 14:47:28 -0700 Subject: [PATCH 2/8] feat: expose universe_domain for tpc (#1150) --- google/cloud/bigtable/data/_async/client.py | 32 +++++++ .../bigtable/data/_sync_autogen/client.py | 24 +++++ setup.py | 2 +- testing/constraints-3.7.txt | 2 +- testing/constraints-3.8.txt | 2 +- tests/unit/data/_async/test_client.py | 92 +++++++++++++++++++ tests/unit/data/_sync_autogen/test_client.py | 75 +++++++++++++++ 7 files changed, 226 insertions(+), 3 deletions(-) diff --git a/google/cloud/bigtable/data/_async/client.py b/google/cloud/bigtable/data/_async/client.py index 6ee21b554..d7eac2a4d 100644 --- a/google/cloud/bigtable/data/_async/client.py +++ b/google/cloud/bigtable/data/_async/client.py @@ -211,6 +211,20 @@ def __init__( *args, **kwargs, channel=custom_channel ), ) + if ( + credentials + and credentials.universe_domain != self.universe_domain + and self._emulator_host is None + ): + # validate that the universe domain of the credentials matches the + # universe domain configured in client_options + raise ValueError( + f"The configured universe domain ({self.universe_domain}) does " + "not match the universe domain found in the credentials " + f"({self._credentials.universe_domain}). If you haven't " + "configured the universe domain explicitly, `googleapis.com` " + "is the default." + ) self._is_closed = CrossSync.Event() self.transport = cast(TransportType, self._gapic_client.transport) # keep track of active instances to for warmup on channel refresh @@ -235,6 +249,24 @@ def __init__( stacklevel=2, ) + @property + def universe_domain(self) -> str: + """Return the universe domain used by the client instance. + + Returns: + str: The universe domain used by the client instance. + """ + return self._gapic_client.universe_domain + + @property + def api_endpoint(self) -> str: + """Return the API endpoint used by the client instance. + + Returns: + str: The API endpoint used by the client instance. + """ + return self._gapic_client.api_endpoint + @staticmethod def _client_version() -> str: """ diff --git a/google/cloud/bigtable/data/_sync_autogen/client.py b/google/cloud/bigtable/data/_sync_autogen/client.py index b36bf359a..a7e07e20d 100644 --- a/google/cloud/bigtable/data/_sync_autogen/client.py +++ b/google/cloud/bigtable/data/_sync_autogen/client.py @@ -158,6 +158,14 @@ def __init__( *args, **kwargs, channel=custom_channel ), ) + if ( + credentials + and credentials.universe_domain != self.universe_domain + and (self._emulator_host is None) + ): + raise ValueError( + f"The configured universe domain ({self.universe_domain}) does not match the universe domain found in the credentials ({self._credentials.universe_domain}). If you haven't configured the universe domain explicitly, `googleapis.com` is the default." + ) self._is_closed = CrossSync._Sync_Impl.Event() self.transport = cast(TransportType, self._gapic_client.transport) self._active_instances: Set[_WarmedInstanceKey] = set() @@ -179,6 +187,22 @@ def __init__( stacklevel=2, ) + @property + def universe_domain(self) -> str: + """Return the universe domain used by the client instance. + + Returns: + str: The universe domain used by the client instance.""" + return self._gapic_client.universe_domain + + @property + def api_endpoint(self) -> str: + """Return the API endpoint used by the client instance. + + Returns: + str: The API endpoint used by the client instance.""" + return self._gapic_client.api_endpoint + @staticmethod def _client_version() -> str: """Helper function to return the client version string for this client""" diff --git a/setup.py b/setup.py index e7113a611..3cb9d465d 100644 --- a/setup.py +++ b/setup.py @@ -39,7 +39,7 @@ dependencies = [ "google-api-core[grpc] >= 2.17.0, <3.0.0", "google-cloud-core >= 1.4.4, <3.0.0", - "google-auth >= 2.14.1, <3.0.0,!=2.24.0,!=2.25.0", + "google-auth >= 2.23.0, <3.0.0,!=2.24.0,!=2.25.0", "grpc-google-iam-v1 >= 0.12.4, <1.0.0", "proto-plus >= 1.22.3, <2.0.0", "proto-plus >= 1.25.0, <2.0.0; python_version>='3.13'", diff --git a/testing/constraints-3.7.txt b/testing/constraints-3.7.txt index ec7a8c807..023133380 100644 --- a/testing/constraints-3.7.txt +++ b/testing/constraints-3.7.txt @@ -6,7 +6,7 @@ # e.g., if setup.py has "foo >= 1.14.0, < 2.0.0dev", # Then this file should have foo==1.14.0 google-api-core==2.17.0 -google-auth==2.14.1 +google-auth==2.23.0 google-cloud-core==2.0.0 grpc-google-iam-v1==0.12.4 proto-plus==1.22.3 diff --git a/testing/constraints-3.8.txt b/testing/constraints-3.8.txt index 1c867060d..a7e4616c9 100644 --- a/testing/constraints-3.8.txt +++ b/testing/constraints-3.8.txt @@ -6,7 +6,7 @@ # e.g., if setup.py has "foo >= 1.14.0, < 2.0.0dev", # Then this file should have foo==1.14.0 google-api-core==2.17.0 -google-auth==2.14.1 +google-auth==2.23.0 google-cloud-core==2.0.0 grpc-google-iam-v1==0.12.4 proto-plus==1.22.3 diff --git a/tests/unit/data/_async/test_client.py b/tests/unit/data/_async/test_client.py index d47f6b8ed..97179a3b1 100644 --- a/tests/unit/data/_async/test_client.py +++ b/tests/unit/data/_async/test_client.py @@ -26,6 +26,7 @@ from google.cloud.bigtable_v2.types import ReadRowsResponse from google.cloud.bigtable.data.read_rows_query import ReadRowsQuery from google.api_core import exceptions as core_exceptions +from google.api_core import client_options from google.cloud.bigtable.data.exceptions import InvalidChunk from google.cloud.bigtable.data.exceptions import _MutateRowsIncomplete from google.cloud.bigtable.data.mutations import DeleteAllFromRow @@ -1038,6 +1039,97 @@ def test_client_ctor_sync(self): assert client.project == "project-id" assert client._channel_refresh_task is None + @CrossSync.pytest + async def test_default_universe_domain(self): + """ + When not passed, universe_domain should default to googleapis.com + """ + async with self._make_client(project="project-id", credentials=None) as client: + assert client.universe_domain == "googleapis.com" + assert client.api_endpoint == "bigtable.googleapis.com" + + @CrossSync.pytest + async def test_custom_universe_domain(self): + """test with a customized universe domain value and emulator enabled""" + universe_domain = "test-universe.test" + options = client_options.ClientOptions(universe_domain=universe_domain) + async with self._make_client( + project="project_id", + client_options=options, + use_emulator=True, + credentials=None, + ) as client: + assert client.universe_domain == universe_domain + assert client.api_endpoint == f"bigtable.{universe_domain}" + + @CrossSync.pytest + async def test_configured_universe_domain_matches_GDU(self): + """that configured universe domain succeeds with matched GDU credentials.""" + universe_domain = "googleapis.com" + options = client_options.ClientOptions(universe_domain=universe_domain) + async with self._make_client( + project="project_id", client_options=options, credentials=None + ) as client: + assert client.universe_domain == "googleapis.com" + assert client.api_endpoint == "bigtable.googleapis.com" + + @CrossSync.pytest + async def test_credential_universe_domain_matches_GDU(self): + """Test with credentials""" + creds = AnonymousCredentials() + creds._universe_domain = "googleapis.com" + async with self._make_client(project="project_id", credentials=creds) as client: + assert client.universe_domain == "googleapis.com" + assert client.api_endpoint == "bigtable.googleapis.com" + + @CrossSync.pytest + async def test_anomynous_credential_universe_domain(self): + """Anomynopus credentials should use default universe domain""" + creds = AnonymousCredentials() + async with self._make_client(project="project_id", credentials=creds) as client: + assert client.universe_domain == "googleapis.com" + assert client.api_endpoint == "bigtable.googleapis.com" + + @CrossSync.pytest + async def test_configured_universe_domain_mismatched_credentials(self): + """Test that configured universe domain errors with mismatched universe + domain credentials. + """ + universe_domain = "test-universe.test" + options = client_options.ClientOptions(universe_domain=universe_domain) + creds = AnonymousCredentials() + creds._universe_domain = "different-universe" + with pytest.raises(ValueError) as exc: + self._make_client( + project="project_id", + client_options=options, + use_emulator=False, + credentials=creds, + ) + err_msg = ( + f"The configured universe domain ({universe_domain}) does " + "not match the universe domain found in the credentials " + f"({creds.universe_domain}). If you haven't " + "configured the universe domain explicitly, `googleapis.com` " + "is the default." + ) + assert exc.value.args[0] == err_msg + + @CrossSync.pytest + async def test_configured_universe_domain_matches_credentials(self): + """Test that configured universe domain succeeds with matching universe + domain credentials. + """ + universe_domain = "test-universe.test" + options = client_options.ClientOptions(universe_domain=universe_domain) + creds = AnonymousCredentials() + creds._universe_domain = universe_domain + async with self._make_client( + project="project_id", credentials=creds, client_options=options + ) as client: + assert client.universe_domain == universe_domain + assert client.api_endpoint == f"bigtable.{universe_domain}" + @CrossSync.convert_class("TestTable", add_mapping_for_name="TestTable") class TestTableAsync: diff --git a/tests/unit/data/_sync_autogen/test_client.py b/tests/unit/data/_sync_autogen/test_client.py index 22ca8ee26..6012a10d3 100644 --- a/tests/unit/data/_sync_autogen/test_client.py +++ b/tests/unit/data/_sync_autogen/test_client.py @@ -25,6 +25,7 @@ from google.cloud.bigtable_v2.types import ReadRowsResponse from google.cloud.bigtable.data.read_rows_query import ReadRowsQuery from google.api_core import exceptions as core_exceptions +from google.api_core import client_options from google.cloud.bigtable.data.exceptions import InvalidChunk from google.cloud.bigtable.data.exceptions import _MutateRowsIncomplete from google.cloud.bigtable.data.mutations import DeleteAllFromRow @@ -836,6 +837,80 @@ def test_context_manager(self): close_mock.assert_called_once() true_close() + def test_default_universe_domain(self): + """When not passed, universe_domain should default to googleapis.com""" + with self._make_client(project="project-id", credentials=None) as client: + assert client.universe_domain == "googleapis.com" + assert client.api_endpoint == "bigtable.googleapis.com" + + def test_custom_universe_domain(self): + """test with a customized universe domain value and emulator enabled""" + universe_domain = "test-universe.test" + options = client_options.ClientOptions(universe_domain=universe_domain) + with self._make_client( + project="project_id", + client_options=options, + use_emulator=True, + credentials=None, + ) as client: + assert client.universe_domain == universe_domain + assert client.api_endpoint == f"bigtable.{universe_domain}" + + def test_configured_universe_domain_matches_GDU(self): + """that configured universe domain succeeds with matched GDU credentials.""" + universe_domain = "googleapis.com" + options = client_options.ClientOptions(universe_domain=universe_domain) + with self._make_client( + project="project_id", client_options=options, credentials=None + ) as client: + assert client.universe_domain == "googleapis.com" + assert client.api_endpoint == "bigtable.googleapis.com" + + def test_credential_universe_domain_matches_GDU(self): + """Test with credentials""" + creds = AnonymousCredentials() + creds._universe_domain = "googleapis.com" + with self._make_client(project="project_id", credentials=creds) as client: + assert client.universe_domain == "googleapis.com" + assert client.api_endpoint == "bigtable.googleapis.com" + + def test_anomynous_credential_universe_domain(self): + """Anomynopus credentials should use default universe domain""" + creds = AnonymousCredentials() + with self._make_client(project="project_id", credentials=creds) as client: + assert client.universe_domain == "googleapis.com" + assert client.api_endpoint == "bigtable.googleapis.com" + + def test_configured_universe_domain_mismatched_credentials(self): + """Test that configured universe domain errors with mismatched universe + domain credentials.""" + universe_domain = "test-universe.test" + options = client_options.ClientOptions(universe_domain=universe_domain) + creds = AnonymousCredentials() + creds._universe_domain = "different-universe" + with pytest.raises(ValueError) as exc: + self._make_client( + project="project_id", + client_options=options, + use_emulator=False, + credentials=creds, + ) + err_msg = f"The configured universe domain ({universe_domain}) does not match the universe domain found in the credentials ({creds.universe_domain}). If you haven't configured the universe domain explicitly, `googleapis.com` is the default." + assert exc.value.args[0] == err_msg + + def test_configured_universe_domain_matches_credentials(self): + """Test that configured universe domain succeeds with matching universe + domain credentials.""" + universe_domain = "test-universe.test" + options = client_options.ClientOptions(universe_domain=universe_domain) + creds = AnonymousCredentials() + creds._universe_domain = universe_domain + with self._make_client( + project="project_id", credentials=creds, client_options=options + ) as client: + assert client.universe_domain == universe_domain + assert client.api_endpoint == f"bigtable.{universe_domain}" + @CrossSync._Sync_Impl.add_mapping_decorator("TestTable") class TestTable: From 71efcb62e76ad3ce042acc51e2ae756a3405d451 Mon Sep 17 00:00:00 2001 From: Kevin Zheng <147537668+gkevinzheng@users.noreply.github.com> Date: Mon, 11 Aug 2025 16:09:03 -0400 Subject: [PATCH 3/8] test: Unskipped wait_for_consistency system tests in emulator (#1186) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * test: Unskipped wait_for_consistency system tests in emulator * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * Added sync surface * Actual sync surface * Used pytest.mark.skipif --------- Co-authored-by: Owl Bot --- .../system/admin_overlay/test_system_async.py | 37 ++++++++++++------- .../admin_overlay/test_system_autogen.py | 33 +++++++++++------ 2 files changed, 45 insertions(+), 25 deletions(-) diff --git a/tests/system/admin_overlay/test_system_async.py b/tests/system/admin_overlay/test_system_async.py index 8dea4f5f1..aa412569e 100644 --- a/tests/system/admin_overlay/test_system_async.py +++ b/tests/system/admin_overlay/test_system_async.py @@ -143,20 +143,27 @@ async def create_instance( default_storage_type=storage_type, ) - create_instance_request = admin_v2.CreateInstanceRequest( - parent=instance_admin_client.common_project_path(project_id), - instance_id=instance_id, - instance=admin_v2.Instance( - display_name=instance_id[ - :30 - ], # truncate to 30 characters because of character limit - ), - clusters=clusters, - ) - operation = await instance_admin_client.create_instance(create_instance_request) - instance = await operation.result() + # Instance and cluster creation are currently unsupported in the Bigtable emulator + if os.getenv(BIGTABLE_EMULATOR): + # All we need for system tests so far is the instance name. + instance = admin_v2.Instance( + name=instance_admin_client.instance_path(project_id, instance_id), + ) + else: + create_instance_request = admin_v2.CreateInstanceRequest( + parent=instance_admin_client.common_project_path(project_id), + instance_id=instance_id, + instance=admin_v2.Instance( + display_name=instance_id[ + :30 + ], # truncate to 30 characters because of character limit + ), + clusters=clusters, + ) + operation = await instance_admin_client.create_instance(create_instance_request) + instance = await operation.result() - instances_to_delete.append(instance) + instances_to_delete.append(instance) # Create a table within the instance create_table_request = admin_v2.CreateTableRequest( @@ -272,6 +279,10 @@ async def assert_table_cell_value_equal_to( } ) @CrossSync.pytest +@pytest.mark.skipif( + os.getenv(BIGTABLE_EMULATOR), + reason="Backups are not supported in the Bigtable emulator", +) @pytest.mark.parametrize( "second_instance_storage_type,expect_optimize_operation", [ diff --git a/tests/system/admin_overlay/test_system_autogen.py b/tests/system/admin_overlay/test_system_autogen.py index 21e4aff3c..4fde3571f 100644 --- a/tests/system/admin_overlay/test_system_autogen.py +++ b/tests/system/admin_overlay/test_system_autogen.py @@ -113,15 +113,20 @@ def create_instance( location=instance_admin_client.common_location_path(project_id, location), default_storage_type=storage_type, ) - create_instance_request = admin_v2.CreateInstanceRequest( - parent=instance_admin_client.common_project_path(project_id), - instance_id=instance_id, - instance=admin_v2.Instance(display_name=instance_id[:30]), - clusters=clusters, - ) - operation = instance_admin_client.create_instance(create_instance_request) - instance = operation.result() - instances_to_delete.append(instance) + if os.getenv(BIGTABLE_EMULATOR): + instance = admin_v2.Instance( + name=instance_admin_client.instance_path(project_id, instance_id) + ) + else: + create_instance_request = admin_v2.CreateInstanceRequest( + parent=instance_admin_client.common_project_path(project_id), + instance_id=instance_id, + instance=admin_v2.Instance(display_name=instance_id[:30]), + clusters=clusters, + ) + operation = instance_admin_client.create_instance(create_instance_request) + instance = operation.result() + instances_to_delete.append(instance) create_table_request = admin_v2.CreateTableRequest( parent=instance_admin_client.instance_path(project_id, instance_id), table_id=TEST_TABLE_NAME, @@ -201,6 +206,10 @@ def assert_table_cell_value_equal_to( assert latest_cell.value.decode("utf-8") == value +@pytest.mark.skipif( + os.getenv(BIGTABLE_EMULATOR), + reason="Backups are not supported in the Bigtable emulator", +) @pytest.mark.parametrize( "second_instance_storage_type,expect_optimize_operation", [(admin_v2.StorageType.HDD, False), (admin_v2.StorageType.SSD, True)], @@ -215,7 +224,7 @@ def test_optimize_restored_table( second_instance_storage_type, expect_optimize_operation, ): - instance_with_backup, table_to_backup = create_instance( + (instance_with_backup, table_to_backup) = create_instance( instance_admin_client, table_admin_client, data_client, @@ -223,7 +232,7 @@ def test_optimize_restored_table( instances_to_delete, admin_v2.StorageType.HDD, ) - instance_to_restore, _ = create_instance( + (instance_to_restore, _) = create_instance( instance_admin_client, table_admin_client, data_client, @@ -273,7 +282,7 @@ def test_wait_for_consistency( instances_to_delete, admin_overlay_project_id, ): - instance, table = create_instance( + (instance, table) = create_instance( instance_admin_client, table_admin_client, data_client, From 6fa30084058bc34d4487d1fee5c87d7795ff167a Mon Sep 17 00:00:00 2001 From: Daniel Sanche Date: Mon, 25 Aug 2025 17:43:31 -0700 Subject: [PATCH 4/8] fix: refactor channel refresh (#1174) --- .../data/_async/_swappable_channel.py | 139 ++++++++++++++++++ google/cloud/bigtable/data/_async/client.py | 105 ++++++++----- .../data/_sync_autogen/_swappable_channel.py | 96 ++++++++++++ .../bigtable/data/_sync_autogen/client.py | 79 +++++++--- .../_async/execute_query_iterator.py | 4 +- .../_sync_autogen/execute_query_iterator.py | 4 +- .../bigtable/transports/grpc_asyncio.py | 1 - tests/system/data/test_system_async.py | 35 ++++- tests/system/data/test_system_autogen.py | 23 ++- .../data/_async/test__swappable_channel.py | 135 +++++++++++++++++ tests/unit/data/_async/test_client.py | 80 +++++----- .../_sync_autogen/test__swappable_channel.py | 100 +++++++++++++ tests/unit/data/_sync_autogen/test_client.py | 68 ++++----- 13 files changed, 712 insertions(+), 157 deletions(-) create mode 100644 google/cloud/bigtable/data/_async/_swappable_channel.py create mode 100644 google/cloud/bigtable/data/_sync_autogen/_swappable_channel.py create mode 100644 tests/unit/data/_async/test__swappable_channel.py create mode 100644 tests/unit/data/_sync_autogen/test__swappable_channel.py diff --git a/google/cloud/bigtable/data/_async/_swappable_channel.py b/google/cloud/bigtable/data/_async/_swappable_channel.py new file mode 100644 index 000000000..bbc9a0d47 --- /dev/null +++ b/google/cloud/bigtable/data/_async/_swappable_channel.py @@ -0,0 +1,139 @@ +# Copyright 2023 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +from __future__ import annotations + +from typing import Callable + +from google.cloud.bigtable.data._cross_sync import CrossSync + +from grpc import ChannelConnectivity + +if CrossSync.is_async: + from grpc.aio import Channel +else: + from grpc import Channel + +__CROSS_SYNC_OUTPUT__ = "google.cloud.bigtable.data._sync_autogen._swappable_channel" + + +@CrossSync.convert_class(sync_name="_WrappedChannel", rm_aio=True) +class _AsyncWrappedChannel(Channel): + """ + A wrapper around a gRPC channel. All methods are passed + through to the underlying channel. + """ + + def __init__(self, channel: Channel): + self._channel = channel + + def unary_unary(self, *args, **kwargs): + return self._channel.unary_unary(*args, **kwargs) + + def unary_stream(self, *args, **kwargs): + return self._channel.unary_stream(*args, **kwargs) + + def stream_unary(self, *args, **kwargs): + return self._channel.stream_unary(*args, **kwargs) + + def stream_stream(self, *args, **kwargs): + return self._channel.stream_stream(*args, **kwargs) + + async def channel_ready(self): + return await self._channel.channel_ready() + + @CrossSync.convert( + sync_name="__enter__", replace_symbols={"__aenter__": "__enter__"} + ) + async def __aenter__(self): + await self._channel.__aenter__() + return self + + @CrossSync.convert(sync_name="__exit__", replace_symbols={"__aexit__": "__exit__"}) + async def __aexit__(self, exc_type, exc_val, exc_tb): + return await self._channel.__aexit__(exc_type, exc_val, exc_tb) + + def get_state(self, try_to_connect: bool = False) -> ChannelConnectivity: + return self._channel.get_state(try_to_connect=try_to_connect) + + async def wait_for_state_change(self, last_observed_state): + return await self._channel.wait_for_state_change(last_observed_state) + + def __getattr__(self, name): + return getattr(self._channel, name) + + async def close(self, grace=None): + if CrossSync.is_async: + return await self._channel.close(grace=grace) + else: + # grace not supported by sync version + return self._channel.close() + + if not CrossSync.is_async: + # add required sync methods + + def subscribe(self, callback, try_to_connect=False): + return self._channel.subscribe(callback, try_to_connect) + + def unsubscribe(self, callback): + return self._channel.unsubscribe(callback) + + +@CrossSync.convert_class( + sync_name="SwappableChannel", + replace_symbols={"_AsyncWrappedChannel": "_WrappedChannel"}, +) +class AsyncSwappableChannel(_AsyncWrappedChannel): + """ + Provides a grpc channel wrapper, that allows the internal channel to be swapped out + + Args: + - channel_fn: a nullary function that returns a new channel instance. + It should be a partial with all channel configuration arguments built-in + """ + + def __init__(self, channel_fn: Callable[[], Channel]): + self._channel_fn = channel_fn + self._channel = channel_fn() + + def create_channel(self) -> Channel: + """ + Create a fresh channel using the stored `channel_fn` partial + """ + new_channel = self._channel_fn() + if CrossSync.is_async: + # copy over interceptors + # this is needed because of how gapic attaches the LoggingClientAIOInterceptor + # sync channels add interceptors by wrapping, so this step isn't needed + new_channel._unary_unary_interceptors = ( + self._channel._unary_unary_interceptors + ) + new_channel._unary_stream_interceptors = ( + self._channel._unary_stream_interceptors + ) + new_channel._stream_unary_interceptors = ( + self._channel._stream_unary_interceptors + ) + new_channel._stream_stream_interceptors = ( + self._channel._stream_stream_interceptors + ) + return new_channel + + def swap_channel(self, new_channel: Channel) -> Channel: + """ + Replace the wrapped channel with a new instance. Typically created using `create_channel` + """ + old_channel = self._channel + self._channel = new_channel + return old_channel diff --git a/google/cloud/bigtable/data/_async/client.py b/google/cloud/bigtable/data/_async/client.py index d7eac2a4d..40f30f1d8 100644 --- a/google/cloud/bigtable/data/_async/client.py +++ b/google/cloud/bigtable/data/_async/client.py @@ -92,13 +92,22 @@ from google.cloud.bigtable_v2.services.bigtable.transports import ( BigtableGrpcAsyncIOTransport as TransportType, ) + from google.cloud.bigtable_v2.services.bigtable import ( + BigtableAsyncClient as GapicClient, + ) from google.cloud.bigtable.data._async.mutations_batcher import _MB_SIZE + from google.cloud.bigtable.data._async._swappable_channel import ( + AsyncSwappableChannel, + ) else: from typing import Iterable # noqa: F401 from grpc import insecure_channel - from grpc import intercept_channel from google.cloud.bigtable_v2.services.bigtable.transports import BigtableGrpcTransport as TransportType # type: ignore + from google.cloud.bigtable_v2.services.bigtable import BigtableClient as GapicClient # type: ignore from google.cloud.bigtable.data._sync_autogen.mutations_batcher import _MB_SIZE + from google.cloud.bigtable.data._sync_autogen._swappable_channel import ( # noqa: F401 + SwappableChannel, + ) if TYPE_CHECKING: @@ -182,7 +191,6 @@ def __init__( client_options = cast( Optional[client_options_lib.ClientOptions], client_options ) - custom_channel = None self._emulator_host = os.getenv(BIGTABLE_EMULATOR) if self._emulator_host is not None: warnings.warn( @@ -191,11 +199,11 @@ def __init__( stacklevel=2, ) # use insecure channel if emulator is set - custom_channel = insecure_channel(self._emulator_host) if credentials is None: credentials = google.auth.credentials.AnonymousCredentials() if project is None: project = _DEFAULT_BIGTABLE_EMULATOR_CLIENT + # initialize client ClientWithProject.__init__( self, @@ -203,12 +211,12 @@ def __init__( project=project, client_options=client_options, ) - self._gapic_client = CrossSync.GapicClient( + self._gapic_client = GapicClient( credentials=credentials, client_options=client_options, client_info=self.client_info, transport=lambda *args, **kwargs: TransportType( - *args, **kwargs, channel=custom_channel + *args, **kwargs, channel=self._build_grpc_channel ), ) if ( @@ -234,7 +242,7 @@ def __init__( self._instance_owners: dict[_WarmedInstanceKey, Set[int]] = {} self._channel_init_time = time.monotonic() self._channel_refresh_task: CrossSync.Task[None] | None = None - self._executor = ( + self._executor: concurrent.futures.ThreadPoolExecutor | None = ( concurrent.futures.ThreadPoolExecutor() if not CrossSync.is_async else None ) if self._emulator_host is None: @@ -249,6 +257,29 @@ def __init__( stacklevel=2, ) + @CrossSync.convert(replace_symbols={"AsyncSwappableChannel": "SwappableChannel"}) + def _build_grpc_channel(self, *args, **kwargs) -> AsyncSwappableChannel: + """ + This method is called by the gapic transport to create a grpc channel. + + The init arguments passed down are captured in a partial used by AsyncSwappableChannel + to create new channel instances in the future, as part of the channel refresh logic + + Emulators always use an inseucre channel + + Args: + - *args: positional arguments passed by the gapic layer to create a new channel with + - **kwargs: keyword arguments passed by the gapic layer to create a new channel with + Returns: + a custom wrapped swappable channel + """ + if self._emulator_host is not None: + # emulators use insecure channel + create_channel_fn = partial(insecure_channel, self._emulator_host) + else: + create_channel_fn = partial(TransportType.create_channel, *args, **kwargs) + return AsyncSwappableChannel(create_channel_fn) + @property def universe_domain(self) -> str: """Return the universe domain used by the client instance. @@ -364,7 +395,12 @@ async def _ping_and_warm_instances( ) return [r or None for r in result_list] - @CrossSync.convert + def _invalidate_channel_stubs(self): + """Helper to reset the cached stubs. Needed when changing out the grpc channel""" + self.transport._stubs = {} + self.transport._prep_wrapped_messages(self.client_info) + + @CrossSync.convert(replace_symbols={"AsyncSwappableChannel": "SwappableChannel"}) async def _manage_channel( self, refresh_interval_min: float = 60 * 35, @@ -389,13 +425,17 @@ async def _manage_channel( grace_period: time to allow previous channel to serve existing requests before closing, in seconds """ + if not isinstance(self.transport.grpc_channel, AsyncSwappableChannel): + warnings.warn("Channel does not support auto-refresh.") + return + super_channel: AsyncSwappableChannel = self.transport.grpc_channel first_refresh = self._channel_init_time + random.uniform( refresh_interval_min, refresh_interval_max ) next_sleep = max(first_refresh - time.monotonic(), 0) if next_sleep > 0: # warm the current channel immediately - await self._ping_and_warm_instances(channel=self.transport.grpc_channel) + await self._ping_and_warm_instances(channel=super_channel) # continuously refresh the channel every `refresh_interval` seconds while not self._is_closed.is_set(): await CrossSync.event_wait( @@ -408,24 +448,11 @@ async def _manage_channel( break start_timestamp = time.monotonic() # prepare new channel for use - # TODO: refactor to avoid using internal references: https://github.com/googleapis/python-bigtable/issues/1094 - old_channel = self.transport.grpc_channel - new_channel = self.transport.create_channel() - if CrossSync.is_async: - new_channel._unary_unary_interceptors.append( - self.transport._interceptor - ) - else: - new_channel = intercept_channel( - new_channel, self.transport._interceptor - ) + new_channel = super_channel.create_channel() await self._ping_and_warm_instances(channel=new_channel) # cycle channel out of use, with long grace window before closure - self.transport._grpc_channel = new_channel - self.transport._logged_channel = new_channel - # invalidate caches - self.transport._stubs = {} - self.transport._prep_wrapped_messages(self.client_info) + old_channel = super_channel.swap_channel(new_channel) + self._invalidate_channel_stubs() # give old_channel a chance to complete existing rpcs if CrossSync.is_async: await old_channel.close(grace_period) @@ -433,7 +460,7 @@ async def _manage_channel( if grace_period: self._is_closed.wait(grace_period) # type: ignore old_channel.close() # type: ignore - # subtract thed time spent waiting for the channel to be replaced + # subtract the time spent waiting for the channel to be replaced next_refresh = random.uniform(refresh_interval_min, refresh_interval_max) next_sleep = max(next_refresh - (time.monotonic() - start_timestamp), 0) @@ -895,24 +922,32 @@ def __init__( self.table_name = self.client._gapic_client.table_path( self.client.project, instance_id, table_id ) - self.app_profile_id = app_profile_id + self.app_profile_id: str | None = app_profile_id - self.default_operation_timeout = default_operation_timeout - self.default_attempt_timeout = default_attempt_timeout - self.default_read_rows_operation_timeout = default_read_rows_operation_timeout - self.default_read_rows_attempt_timeout = default_read_rows_attempt_timeout - self.default_mutate_rows_operation_timeout = ( + self.default_operation_timeout: float = default_operation_timeout + self.default_attempt_timeout: float | None = default_attempt_timeout + self.default_read_rows_operation_timeout: float = ( + default_read_rows_operation_timeout + ) + self.default_read_rows_attempt_timeout: float | None = ( + default_read_rows_attempt_timeout + ) + self.default_mutate_rows_operation_timeout: float = ( default_mutate_rows_operation_timeout ) - self.default_mutate_rows_attempt_timeout = default_mutate_rows_attempt_timeout + self.default_mutate_rows_attempt_timeout: float | None = ( + default_mutate_rows_attempt_timeout + ) - self.default_read_rows_retryable_errors = ( + self.default_read_rows_retryable_errors: Sequence[type[Exception]] = ( default_read_rows_retryable_errors or () ) - self.default_mutate_rows_retryable_errors = ( + self.default_mutate_rows_retryable_errors: Sequence[type[Exception]] = ( default_mutate_rows_retryable_errors or () ) - self.default_retryable_errors = default_retryable_errors or () + self.default_retryable_errors: Sequence[type[Exception]] = ( + default_retryable_errors or () + ) try: self._register_instance_future = CrossSync.create_task( diff --git a/google/cloud/bigtable/data/_sync_autogen/_swappable_channel.py b/google/cloud/bigtable/data/_sync_autogen/_swappable_channel.py new file mode 100644 index 000000000..78ba129d9 --- /dev/null +++ b/google/cloud/bigtable/data/_sync_autogen/_swappable_channel.py @@ -0,0 +1,96 @@ +# Copyright 2023 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +# This file is automatically generated by CrossSync. Do not edit manually. + +from __future__ import annotations +from typing import Callable +from grpc import ChannelConnectivity +from grpc import Channel + + +class _WrappedChannel(Channel): + """ + A wrapper around a gRPC channel. All methods are passed + through to the underlying channel. + """ + + def __init__(self, channel: Channel): + self._channel = channel + + def unary_unary(self, *args, **kwargs): + return self._channel.unary_unary(*args, **kwargs) + + def unary_stream(self, *args, **kwargs): + return self._channel.unary_stream(*args, **kwargs) + + def stream_unary(self, *args, **kwargs): + return self._channel.stream_unary(*args, **kwargs) + + def stream_stream(self, *args, **kwargs): + return self._channel.stream_stream(*args, **kwargs) + + def channel_ready(self): + return self._channel.channel_ready() + + def __enter__(self): + self._channel.__enter__() + return self + + def __exit__(self, exc_type, exc_val, exc_tb): + return self._channel.__exit__(exc_type, exc_val, exc_tb) + + def get_state(self, try_to_connect: bool = False) -> ChannelConnectivity: + return self._channel.get_state(try_to_connect=try_to_connect) + + def wait_for_state_change(self, last_observed_state): + return self._channel.wait_for_state_change(last_observed_state) + + def __getattr__(self, name): + return getattr(self._channel, name) + + def close(self, grace=None): + return self._channel.close() + + def subscribe(self, callback, try_to_connect=False): + return self._channel.subscribe(callback, try_to_connect) + + def unsubscribe(self, callback): + return self._channel.unsubscribe(callback) + + +class SwappableChannel(_WrappedChannel): + """ + Provides a grpc channel wrapper, that allows the internal channel to be swapped out + + Args: + - channel_fn: a nullary function that returns a new channel instance. + It should be a partial with all channel configuration arguments built-in + """ + + def __init__(self, channel_fn: Callable[[], Channel]): + self._channel_fn = channel_fn + self._channel = channel_fn() + + def create_channel(self) -> Channel: + """Create a fresh channel using the stored `channel_fn` partial""" + new_channel = self._channel_fn() + return new_channel + + def swap_channel(self, new_channel: Channel) -> Channel: + """Replace the wrapped channel with a new instance. Typically created using `create_channel`""" + old_channel = self._channel + self._channel = new_channel + return old_channel diff --git a/google/cloud/bigtable/data/_sync_autogen/client.py b/google/cloud/bigtable/data/_sync_autogen/client.py index a7e07e20d..1c75823ae 100644 --- a/google/cloud/bigtable/data/_sync_autogen/client.py +++ b/google/cloud/bigtable/data/_sync_autogen/client.py @@ -75,11 +75,12 @@ from google.cloud.bigtable.data._cross_sync import CrossSync from typing import Iterable from grpc import insecure_channel -from grpc import intercept_channel from google.cloud.bigtable_v2.services.bigtable.transports import ( BigtableGrpcTransport as TransportType, ) +from google.cloud.bigtable_v2.services.bigtable import BigtableClient as GapicClient from google.cloud.bigtable.data._sync_autogen.mutations_batcher import _MB_SIZE +from google.cloud.bigtable.data._sync_autogen._swappable_channel import SwappableChannel if TYPE_CHECKING: from google.cloud.bigtable.data._helpers import RowKeySamples @@ -131,7 +132,6 @@ def __init__( client_options = cast( Optional[client_options_lib.ClientOptions], client_options ) - custom_channel = None self._emulator_host = os.getenv(BIGTABLE_EMULATOR) if self._emulator_host is not None: warnings.warn( @@ -139,7 +139,6 @@ def __init__( RuntimeWarning, stacklevel=2, ) - custom_channel = insecure_channel(self._emulator_host) if credentials is None: credentials = google.auth.credentials.AnonymousCredentials() if project is None: @@ -150,12 +149,12 @@ def __init__( project=project, client_options=client_options, ) - self._gapic_client = CrossSync._Sync_Impl.GapicClient( + self._gapic_client = GapicClient( credentials=credentials, client_options=client_options, client_info=self.client_info, transport=lambda *args, **kwargs: TransportType( - *args, **kwargs, channel=custom_channel + *args, **kwargs, channel=self._build_grpc_channel ), ) if ( @@ -172,7 +171,7 @@ def __init__( self._instance_owners: dict[_WarmedInstanceKey, Set[int]] = {} self._channel_init_time = time.monotonic() self._channel_refresh_task: CrossSync._Sync_Impl.Task[None] | None = None - self._executor = ( + self._executor: concurrent.futures.ThreadPoolExecutor | None = ( concurrent.futures.ThreadPoolExecutor() if not CrossSync._Sync_Impl.is_async else None @@ -187,6 +186,25 @@ def __init__( stacklevel=2, ) + def _build_grpc_channel(self, *args, **kwargs) -> SwappableChannel: + """This method is called by the gapic transport to create a grpc channel. + + The init arguments passed down are captured in a partial used by SwappableChannel + to create new channel instances in the future, as part of the channel refresh logic + + Emulators always use an inseucre channel + + Args: + - *args: positional arguments passed by the gapic layer to create a new channel with + - **kwargs: keyword arguments passed by the gapic layer to create a new channel with + Returns: + a custom wrapped swappable channel""" + if self._emulator_host is not None: + create_channel_fn = partial(insecure_channel, self._emulator_host) + else: + create_channel_fn = partial(TransportType.create_channel, *args, **kwargs) + return SwappableChannel(create_channel_fn) + @property def universe_domain(self) -> str: """Return the universe domain used by the client instance. @@ -279,6 +297,11 @@ def _ping_and_warm_instances( ) return [r or None for r in result_list] + def _invalidate_channel_stubs(self): + """Helper to reset the cached stubs. Needed when changing out the grpc channel""" + self.transport._stubs = {} + self.transport._prep_wrapped_messages(self.client_info) + def _manage_channel( self, refresh_interval_min: float = 60 * 35, @@ -301,12 +324,16 @@ def _manage_channel( between `refresh_interval_min` and `refresh_interval_max` grace_period: time to allow previous channel to serve existing requests before closing, in seconds""" + if not isinstance(self.transport.grpc_channel, SwappableChannel): + warnings.warn("Channel does not support auto-refresh.") + return + super_channel: SwappableChannel = self.transport.grpc_channel first_refresh = self._channel_init_time + random.uniform( refresh_interval_min, refresh_interval_max ) next_sleep = max(first_refresh - time.monotonic(), 0) if next_sleep > 0: - self._ping_and_warm_instances(channel=self.transport.grpc_channel) + self._ping_and_warm_instances(channel=super_channel) while not self._is_closed.is_set(): CrossSync._Sync_Impl.event_wait( self._is_closed, next_sleep, async_break_early=False @@ -314,14 +341,10 @@ def _manage_channel( if self._is_closed.is_set(): break start_timestamp = time.monotonic() - old_channel = self.transport.grpc_channel - new_channel = self.transport.create_channel() - new_channel = intercept_channel(new_channel, self.transport._interceptor) + new_channel = super_channel.create_channel() self._ping_and_warm_instances(channel=new_channel) - self.transport._grpc_channel = new_channel - self.transport._logged_channel = new_channel - self.transport._stubs = {} - self.transport._prep_wrapped_messages(self.client_info) + old_channel = super_channel.swap_channel(new_channel) + self._invalidate_channel_stubs() if grace_period: self._is_closed.wait(grace_period) old_channel.close() @@ -694,22 +717,30 @@ def __init__( self.table_name = self.client._gapic_client.table_path( self.client.project, instance_id, table_id ) - self.app_profile_id = app_profile_id - self.default_operation_timeout = default_operation_timeout - self.default_attempt_timeout = default_attempt_timeout - self.default_read_rows_operation_timeout = default_read_rows_operation_timeout - self.default_read_rows_attempt_timeout = default_read_rows_attempt_timeout - self.default_mutate_rows_operation_timeout = ( + self.app_profile_id: str | None = app_profile_id + self.default_operation_timeout: float = default_operation_timeout + self.default_attempt_timeout: float | None = default_attempt_timeout + self.default_read_rows_operation_timeout: float = ( + default_read_rows_operation_timeout + ) + self.default_read_rows_attempt_timeout: float | None = ( + default_read_rows_attempt_timeout + ) + self.default_mutate_rows_operation_timeout: float = ( default_mutate_rows_operation_timeout ) - self.default_mutate_rows_attempt_timeout = default_mutate_rows_attempt_timeout - self.default_read_rows_retryable_errors = ( + self.default_mutate_rows_attempt_timeout: float | None = ( + default_mutate_rows_attempt_timeout + ) + self.default_read_rows_retryable_errors: Sequence[type[Exception]] = ( default_read_rows_retryable_errors or () ) - self.default_mutate_rows_retryable_errors = ( + self.default_mutate_rows_retryable_errors: Sequence[type[Exception]] = ( default_mutate_rows_retryable_errors or () ) - self.default_retryable_errors = default_retryable_errors or () + self.default_retryable_errors: Sequence[type[Exception]] = ( + default_retryable_errors or () + ) try: self._register_instance_future = CrossSync._Sync_Impl.create_task( self.client._register_instance, diff --git a/google/cloud/bigtable/data/execute_query/_async/execute_query_iterator.py b/google/cloud/bigtable/data/execute_query/_async/execute_query_iterator.py index d3ca890b4..74f01c60c 100644 --- a/google/cloud/bigtable/data/execute_query/_async/execute_query_iterator.py +++ b/google/cloud/bigtable/data/execute_query/_async/execute_query_iterator.py @@ -115,8 +115,8 @@ def __init__( self._app_profile_id = app_profile_id self._client = client self._instance_id = instance_id - self._prepare_metadata = prepare_metadata - self._final_metadata = None + self._prepare_metadata: Metadata = prepare_metadata + self._final_metadata: Metadata | None = None self._byte_cursor = _ByteCursor() self._reader: _Reader[QueryResultRow] = _QueryResultRowReader() self.has_received_token = False diff --git a/google/cloud/bigtable/data/execute_query/_sync_autogen/execute_query_iterator.py b/google/cloud/bigtable/data/execute_query/_sync_autogen/execute_query_iterator.py index 9c2d1c6d8..e819acda7 100644 --- a/google/cloud/bigtable/data/execute_query/_sync_autogen/execute_query_iterator.py +++ b/google/cloud/bigtable/data/execute_query/_sync_autogen/execute_query_iterator.py @@ -90,8 +90,8 @@ def __init__( self._app_profile_id = app_profile_id self._client = client self._instance_id = instance_id - self._prepare_metadata = prepare_metadata - self._final_metadata = None + self._prepare_metadata: Metadata = prepare_metadata + self._final_metadata: Metadata | None = None self._byte_cursor = _ByteCursor() self._reader: _Reader[QueryResultRow] = _QueryResultRowReader() self.has_received_token = False diff --git a/google/cloud/bigtable_v2/services/bigtable/transports/grpc_asyncio.py b/google/cloud/bigtable_v2/services/bigtable/transports/grpc_asyncio.py index 3f7df3c4e..49f981d9a 100644 --- a/google/cloud/bigtable_v2/services/bigtable/transports/grpc_asyncio.py +++ b/google/cloud/bigtable_v2/services/bigtable/transports/grpc_asyncio.py @@ -290,7 +290,6 @@ def __init__( always_use_jwt_access=always_use_jwt_access, api_audience=api_audience, ) - if not self._grpc_channel: # initialize with the provided callable or the default channel channel_init = channel or type(self).create_channel diff --git a/tests/system/data/test_system_async.py b/tests/system/data/test_system_async.py index ed9fbd8b8..c96570b76 100644 --- a/tests/system/data/test_system_async.py +++ b/tests/system/data/test_system_async.py @@ -28,6 +28,14 @@ from . import TEST_FAMILY, TEST_FAMILY_2, TEST_AGGREGATE_FAMILY +if CrossSync.is_async: + from google.cloud.bigtable_v2.services.bigtable.transports.grpc_asyncio import ( + _LoggingClientAIOInterceptor as GapicInterceptor, + ) +else: + from google.cloud.bigtable_v2.services.bigtable.transports.grpc import ( + _LoggingClientInterceptor as GapicInterceptor, + ) __CROSS_SYNC_OUTPUT__ = "tests.system.data.test_system_autogen" @@ -111,11 +119,14 @@ async def delete_rows(self): @CrossSync.convert_class(sync_name="TestSystem") class TestSystemAsync: + def _make_client(self): + project = os.getenv("GOOGLE_CLOUD_PROJECT") or None + return CrossSync.DataClient(project=project) + @CrossSync.convert @CrossSync.pytest_fixture(scope="session") async def client(self): - project = os.getenv("GOOGLE_CLOUD_PROJECT") or None - async with CrossSync.DataClient(project=project) as client: + async with self._make_client() as client: yield client @CrossSync.convert @@ -260,8 +271,7 @@ async def test_channel_refresh(self, table_id, instance_id, temp_rows): """ await temp_rows.add_row(b"row_key_1") await temp_rows.add_row(b"row_key_2") - project = os.getenv("GOOGLE_CLOUD_PROJECT") or None - client = CrossSync.DataClient(project=project) + client = self._make_client() # start custom refresh task try: client._channel_refresh_task = CrossSync.create_task( @@ -274,13 +284,24 @@ async def test_channel_refresh(self, table_id, instance_id, temp_rows): await CrossSync.yield_to_event_loop() async with client.get_table(instance_id, table_id) as table: rows = await table.read_rows({}) - first_channel = client.transport.grpc_channel + channel_wrapper = client.transport.grpc_channel + first_channel = client.transport.grpc_channel._channel assert len(rows) == 2 await CrossSync.sleep(2) rows_after_refresh = await table.read_rows({}) assert len(rows_after_refresh) == 2 - assert client.transport.grpc_channel is not first_channel - print(table) + assert client.transport.grpc_channel is channel_wrapper + assert client.transport.grpc_channel._channel is not first_channel + # ensure gapic's logging interceptor is still active + if CrossSync.is_async: + interceptors = ( + client.transport.grpc_channel._channel._unary_unary_interceptors + ) + assert GapicInterceptor in [type(i) for i in interceptors] + else: + assert isinstance( + client.transport._logged_channel._interceptor, GapicInterceptor + ) finally: await client.close() diff --git a/tests/system/data/test_system_autogen.py b/tests/system/data/test_system_autogen.py index 693b8d966..a78a8eb4c 100644 --- a/tests/system/data/test_system_autogen.py +++ b/tests/system/data/test_system_autogen.py @@ -27,6 +27,9 @@ from google.type import date_pb2 from google.cloud.bigtable.data._cross_sync import CrossSync from . import TEST_FAMILY, TEST_FAMILY_2, TEST_AGGREGATE_FAMILY +from google.cloud.bigtable_v2.services.bigtable.transports.grpc import ( + _LoggingClientInterceptor as GapicInterceptor, +) TARGETS = ["table"] if not os.environ.get(BIGTABLE_EMULATOR): @@ -99,10 +102,13 @@ def delete_rows(self): class TestSystem: + def _make_client(self): + project = os.getenv("GOOGLE_CLOUD_PROJECT") or None + return CrossSync._Sync_Impl.DataClient(project=project) + @pytest.fixture(scope="session") def client(self): - project = os.getenv("GOOGLE_CLOUD_PROJECT") or None - with CrossSync._Sync_Impl.DataClient(project=project) as client: + with self._make_client() as client: yield client @pytest.fixture(scope="session", params=TARGETS) @@ -219,8 +225,7 @@ def test_channel_refresh(self, table_id, instance_id, temp_rows): to ensure new channel works""" temp_rows.add_row(b"row_key_1") temp_rows.add_row(b"row_key_2") - project = os.getenv("GOOGLE_CLOUD_PROJECT") or None - client = CrossSync._Sync_Impl.DataClient(project=project) + client = self._make_client() try: client._channel_refresh_task = CrossSync._Sync_Impl.create_task( client._manage_channel, @@ -231,13 +236,17 @@ def test_channel_refresh(self, table_id, instance_id, temp_rows): CrossSync._Sync_Impl.yield_to_event_loop() with client.get_table(instance_id, table_id) as table: rows = table.read_rows({}) - first_channel = client.transport.grpc_channel + channel_wrapper = client.transport.grpc_channel + first_channel = client.transport.grpc_channel._channel assert len(rows) == 2 CrossSync._Sync_Impl.sleep(2) rows_after_refresh = table.read_rows({}) assert len(rows_after_refresh) == 2 - assert client.transport.grpc_channel is not first_channel - print(table) + assert client.transport.grpc_channel is channel_wrapper + assert client.transport.grpc_channel._channel is not first_channel + assert isinstance( + client.transport._logged_channel._interceptor, GapicInterceptor + ) finally: client.close() diff --git a/tests/unit/data/_async/test__swappable_channel.py b/tests/unit/data/_async/test__swappable_channel.py new file mode 100644 index 000000000..14fef2c85 --- /dev/null +++ b/tests/unit/data/_async/test__swappable_channel.py @@ -0,0 +1,135 @@ +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# try/except added for compatibility with python < 3.8 +try: + from unittest import mock +except ImportError: # pragma: NO COVER + import mock # type: ignore + +import pytest +from grpc import ChannelConnectivity + +from google.cloud.bigtable.data._cross_sync import CrossSync + +if CrossSync.is_async: + from google.cloud.bigtable.data._async._swappable_channel import ( + AsyncSwappableChannel as TargetType, + ) +else: + from google.cloud.bigtable.data._sync_autogen._swappable_channel import ( + SwappableChannel as TargetType, + ) + + +__CROSS_SYNC_OUTPUT__ = "tests.unit.data._sync_autogen.test__swappable_channel" + + +@CrossSync.convert_class(sync_name="TestSwappableChannel") +class TestAsyncSwappableChannel: + @staticmethod + @CrossSync.convert + def _get_target_class(): + return TargetType + + def _make_one(self, *args, **kwargs): + return self._get_target_class()(*args, **kwargs) + + def test_ctor(self): + channel_fn = mock.Mock() + instance = self._make_one(channel_fn) + assert instance._channel_fn == channel_fn + channel_fn.assert_called_once_with() + assert instance._channel == channel_fn.return_value + + def test_swap_channel(self): + channel_fn = mock.Mock() + instance = self._make_one(channel_fn) + old_channel = instance._channel + new_channel = object() + result = instance.swap_channel(new_channel) + assert result == old_channel + assert instance._channel == new_channel + + def test_create_channel(self): + channel_fn = mock.Mock() + instance = self._make_one(channel_fn) + # reset mock from ctor call + channel_fn.reset_mock() + new_channel = instance.create_channel() + channel_fn.assert_called_once_with() + assert new_channel == channel_fn.return_value + + @CrossSync.drop + def test_create_channel_async_interceptors_copied(self): + channel_fn = mock.Mock() + instance = self._make_one(channel_fn) + # reset mock from ctor call + channel_fn.reset_mock() + # mock out interceptors on original channel + instance._channel._unary_unary_interceptors = ["unary_unary"] + instance._channel._unary_stream_interceptors = ["unary_stream"] + instance._channel._stream_unary_interceptors = ["stream_unary"] + instance._channel._stream_stream_interceptors = ["stream_stream"] + + new_channel = instance.create_channel() + channel_fn.assert_called_once_with() + assert new_channel == channel_fn.return_value + assert new_channel._unary_unary_interceptors == ["unary_unary"] + assert new_channel._unary_stream_interceptors == ["unary_stream"] + assert new_channel._stream_unary_interceptors == ["stream_unary"] + assert new_channel._stream_stream_interceptors == ["stream_stream"] + + @pytest.mark.parametrize( + "method_name,args,kwargs", + [ + ("unary_unary", (1,), {"kw": 2}), + ("unary_stream", (3,), {"kw": 4}), + ("stream_unary", (5,), {"kw": 6}), + ("stream_stream", (7,), {"kw": 8}), + ("get_state", (), {"try_to_connect": True}), + ], + ) + def test_forwarded_methods(self, method_name, args, kwargs): + channel_fn = mock.Mock() + instance = self._make_one(channel_fn) + method = getattr(instance, method_name) + result = method(*args, **kwargs) + mock_method = getattr(channel_fn.return_value, method_name) + mock_method.assert_called_once_with(*args, **kwargs) + assert result == mock_method.return_value + + @pytest.mark.parametrize( + "method_name,args,kwargs", + [ + ("channel_ready", (), {}), + ("wait_for_state_change", (ChannelConnectivity.READY,), {}), + ], + ) + @CrossSync.pytest + async def test_forwarded_async_methods(self, method_name, args, kwargs): + async def dummy_coro(*a, **k): + return mock.sentinel.result + + channel = mock.Mock() + mock_method = getattr(channel, method_name) + mock_method.side_effect = dummy_coro + + channel_fn = mock.Mock(return_value=channel) + instance = self._make_one(channel_fn) + method = getattr(instance, method_name) + result = await method(*args, **kwargs) + + mock_method.assert_called_once_with(*args, **kwargs) + assert result == mock.sentinel.result diff --git a/tests/unit/data/_async/test_client.py b/tests/unit/data/_async/test_client.py index 97179a3b1..9e434d12f 100644 --- a/tests/unit/data/_async/test_client.py +++ b/tests/unit/data/_async/test_client.py @@ -52,13 +52,21 @@ if CrossSync.is_async: from google.api_core import grpc_helpers_async from google.cloud.bigtable.data._async.client import TableAsync + from google.cloud.bigtable.data._async._swappable_channel import ( + AsyncSwappableChannel, + ) CrossSync.add_mapping("grpc_helpers", grpc_helpers_async) + CrossSync.add_mapping("SwappableChannel", AsyncSwappableChannel) else: from google.api_core import grpc_helpers from google.cloud.bigtable.data._sync_autogen.client import Table # noqa: F401 + from google.cloud.bigtable.data._sync_autogen._swappable_channel import ( + SwappableChannel, + ) CrossSync.add_mapping("grpc_helpers", grpc_helpers) + CrossSync.add_mapping("SwappableChannel", SwappableChannel) __CROSS_SYNC_OUTPUT__ = "tests.unit.data._sync_autogen.test_client" @@ -229,6 +237,7 @@ async def test__start_background_channel_refresh(self): client, "_ping_and_warm_instances", CrossSync.Mock() ) as ping_and_warm: client._emulator_host = None + client.transport._grpc_channel = CrossSync.SwappableChannel(mock.Mock) client._start_background_channel_refresh() assert client._channel_refresh_task is not None assert isinstance(client._channel_refresh_task, CrossSync.Task) @@ -384,44 +393,31 @@ async def test__manage_channel_ping_and_warm(self): """ _manage channel should call ping and warm internally """ - import time import threading - if CrossSync.is_async: - from google.cloud.bigtable_v2.services.bigtable.transports.grpc_asyncio import ( - _LoggingClientAIOInterceptor as Interceptor, - ) - else: - from google.cloud.bigtable_v2.services.bigtable.transports.grpc import ( - _LoggingClientInterceptor as Interceptor, - ) - - client_mock = mock.Mock() - client_mock.transport._interceptor = Interceptor() - client_mock._is_closed.is_set.return_value = False - client_mock._channel_init_time = time.monotonic() - orig_channel = client_mock.transport.grpc_channel + client = self._make_client(project="project-id", use_emulator=True) + orig_channel = client.transport.grpc_channel # should ping an warm all new channels, and old channels if sleeping sleep_tuple = ( (asyncio, "sleep") if CrossSync.is_async else (threading.Event, "wait") ) - with mock.patch.object(*sleep_tuple): - # stop process after close is called - orig_channel.close.side_effect = asyncio.CancelledError - ping_and_warm = client_mock._ping_and_warm_instances = CrossSync.Mock() + with mock.patch.object(*sleep_tuple) as sleep_mock: + # stop process after loop + sleep_mock.side_effect = [None, asyncio.CancelledError] + ping_and_warm = client._ping_and_warm_instances = CrossSync.Mock() # should ping and warm old channel then new if sleep > 0 try: - await self._get_target_class()._manage_channel(client_mock, 10) + await client._manage_channel(10) except asyncio.CancelledError: pass # should have called at loop start, and after replacement assert ping_and_warm.call_count == 2 # should have replaced channel once - assert client_mock.transport._grpc_channel != orig_channel + assert client.transport.grpc_channel._channel != orig_channel # make sure new and old channels were warmed called_with = [call[1]["channel"] for call in ping_and_warm.call_args_list] assert orig_channel in called_with - assert client_mock.transport.grpc_channel in called_with + assert client.transport.grpc_channel._channel in called_with @CrossSync.pytest @pytest.mark.parametrize( @@ -439,8 +435,6 @@ async def test__manage_channel_sleeps( import time import random - channel = mock.Mock() - channel.close = CrossSync.Mock() with mock.patch.object(random, "uniform") as uniform: uniform.side_effect = lambda min_, max_: min_ with mock.patch.object(time, "time") as time_mock: @@ -449,8 +443,7 @@ async def test__manage_channel_sleeps( sleep.side_effect = [None for i in range(num_cycles - 1)] + [ asyncio.CancelledError ] - client = self._make_client(project="project-id") - client.transport._grpc_channel = channel + client = self._make_client(project="project-id", use_emulator=True) with mock.patch.object( client.transport, "create_channel", CrossSync.Mock ): @@ -506,26 +499,27 @@ async def test__manage_channel_refresh(self, num_cycles): expected_refresh = 0.5 grpc_lib = grpc.aio if CrossSync.is_async else grpc new_channel = grpc_lib.insecure_channel("localhost:8080") + create_channel_mock = mock.Mock() + create_channel_mock.return_value = new_channel + refreshable_channel = CrossSync.SwappableChannel(create_channel_mock) with mock.patch.object(CrossSync, "event_wait") as sleep: sleep.side_effect = [None for i in range(num_cycles)] + [RuntimeError] - with mock.patch.object( - CrossSync.grpc_helpers, "create_channel" - ) as create_channel: - create_channel.return_value = new_channel - client = self._make_client(project="project-id") - create_channel.reset_mock() - try: - await client._manage_channel( - refresh_interval_min=expected_refresh, - refresh_interval_max=expected_refresh, - grace_period=0, - ) - except RuntimeError: - pass - assert sleep.call_count == num_cycles + 1 - assert create_channel.call_count == num_cycles - await client.close() + client = self._make_client(project="project-id") + client.transport._grpc_channel = refreshable_channel + create_channel_mock.reset_mock() + sleep.reset_mock() + try: + await client._manage_channel( + refresh_interval_min=expected_refresh, + refresh_interval_max=expected_refresh, + grace_period=0, + ) + except RuntimeError: + pass + assert sleep.call_count == num_cycles + 1 + assert create_channel_mock.call_count == num_cycles + await client.close() @CrossSync.pytest async def test__register_instance(self): diff --git a/tests/unit/data/_sync_autogen/test__swappable_channel.py b/tests/unit/data/_sync_autogen/test__swappable_channel.py new file mode 100644 index 000000000..04f3f61c8 --- /dev/null +++ b/tests/unit/data/_sync_autogen/test__swappable_channel.py @@ -0,0 +1,100 @@ +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# try/except added for compatibility with python < 3.8 + +# This file is automatically generated by CrossSync. Do not edit manually. + +try: + from unittest import mock +except ImportError: + import mock +import pytest +from grpc import ChannelConnectivity +from google.cloud.bigtable.data._sync_autogen._swappable_channel import ( + SwappableChannel as TargetType, +) + + +class TestSwappableChannel: + @staticmethod + def _get_target_class(): + return TargetType + + def _make_one(self, *args, **kwargs): + return self._get_target_class()(*args, **kwargs) + + def test_ctor(self): + channel_fn = mock.Mock() + instance = self._make_one(channel_fn) + assert instance._channel_fn == channel_fn + channel_fn.assert_called_once_with() + assert instance._channel == channel_fn.return_value + + def test_swap_channel(self): + channel_fn = mock.Mock() + instance = self._make_one(channel_fn) + old_channel = instance._channel + new_channel = object() + result = instance.swap_channel(new_channel) + assert result == old_channel + assert instance._channel == new_channel + + def test_create_channel(self): + channel_fn = mock.Mock() + instance = self._make_one(channel_fn) + channel_fn.reset_mock() + new_channel = instance.create_channel() + channel_fn.assert_called_once_with() + assert new_channel == channel_fn.return_value + + @pytest.mark.parametrize( + "method_name,args,kwargs", + [ + ("unary_unary", (1,), {"kw": 2}), + ("unary_stream", (3,), {"kw": 4}), + ("stream_unary", (5,), {"kw": 6}), + ("stream_stream", (7,), {"kw": 8}), + ("get_state", (), {"try_to_connect": True}), + ], + ) + def test_forwarded_methods(self, method_name, args, kwargs): + channel_fn = mock.Mock() + instance = self._make_one(channel_fn) + method = getattr(instance, method_name) + result = method(*args, **kwargs) + mock_method = getattr(channel_fn.return_value, method_name) + mock_method.assert_called_once_with(*args, **kwargs) + assert result == mock_method.return_value + + @pytest.mark.parametrize( + "method_name,args,kwargs", + [ + ("channel_ready", (), {}), + ("wait_for_state_change", (ChannelConnectivity.READY,), {}), + ], + ) + def test_forwarded_async_methods(self, method_name, args, kwargs): + def dummy_coro(*a, **k): + return mock.sentinel.result + + channel = mock.Mock() + mock_method = getattr(channel, method_name) + mock_method.side_effect = dummy_coro + channel_fn = mock.Mock(return_value=channel) + instance = self._make_one(channel_fn) + method = getattr(instance, method_name) + result = method(*args, **kwargs) + mock_method.assert_called_once_with(*args, **kwargs) + assert result == mock.sentinel.result diff --git a/tests/unit/data/_sync_autogen/test_client.py b/tests/unit/data/_sync_autogen/test_client.py index 6012a10d3..506ad7e94 100644 --- a/tests/unit/data/_sync_autogen/test_client.py +++ b/tests/unit/data/_sync_autogen/test_client.py @@ -46,8 +46,10 @@ str_val, ) from google.api_core import grpc_helpers +from google.cloud.bigtable.data._sync_autogen._swappable_channel import SwappableChannel CrossSync._Sync_Impl.add_mapping("grpc_helpers", grpc_helpers) +CrossSync._Sync_Impl.add_mapping("SwappableChannel", SwappableChannel) @CrossSync._Sync_Impl.add_mapping_decorator("TestBigtableDataClient") @@ -182,6 +184,9 @@ def test__start_background_channel_refresh(self): client, "_ping_and_warm_instances", CrossSync._Sync_Impl.Mock() ) as ping_and_warm: client._emulator_host = None + client.transport._grpc_channel = CrossSync._Sync_Impl.SwappableChannel( + mock.Mock + ) client._start_background_channel_refresh() assert client._channel_refresh_task is not None assert isinstance(client._channel_refresh_task, CrossSync._Sync_Impl.Task) @@ -297,36 +302,29 @@ def test__manage_channel_first_sleep( def test__manage_channel_ping_and_warm(self): """_manage channel should call ping and warm internally""" - import time import threading - from google.cloud.bigtable_v2.services.bigtable.transports.grpc import ( - _LoggingClientInterceptor as Interceptor, - ) - client_mock = mock.Mock() - client_mock.transport._interceptor = Interceptor() - client_mock._is_closed.is_set.return_value = False - client_mock._channel_init_time = time.monotonic() - orig_channel = client_mock.transport.grpc_channel + client = self._make_client(project="project-id", use_emulator=True) + orig_channel = client.transport.grpc_channel sleep_tuple = ( (asyncio, "sleep") if CrossSync._Sync_Impl.is_async else (threading.Event, "wait") ) - with mock.patch.object(*sleep_tuple): - orig_channel.close.side_effect = asyncio.CancelledError + with mock.patch.object(*sleep_tuple) as sleep_mock: + sleep_mock.side_effect = [None, asyncio.CancelledError] ping_and_warm = ( - client_mock._ping_and_warm_instances + client._ping_and_warm_instances ) = CrossSync._Sync_Impl.Mock() try: - self._get_target_class()._manage_channel(client_mock, 10) + client._manage_channel(10) except asyncio.CancelledError: pass assert ping_and_warm.call_count == 2 - assert client_mock.transport._grpc_channel != orig_channel + assert client.transport.grpc_channel._channel != orig_channel called_with = [call[1]["channel"] for call in ping_and_warm.call_args_list] assert orig_channel in called_with - assert client_mock.transport.grpc_channel in called_with + assert client.transport.grpc_channel._channel in called_with @pytest.mark.parametrize( "refresh_interval, num_cycles, expected_sleep", @@ -336,8 +334,6 @@ def test__manage_channel_sleeps(self, refresh_interval, num_cycles, expected_sle import time import random - channel = mock.Mock() - channel.close = CrossSync._Sync_Impl.Mock() with mock.patch.object(random, "uniform") as uniform: uniform.side_effect = lambda min_, max_: min_ with mock.patch.object(time, "time") as time_mock: @@ -346,8 +342,7 @@ def test__manage_channel_sleeps(self, refresh_interval, num_cycles, expected_sle sleep.side_effect = [None for i in range(num_cycles - 1)] + [ asyncio.CancelledError ] - client = self._make_client(project="project-id") - client.transport._grpc_channel = channel + client = self._make_client(project="project-id", use_emulator=True) with mock.patch.object( client.transport, "create_channel", CrossSync._Sync_Impl.Mock ): @@ -400,25 +395,26 @@ def test__manage_channel_refresh(self, num_cycles): expected_refresh = 0.5 grpc_lib = grpc.aio if CrossSync._Sync_Impl.is_async else grpc new_channel = grpc_lib.insecure_channel("localhost:8080") + create_channel_mock = mock.Mock() + create_channel_mock.return_value = new_channel + refreshable_channel = CrossSync._Sync_Impl.SwappableChannel(create_channel_mock) with mock.patch.object(CrossSync._Sync_Impl, "event_wait") as sleep: sleep.side_effect = [None for i in range(num_cycles)] + [RuntimeError] - with mock.patch.object( - CrossSync._Sync_Impl.grpc_helpers, "create_channel" - ) as create_channel: - create_channel.return_value = new_channel - client = self._make_client(project="project-id") - create_channel.reset_mock() - try: - client._manage_channel( - refresh_interval_min=expected_refresh, - refresh_interval_max=expected_refresh, - grace_period=0, - ) - except RuntimeError: - pass - assert sleep.call_count == num_cycles + 1 - assert create_channel.call_count == num_cycles - client.close() + client = self._make_client(project="project-id") + client.transport._grpc_channel = refreshable_channel + create_channel_mock.reset_mock() + sleep.reset_mock() + try: + client._manage_channel( + refresh_interval_min=expected_refresh, + refresh_interval_max=expected_refresh, + grace_period=0, + ) + except RuntimeError: + pass + assert sleep.call_count == num_cycles + 1 + assert create_channel_mock.call_count == num_cycles + client.close() def test__register_instance(self): """test instance registration""" From 34ceb86007db08d453fa25cca4968d5b498ffcd6 Mon Sep 17 00:00:00 2001 From: Lixia Chen Date: Fri, 12 Sep 2025 15:06:04 -0400 Subject: [PATCH 5/8] feat: Add support for Proto and Enum types (#1202) --- google/cloud/bigtable/data/_async/client.py | 61 + .../bigtable/data/_sync_autogen/client.py | 61 + .../_async/execute_query_iterator.py | 10 +- .../_query_result_parsing_utils.py | 155 ++- .../bigtable/data/execute_query/_reader.py | 30 +- .../_sync_autogen/execute_query_iterator.py | 10 +- .../bigtable/data/execute_query/metadata.py | 24 + samples/testdata/README.md | 5 + samples/testdata/descriptors.pb | Bin 0 -> 182 bytes samples/testdata/singer.proto | 15 + samples/testdata/singer_pb2.py | 27 + tests/system/data/test_system_autogen.py | 28 +- tests/unit/data/execute_query/sql_helpers.py | 12 + .../test_execute_query_parameters_parsing.py | 13 + .../test_query_result_parsing_utils.py | 1030 ++++++++++++++++- .../test_query_result_row_reader.py | 42 +- 16 files changed, 1462 insertions(+), 61 deletions(-) create mode 100644 samples/testdata/README.md create mode 100644 samples/testdata/descriptors.pb create mode 100644 samples/testdata/singer.proto create mode 100644 samples/testdata/singer_pb2.py diff --git a/google/cloud/bigtable/data/_async/client.py b/google/cloud/bigtable/data/_async/client.py index 40f30f1d8..516e20eb3 100644 --- a/google/cloud/bigtable/data/_async/client.py +++ b/google/cloud/bigtable/data/_async/client.py @@ -58,6 +58,8 @@ from google.api_core.exceptions import DeadlineExceeded from google.api_core.exceptions import ServiceUnavailable from google.api_core.exceptions import Aborted +from google.protobuf.message import Message +from google.protobuf.internal.enum_type_wrapper import EnumTypeWrapper import google.auth.credentials import google.auth._default @@ -684,6 +686,7 @@ async def execute_query( DeadlineExceeded, ServiceUnavailable, ), + column_info: dict[str, Message | EnumTypeWrapper] | None = None, ) -> "ExecuteQueryIteratorAsync": """ Executes an SQL query on an instance. @@ -732,6 +735,62 @@ async def execute_query( If None, defaults to prepare_operation_timeout. prepare_retryable_errors: a list of errors that will be retried if encountered during prepareQuery. Defaults to 4 (DeadlineExceeded) and 14 (ServiceUnavailable) + column_info: (Optional) A dictionary mapping column names to Protobuf message classes or EnumTypeWrapper objects. + This dictionary provides the necessary type information for deserializing PROTO and + ENUM column values from the query results. When an entry is provided + for a PROTO or ENUM column, the client library will attempt to deserialize the raw data. + + - For PROTO columns: The value in the dictionary should be the + Protobuf Message class (e.g., ``my_pb2.MyMessage``). + - For ENUM columns: The value should be the Protobuf EnumTypeWrapper + object (e.g., ``my_pb2.MyEnum``). + + Example:: + + import my_pb2 + + column_info = { + "my_proto_column": my_pb2.MyMessage, + "my_enum_column": my_pb2.MyEnum + } + + If ``column_info`` is not provided, or if a specific column name is not found + in the dictionary: + + - PROTO columns will be returned as raw bytes. + - ENUM columns will be returned as integers. + + Note for Nested PROTO or ENUM Fields: + + To specify types for PROTO or ENUM fields within STRUCTs or MAPs, use a dot-separated + path from the top-level column name. + + - For STRUCTs: ``struct_column_name.field_name`` + - For MAPs: ``map_column_name.key`` or ``map_column_name.value`` to specify types + for the map keys or values, respectively. + + Example:: + + import my_pb2 + + column_info = { + # Top-level column + "my_proto_column": my_pb2.MyMessage, + "my_enum_column": my_pb2.MyEnum, + + # Nested field in a STRUCT column named 'my_struct' + "my_struct.nested_proto_field": my_pb2.OtherMessage, + "my_struct.nested_enum_field": my_pb2.AnotherEnum, + + # Nested field in a MAP column named 'my_map' + "my_map.key": my_pb2.MapKeyEnum, # If map keys were enums + "my_map.value": my_pb2.MapValueMessage, + + # PROTO field inside a STRUCT, where the STRUCT is the value in a MAP column + "struct_map.value.nested_proto_field": my_pb2.DeeplyNestedProto, + "struct_map.value.nested_enum_field": my_pb2.DeeplyNestedEnum + } + Returns: ExecuteQueryIteratorAsync: an asynchronous iterator that yields rows returned by the query Raises: @@ -741,6 +800,7 @@ async def execute_query( google.api_core.exceptions.GoogleAPIError: raised if the request encounters an unrecoverable error google.cloud.bigtable.data.exceptions.ParameterTypeInferenceFailed: Raised if a parameter is passed without an explicit type, and the type cannot be infered + google.protobuf.message.DecodeError: raised if the deserialization of a PROTO/ENUM value fails. """ instance_name = self._gapic_client.instance_path(self.project, instance_id) converted_param_types = _to_param_types(parameters, parameter_types) @@ -798,6 +858,7 @@ async def execute_query( attempt_timeout, operation_timeout, retryable_excs=retryable_excs, + column_info=column_info, ) @CrossSync.convert(sync_name="__enter__") diff --git a/google/cloud/bigtable/data/_sync_autogen/client.py b/google/cloud/bigtable/data/_sync_autogen/client.py index 1c75823ae..a168f360d 100644 --- a/google/cloud/bigtable/data/_sync_autogen/client.py +++ b/google/cloud/bigtable/data/_sync_autogen/client.py @@ -49,6 +49,8 @@ from google.api_core.exceptions import DeadlineExceeded from google.api_core.exceptions import ServiceUnavailable from google.api_core.exceptions import Aborted +from google.protobuf.message import Message +from google.protobuf.internal.enum_type_wrapper import EnumTypeWrapper import google.auth.credentials import google.auth._default from google.api_core import client_options as client_options_lib @@ -508,6 +510,7 @@ def execute_query( DeadlineExceeded, ServiceUnavailable, ), + column_info: dict[str, Message | EnumTypeWrapper] | None = None, ) -> "ExecuteQueryIterator": """Executes an SQL query on an instance. Returns an iterator to asynchronously stream back columns from selected rows. @@ -555,6 +558,62 @@ def execute_query( If None, defaults to prepare_operation_timeout. prepare_retryable_errors: a list of errors that will be retried if encountered during prepareQuery. Defaults to 4 (DeadlineExceeded) and 14 (ServiceUnavailable) + column_info: (Optional) A dictionary mapping column names to Protobuf message classes or EnumTypeWrapper objects. + This dictionary provides the necessary type information for deserializing PROTO and + ENUM column values from the query results. When an entry is provided + for a PROTO or ENUM column, the client library will attempt to deserialize the raw data. + + - For PROTO columns: The value in the dictionary should be the + Protobuf Message class (e.g., ``my_pb2.MyMessage``). + - For ENUM columns: The value should be the Protobuf EnumTypeWrapper + object (e.g., ``my_pb2.MyEnum``). + + Example:: + + import my_pb2 + + column_info = { + "my_proto_column": my_pb2.MyMessage, + "my_enum_column": my_pb2.MyEnum + } + + If ``column_info`` is not provided, or if a specific column name is not found + in the dictionary: + + - PROTO columns will be returned as raw bytes. + - ENUM columns will be returned as integers. + + Note for Nested PROTO or ENUM Fields: + + To specify types for PROTO or ENUM fields within STRUCTs or MAPs, use a dot-separated + path from the top-level column name. + + - For STRUCTs: ``struct_column_name.field_name`` + - For MAPs: ``map_column_name.key`` or ``map_column_name.value`` to specify types + for the map keys or values, respectively. + + Example:: + + import my_pb2 + + column_info = { + # Top-level column + "my_proto_column": my_pb2.MyMessage, + "my_enum_column": my_pb2.MyEnum, + + # Nested field in a STRUCT column named 'my_struct' + "my_struct.nested_proto_field": my_pb2.OtherMessage, + "my_struct.nested_enum_field": my_pb2.AnotherEnum, + + # Nested field in a MAP column named 'my_map' + "my_map.key": my_pb2.MapKeyEnum, # If map keys were enums + "my_map.value": my_pb2.MapValueMessage, + + # PROTO field inside a STRUCT, where the STRUCT is the value in a MAP column + "struct_map.value.nested_proto_field": my_pb2.DeeplyNestedProto, + "struct_map.value.nested_enum_field": my_pb2.DeeplyNestedEnum + } + Returns: ExecuteQueryIterator: an asynchronous iterator that yields rows returned by the query Raises: @@ -564,6 +623,7 @@ def execute_query( google.api_core.exceptions.GoogleAPIError: raised if the request encounters an unrecoverable error google.cloud.bigtable.data.exceptions.ParameterTypeInferenceFailed: Raised if a parameter is passed without an explicit type, and the type cannot be infered + google.protobuf.message.DecodeError: raised if the deserialization of a PROTO/ENUM value fails. """ instance_name = self._gapic_client.instance_path(self.project, instance_id) converted_param_types = _to_param_types(parameters, parameter_types) @@ -615,6 +675,7 @@ def execute_query( attempt_timeout, operation_timeout, retryable_excs=retryable_excs, + column_info=column_info, ) def __enter__(self): diff --git a/google/cloud/bigtable/data/execute_query/_async/execute_query_iterator.py b/google/cloud/bigtable/data/execute_query/_async/execute_query_iterator.py index 74f01c60c..41900bb12 100644 --- a/google/cloud/bigtable/data/execute_query/_async/execute_query_iterator.py +++ b/google/cloud/bigtable/data/execute_query/_async/execute_query_iterator.py @@ -23,6 +23,8 @@ TYPE_CHECKING, ) from google.api_core import retry as retries +from google.protobuf.message import Message +from google.protobuf.internal.enum_type_wrapper import EnumTypeWrapper from google.cloud.bigtable.data.execute_query._byte_cursor import _ByteCursor from google.cloud.bigtable.data._helpers import ( @@ -87,6 +89,7 @@ def __init__( operation_timeout: float, req_metadata: Sequence[Tuple[str, str]] = (), retryable_excs: Sequence[type[Exception]] = (), + column_info: dict[str, Message | EnumTypeWrapper] | None = None, ) -> None: """ Collects responses from ExecuteQuery requests and parses them into QueryResultRows. @@ -107,6 +110,8 @@ def __init__( Failed requests will be retried within the budget req_metadata: metadata used while sending the gRPC request retryable_excs: a list of errors that will be retried if encountered. + column_info: dict with mappings between column names and additional column information + for protobuf deserialization. Raises: {NO_LOOP} :class:`ValueError ` as a safeguard if data is processed in an unexpected state @@ -135,6 +140,7 @@ def __init__( exception_factory=_retry_exception_factory, ) self._req_metadata = req_metadata + self._column_info = column_info try: self._register_instance_task = CrossSync.create_task( self._client._register_instance, @@ -202,7 +208,9 @@ async def _next_impl(self) -> CrossSync.Iterator[QueryResultRow]: raise ValueError( "Error parsing response before finalizing metadata" ) - results = self._reader.consume(batches_to_parse, self.metadata) + results = self._reader.consume( + batches_to_parse, self.metadata, self._column_info + ) if results is None: continue diff --git a/google/cloud/bigtable/data/execute_query/_query_result_parsing_utils.py b/google/cloud/bigtable/data/execute_query/_query_result_parsing_utils.py index 4cb5db291..a43539e55 100644 --- a/google/cloud/bigtable/data/execute_query/_query_result_parsing_utils.py +++ b/google/cloud/bigtable/data/execute_query/_query_result_parsing_utils.py @@ -11,8 +11,12 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. +from __future__ import annotations -from typing import Any, Callable, Dict, Type +from typing import Any, Callable, Dict, Type, Optional, Union + +from google.protobuf.message import Message +from google.protobuf.internal.enum_type_wrapper import EnumTypeWrapper from google.cloud.bigtable.data.execute_query.values import Struct from google.cloud.bigtable.data.execute_query.metadata import SqlType from google.cloud.bigtable_v2 import Value as PBValue @@ -30,24 +34,36 @@ SqlType.Struct: "array_value", SqlType.Array: "array_value", SqlType.Map: "array_value", + SqlType.Proto: "bytes_value", + SqlType.Enum: "int_value", } -def _parse_array_type(value: PBValue, metadata_type: SqlType.Array) -> Any: +def _parse_array_type( + value: PBValue, + metadata_type: SqlType.Array, + column_name: str | None, + column_info: dict[str, Message | EnumTypeWrapper] | None = None, +) -> list[Any]: """ used for parsing an array represented as a protobuf to a python list. """ return list( map( lambda val: _parse_pb_value_to_python_value( - val, metadata_type.element_type + val, metadata_type.element_type, column_name, column_info ), value.array_value.values, ) ) -def _parse_map_type(value: PBValue, metadata_type: SqlType.Map) -> Any: +def _parse_map_type( + value: PBValue, + metadata_type: SqlType.Map, + column_name: str | None, + column_info: dict[str, Message | EnumTypeWrapper] | None = None, +) -> dict[Any, Any]: """ used for parsing a map represented as a protobuf to a python dict. @@ -64,10 +80,16 @@ def _parse_map_type(value: PBValue, metadata_type: SqlType.Map) -> Any: map( lambda map_entry: ( _parse_pb_value_to_python_value( - map_entry.array_value.values[0], metadata_type.key_type + map_entry.array_value.values[0], + metadata_type.key_type, + f"{column_name}.key" if column_name is not None else None, + column_info, ), _parse_pb_value_to_python_value( - map_entry.array_value.values[1], metadata_type.value_type + map_entry.array_value.values[1], + metadata_type.value_type, + f"{column_name}.value" if column_name is not None else None, + column_info, ), ), value.array_value.values, @@ -77,7 +99,12 @@ def _parse_map_type(value: PBValue, metadata_type: SqlType.Map) -> Any: raise ValueError("Invalid map entry - less or more than two values.") -def _parse_struct_type(value: PBValue, metadata_type: SqlType.Struct) -> Struct: +def _parse_struct_type( + value: PBValue, + metadata_type: SqlType.Struct, + column_name: str | None, + column_info: dict[str, Message | EnumTypeWrapper] | None = None, +) -> Struct: """ used for parsing a struct represented as a protobuf to a google.cloud.bigtable.data.execute_query.Struct @@ -88,13 +115,27 @@ def _parse_struct_type(value: PBValue, metadata_type: SqlType.Struct) -> Struct: struct = Struct() for value, field in zip(value.array_value.values, metadata_type.fields): field_name, field_type = field - struct.add_field(field_name, _parse_pb_value_to_python_value(value, field_type)) + nested_column_name: str | None + if column_name and field_name: + # qualify the column name for nested lookups + nested_column_name = f"{column_name}.{field_name}" + else: + nested_column_name = None + struct.add_field( + field_name, + _parse_pb_value_to_python_value( + value, field_type, nested_column_name, column_info + ), + ) return struct def _parse_timestamp_type( - value: PBValue, metadata_type: SqlType.Timestamp + value: PBValue, + metadata_type: SqlType.Timestamp, + column_name: str | None, + column_info: dict[str, Message | EnumTypeWrapper] | None = None, ) -> DatetimeWithNanoseconds: """ used for parsing a timestamp represented as a protobuf to DatetimeWithNanoseconds @@ -102,15 +143,105 @@ def _parse_timestamp_type( return DatetimeWithNanoseconds.from_timestamp_pb(value.timestamp_value) -_TYPE_PARSERS: Dict[Type[SqlType.Type], Callable[[PBValue, Any], Any]] = { +def _parse_proto_type( + value: PBValue, + metadata_type: SqlType.Proto, + column_name: str | None, + column_info: dict[str, Message | EnumTypeWrapper] | None = None, +) -> Message | bytes: + """ + Parses a serialized protobuf message into a Message object using type information + provided in column_info. + + Args: + value: The value to parse, expected to have a bytes_value attribute. + metadata_type: The expected SQL type (Proto). + column_name: The name of the column. + column_info: (Optional) A dictionary mapping column names to their + corresponding Protobuf Message classes. This information is used + to deserialize the raw bytes. + + Returns: + A deserialized Protobuf Message object if parsing is successful. + If the required type information is not found in column_info, the function + returns the original serialized data as bytes (value.bytes_value). + This fallback ensures that the raw data is still accessible. + + Raises: + google.protobuf.message.DecodeError: If `value.bytes_value` cannot be + parsed as the Message type specified in `column_info`. + """ + if ( + column_name is not None + and column_info is not None + and column_info.get(column_name) is not None + ): + default_proto_message = column_info.get(column_name) + if isinstance(default_proto_message, Message): + proto_message = type(default_proto_message)() + proto_message.ParseFromString(value.bytes_value) + return proto_message + return value.bytes_value + + +def _parse_enum_type( + value: PBValue, + metadata_type: SqlType.Enum, + column_name: str | None, + column_info: dict[str, Message | EnumTypeWrapper] | None = None, +) -> int | str: + """ + Parses an integer value into a Protobuf enum name string using type information + provided in column_info. + + Args: + value: The value to parse, expected to have an int_value attribute. + metadata_type: The expected SQL type (Enum). + column_name: The name of the column. + column_info: (Optional) A dictionary mapping column names to their + corresponding Protobuf EnumTypeWrapper objects. This information + is used to convert the integer to an enum name. + + Returns: + A string representing the name of the enum value if conversion is successful. + If conversion fails for any reason, such as the required EnumTypeWrapper + not being found in column_info, or if an error occurs during the name lookup + (e.g., the integer is not a valid enum value), the function returns the + original integer value (value.int_value). This fallback ensures the + raw integer representation is still accessible. + """ + if ( + column_name is not None + and column_info is not None + and column_info.get(column_name) is not None + ): + proto_enum = column_info.get(column_name) + if isinstance(proto_enum, EnumTypeWrapper): + return proto_enum.Name(value.int_value) + return value.int_value + + +ParserCallable = Callable[ + [PBValue, Any, Optional[str], Optional[Dict[str, Union[Message, EnumTypeWrapper]]]], + Any, +] + +_TYPE_PARSERS: Dict[Type[SqlType.Type], ParserCallable] = { SqlType.Timestamp: _parse_timestamp_type, SqlType.Struct: _parse_struct_type, SqlType.Array: _parse_array_type, SqlType.Map: _parse_map_type, + SqlType.Proto: _parse_proto_type, + SqlType.Enum: _parse_enum_type, } -def _parse_pb_value_to_python_value(value: PBValue, metadata_type: SqlType.Type) -> Any: +def _parse_pb_value_to_python_value( + value: PBValue, + metadata_type: SqlType.Type, + column_name: str | None, + column_info: dict[str, Message | EnumTypeWrapper] | None = None, +) -> Any: """ used for converting the value represented as a protobufs to a python object. """ @@ -126,7 +257,7 @@ def _parse_pb_value_to_python_value(value: PBValue, metadata_type: SqlType.Type) if kind in _TYPE_PARSERS: parser = _TYPE_PARSERS[kind] - return parser(value, metadata_type) + return parser(value, metadata_type, column_name, column_info) elif kind in _REQUIRED_PROTO_FIELDS: field_name = _REQUIRED_PROTO_FIELDS[kind] return getattr(value, field_name) diff --git a/google/cloud/bigtable/data/execute_query/_reader.py b/google/cloud/bigtable/data/execute_query/_reader.py index d9507fe35..467c2030f 100644 --- a/google/cloud/bigtable/data/execute_query/_reader.py +++ b/google/cloud/bigtable/data/execute_query/_reader.py @@ -11,6 +11,7 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. +from __future__ import annotations from typing import ( List, @@ -21,6 +22,8 @@ Sequence, ) from abc import ABC, abstractmethod +from google.protobuf.message import Message +from google.protobuf.internal.enum_type_wrapper import EnumTypeWrapper from google.cloud.bigtable_v2 import ProtoRows, Value as PBValue @@ -54,7 +57,10 @@ class _Reader(ABC, Generic[T]): @abstractmethod def consume( - self, batches_to_consume: List[bytes], metadata: Metadata + self, + batches_to_consume: List[bytes], + metadata: Metadata, + column_info: dict[str, Message | EnumTypeWrapper] | None = None, ) -> Optional[Iterable[T]]: """This method receives a list of batches of bytes to be parsed as ProtoRows messages. It then uses the metadata to group the values in the parsed messages into rows. Returns @@ -64,6 +70,8 @@ def consume( :meth:`google.cloud.bigtable.byte_cursor._ByteCursor.consume` method. metadata: metadata used to transform values to rows + column_info: (Optional) dict with mappings between column names and additional column information + for protobuf deserialization. Returns: Iterable[T] or None: Iterable if gathered values can form one or more instances of T, @@ -89,7 +97,10 @@ def _parse_proto_rows(self, bytes_to_parse: bytes) -> Iterable[PBValue]: return proto_rows.values def _construct_query_result_row( - self, values: Sequence[PBValue], metadata: Metadata + self, + values: Sequence[PBValue], + metadata: Metadata, + column_info: dict[str, Message | EnumTypeWrapper] | None = None, ) -> QueryResultRow: result = QueryResultRow() columns = metadata.columns @@ -99,12 +110,17 @@ def _construct_query_result_row( ), "This function should be called only when count of values matches count of columns." for column, value in zip(columns, values): - parsed_value = _parse_pb_value_to_python_value(value, column.column_type) + parsed_value = _parse_pb_value_to_python_value( + value, column.column_type, column.column_name, column_info + ) result.add_field(column.column_name, parsed_value) return result def consume( - self, batches_to_consume: List[bytes], metadata: Metadata + self, + batches_to_consume: List[bytes], + metadata: Metadata, + column_info: dict[str, Message | EnumTypeWrapper] | None = None, ) -> Optional[Iterable[QueryResultRow]]: num_columns = len(metadata.columns) rows = [] @@ -112,7 +128,11 @@ def consume( values = self._parse_proto_rows(batch_bytes) for row_data in batched(values, n=num_columns): if len(row_data) == num_columns: - rows.append(self._construct_query_result_row(row_data, metadata)) + rows.append( + self._construct_query_result_row( + row_data, metadata, column_info + ) + ) else: raise ValueError( "Unexpected error, recieved bad number of values. " diff --git a/google/cloud/bigtable/data/execute_query/_sync_autogen/execute_query_iterator.py b/google/cloud/bigtable/data/execute_query/_sync_autogen/execute_query_iterator.py index e819acda7..6b29cbfe7 100644 --- a/google/cloud/bigtable/data/execute_query/_sync_autogen/execute_query_iterator.py +++ b/google/cloud/bigtable/data/execute_query/_sync_autogen/execute_query_iterator.py @@ -18,6 +18,8 @@ from __future__ import annotations from typing import Any, Dict, Optional, Sequence, Tuple, TYPE_CHECKING from google.api_core import retry as retries +from google.protobuf.message import Message +from google.protobuf.internal.enum_type_wrapper import EnumTypeWrapper from google.cloud.bigtable.data.execute_query._byte_cursor import _ByteCursor from google.cloud.bigtable.data._helpers import ( _attempt_timeout_generator, @@ -63,6 +65,7 @@ def __init__( operation_timeout: float, req_metadata: Sequence[Tuple[str, str]] = (), retryable_excs: Sequence[type[Exception]] = (), + column_info: dict[str, Message | EnumTypeWrapper] | None = None, ) -> None: """Collects responses from ExecuteQuery requests and parses them into QueryResultRows. @@ -82,6 +85,8 @@ def __init__( Failed requests will be retried within the budget req_metadata: metadata used while sending the gRPC request retryable_excs: a list of errors that will be retried if encountered. + column_info: dict with mappings between column names and additional column information + for protobuf deserialization. Raises: None :class:`ValueError ` as a safeguard if data is processed in an unexpected state @@ -110,6 +115,7 @@ def __init__( exception_factory=_retry_exception_factory, ) self._req_metadata = req_metadata + self._column_info = column_info try: self._register_instance_task = CrossSync._Sync_Impl.create_task( self._client._register_instance, @@ -164,7 +170,9 @@ def _next_impl(self) -> CrossSync._Sync_Impl.Iterator[QueryResultRow]: raise ValueError( "Error parsing response before finalizing metadata" ) - results = self._reader.consume(batches_to_parse, self.metadata) + results = self._reader.consume( + batches_to_parse, self.metadata, self._column_info + ) if results is None: continue except ValueError as e: diff --git a/google/cloud/bigtable/data/execute_query/metadata.py b/google/cloud/bigtable/data/execute_query/metadata.py index 2fd66947d..74b6cb836 100644 --- a/google/cloud/bigtable/data/execute_query/metadata.py +++ b/google/cloud/bigtable/data/execute_query/metadata.py @@ -296,6 +296,28 @@ def _to_value_pb_dict(self, value: Any) -> Dict[str, Any]: ) } + class Proto(Type): + """Proto SQL type.""" + + type_field_name = "proto_type" + + def _to_value_pb_dict(self, value: Any): + raise NotImplementedError("Proto is not supported as a query parameter") + + def _to_type_pb_dict(self) -> Dict[str, Any]: + raise NotImplementedError("Proto is not supported as a query parameter") + + class Enum(Type): + """Enum SQL type.""" + + type_field_name = "enum_type" + + def _to_value_pb_dict(self, value: Any): + raise NotImplementedError("Enum is not supported as a query parameter") + + def _to_type_pb_dict(self) -> Dict[str, Any]: + raise NotImplementedError("Enum is not supported as a query parameter") + class Metadata: """ @@ -388,6 +410,8 @@ def _pb_metadata_to_metadata_types( "bool_type": SqlType.Bool, "timestamp_type": SqlType.Timestamp, "date_type": SqlType.Date, + "proto_type": SqlType.Proto, + "enum_type": SqlType.Enum, "struct_type": SqlType.Struct, "array_type": SqlType.Array, "map_type": SqlType.Map, diff --git a/samples/testdata/README.md b/samples/testdata/README.md new file mode 100644 index 000000000..57520179f --- /dev/null +++ b/samples/testdata/README.md @@ -0,0 +1,5 @@ +#### To generate singer_pb2.py and descriptors.pb file from singer.proto using `protoc` +```shell +cd samples +protoc --proto_path=testdata/ --include_imports --descriptor_set_out=testdata/descriptors.pb --python_out=testdata/ testdata/singer.proto +``` \ No newline at end of file diff --git a/samples/testdata/descriptors.pb b/samples/testdata/descriptors.pb new file mode 100644 index 0000000000000000000000000000000000000000..bddf04de378263f791d1d7f558e97f934b281d2b GIT binary patch literal 182 zcmd5Zl#{BLTUwl%tQ5q>77SJ> zB*ev%mzbL>!KlEf!5IW*3z=}Srl;l=rAjaX1^JBR^l%uX=MGX81W~M|$HfZf3$b%C o2lxjFFbHvQv3NN~MF}v1SZ@A4-U3V@R*=85w*Yez8`zD;07g_Xr2qf` literal 0 HcmV?d00001 diff --git a/samples/testdata/singer.proto b/samples/testdata/singer.proto new file mode 100644 index 000000000..d60e0dfb3 --- /dev/null +++ b/samples/testdata/singer.proto @@ -0,0 +1,15 @@ +syntax = "proto3"; + +package examples.bigtable.music; + +enum Genre { + POP = 0; + JAZZ = 1; + FOLK = 2; + ROCK = 3; +} + +message Singer { + string name = 1; + Genre genre = 2; +} diff --git a/samples/testdata/singer_pb2.py b/samples/testdata/singer_pb2.py new file mode 100644 index 000000000..d2a328df0 --- /dev/null +++ b/samples/testdata/singer_pb2.py @@ -0,0 +1,27 @@ +# -*- coding: utf-8 -*- +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: singer.proto +"""Generated protocol buffer code.""" +from google.protobuf.internal import builder as _builder +from google.protobuf import descriptor as _descriptor +from google.protobuf import descriptor_pool as _descriptor_pool +from google.protobuf import symbol_database as _symbol_database +# @@protoc_insertion_point(imports) + +_sym_db = _symbol_database.Default() + + + + +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x0csinger.proto\x12\x17\x65xamples.bigtable.music\"E\n\x06Singer\x12\x0c\n\x04name\x18\x01 \x01(\t\x12-\n\x05genre\x18\x02 \x01(\x0e\x32\x1e.examples.bigtable.music.Genre*.\n\x05Genre\x12\x07\n\x03POP\x10\x00\x12\x08\n\x04JAZZ\x10\x01\x12\x08\n\x04\x46OLK\x10\x02\x12\x08\n\x04ROCK\x10\x03\x62\x06proto3') + +_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, globals()) +_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'singer_pb2', globals()) +if _descriptor._USE_C_DESCRIPTORS == False: + + DESCRIPTOR._options = None + _GENRE._serialized_start=112 + _GENRE._serialized_end=158 + _SINGER._serialized_start=41 + _SINGER._serialized_end=110 +# @@protoc_insertion_point(module_scope) diff --git a/tests/system/data/test_system_autogen.py b/tests/system/data/test_system_autogen.py index a78a8eb4c..44895808a 100644 --- a/tests/system/data/test_system_autogen.py +++ b/tests/system/data/test_system_autogen.py @@ -258,7 +258,7 @@ def test_mutation_set_cell(self, target, temp_rows): """Ensure cells can be set properly""" row_key = b"bulk_mutate" new_value = uuid.uuid4().hex.encode() - row_key, mutation = self._create_row_and_mutation( + (row_key, mutation) = self._create_row_and_mutation( target, temp_rows, new_value=new_value ) target.mutate_row(row_key, mutation) @@ -312,7 +312,7 @@ def test_bulk_mutations_set_cell(self, client, target, temp_rows): from google.cloud.bigtable.data.mutations import RowMutationEntry new_value = uuid.uuid4().hex.encode() - row_key, mutation = self._create_row_and_mutation( + (row_key, mutation) = self._create_row_and_mutation( target, temp_rows, new_value=new_value ) bulk_mutation = RowMutationEntry(row_key, [mutation]) @@ -347,11 +347,11 @@ def test_mutations_batcher_context_manager(self, client, target, temp_rows): """test batcher with context manager. Should flush on exit""" from google.cloud.bigtable.data.mutations import RowMutationEntry - new_value, new_value2 = [uuid.uuid4().hex.encode() for _ in range(2)] - row_key, mutation = self._create_row_and_mutation( + (new_value, new_value2) = [uuid.uuid4().hex.encode() for _ in range(2)] + (row_key, mutation) = self._create_row_and_mutation( target, temp_rows, new_value=new_value ) - row_key2, mutation2 = self._create_row_and_mutation( + (row_key2, mutation2) = self._create_row_and_mutation( target, temp_rows, new_value=new_value2 ) bulk_mutation = RowMutationEntry(row_key, [mutation]) @@ -372,7 +372,7 @@ def test_mutations_batcher_timer_flush(self, client, target, temp_rows): from google.cloud.bigtable.data.mutations import RowMutationEntry new_value = uuid.uuid4().hex.encode() - row_key, mutation = self._create_row_and_mutation( + (row_key, mutation) = self._create_row_and_mutation( target, temp_rows, new_value=new_value ) bulk_mutation = RowMutationEntry(row_key, [mutation]) @@ -394,12 +394,12 @@ def test_mutations_batcher_count_flush(self, client, target, temp_rows): """batch should flush after flush_limit_mutation_count mutations""" from google.cloud.bigtable.data.mutations import RowMutationEntry - new_value, new_value2 = [uuid.uuid4().hex.encode() for _ in range(2)] - row_key, mutation = self._create_row_and_mutation( + (new_value, new_value2) = [uuid.uuid4().hex.encode() for _ in range(2)] + (row_key, mutation) = self._create_row_and_mutation( target, temp_rows, new_value=new_value ) bulk_mutation = RowMutationEntry(row_key, [mutation]) - row_key2, mutation2 = self._create_row_and_mutation( + (row_key2, mutation2) = self._create_row_and_mutation( target, temp_rows, new_value=new_value2 ) bulk_mutation2 = RowMutationEntry(row_key2, [mutation2]) @@ -426,12 +426,12 @@ def test_mutations_batcher_bytes_flush(self, client, target, temp_rows): """batch should flush after flush_limit_bytes bytes""" from google.cloud.bigtable.data.mutations import RowMutationEntry - new_value, new_value2 = [uuid.uuid4().hex.encode() for _ in range(2)] - row_key, mutation = self._create_row_and_mutation( + (new_value, new_value2) = [uuid.uuid4().hex.encode() for _ in range(2)] + (row_key, mutation) = self._create_row_and_mutation( target, temp_rows, new_value=new_value ) bulk_mutation = RowMutationEntry(row_key, [mutation]) - row_key2, mutation2 = self._create_row_and_mutation( + (row_key2, mutation2) = self._create_row_and_mutation( target, temp_rows, new_value=new_value2 ) bulk_mutation2 = RowMutationEntry(row_key2, [mutation2]) @@ -457,11 +457,11 @@ def test_mutations_batcher_no_flush(self, client, target, temp_rows): new_value = uuid.uuid4().hex.encode() start_value = b"unchanged" - row_key, mutation = self._create_row_and_mutation( + (row_key, mutation) = self._create_row_and_mutation( target, temp_rows, start_value=start_value, new_value=new_value ) bulk_mutation = RowMutationEntry(row_key, [mutation]) - row_key2, mutation2 = self._create_row_and_mutation( + (row_key2, mutation2) = self._create_row_and_mutation( target, temp_rows, start_value=start_value, new_value=new_value ) bulk_mutation2 = RowMutationEntry(row_key2, [mutation2]) diff --git a/tests/unit/data/execute_query/sql_helpers.py b/tests/unit/data/execute_query/sql_helpers.py index 5d5569dba..119bb2d50 100644 --- a/tests/unit/data/execute_query/sql_helpers.py +++ b/tests/unit/data/execute_query/sql_helpers.py @@ -204,6 +204,18 @@ def date_type() -> Type: return t +def proto_type() -> Type: + t = Type() + t.proto_type = {} + return t + + +def enum_type() -> Type: + t = Type() + t.enum_type = {} + return t + + def array_type(elem_type: Type) -> Type: t = Type() arr_type = Type.Array() diff --git a/tests/unit/data/execute_query/test_execute_query_parameters_parsing.py b/tests/unit/data/execute_query/test_execute_query_parameters_parsing.py index ee0322272..0a1be1423 100644 --- a/tests/unit/data/execute_query/test_execute_query_parameters_parsing.py +++ b/tests/unit/data/execute_query/test_execute_query_parameters_parsing.py @@ -25,6 +25,7 @@ from google.cloud.bigtable.data.execute_query.metadata import SqlType from google.cloud.bigtable.data.execute_query.values import Struct from google.protobuf import timestamp_pb2 +from samples.testdata import singer_pb2 timestamp = int( datetime.datetime(2024, 5, 12, 17, 44, 12, tzinfo=datetime.timezone.utc).timestamp() @@ -267,6 +268,18 @@ def test_execute_query_parameters_not_supported_types(): {"test1": SqlType.Struct([("field1", SqlType.Int64())])}, ) + with pytest.raises(NotImplementedError, match="not supported"): + _format_execute_query_params( + {"test1": singer_pb2.Singer()}, + {"test1": SqlType.Proto()}, + ) + + with pytest.raises(NotImplementedError, match="not supported"): + _format_execute_query_params( + {"test1": singer_pb2.Genre.ROCK}, + {"test1": SqlType.Enum()}, + ) + def test_instance_execute_query_parameters_not_match(): with pytest.raises(ValueError, match="test2"): diff --git a/tests/unit/data/execute_query/test_query_result_parsing_utils.py b/tests/unit/data/execute_query/test_query_result_parsing_utils.py index 627570c37..ea03dfe9a 100644 --- a/tests/unit/data/execute_query/test_query_result_parsing_utils.py +++ b/tests/unit/data/execute_query/test_query_result_parsing_utils.py @@ -28,7 +28,8 @@ import datetime -from tests.unit.data.execute_query.sql_helpers import int64_type +from tests.unit.data.execute_query.sql_helpers import int64_type, proto_type, enum_type +from samples.testdata import singer_pb2 TYPE_BYTES = {"bytes_type": {}} TYPE_TIMESTAMP = {"timestamp_type": {}} @@ -82,9 +83,61 @@ def test_basic_types( assert type(metadata_type) is expected_metadata_type value = PBValue(value_dict) assert ( - _parse_pb_value_to_python_value(value._pb, metadata_type) == expected_value + _parse_pb_value_to_python_value(value._pb, metadata_type, "my_field") + == expected_value ) + def test__proto(self): + _type = PBType({"proto_type": {}}) + metadata_type = _pb_type_to_metadata_type(_type) + assert type(metadata_type) is SqlType.Proto + + singer = singer_pb2.Singer(name="John") + value = PBValue({"bytes_value": singer.SerializeToString()}) + + # without proto definition + result = _parse_pb_value_to_python_value( + value._pb, metadata_type, "proto_field" + ) + assert result == singer.SerializeToString() + result = _parse_pb_value_to_python_value( + value._pb, + metadata_type, + None, + {"proto_field": singer_pb2.Singer()}, + ) + assert result == singer.SerializeToString() + + # with proto definition + result = _parse_pb_value_to_python_value( + value._pb, + metadata_type, + "proto_field", + {"proto_field": singer_pb2.Singer()}, + ) + assert result == singer + + def test__enum(self): + _type = PBType({"enum_type": {}}) + metadata_type = _pb_type_to_metadata_type(_type) + assert type(metadata_type) is SqlType.Enum + + value = PBValue({"int_value": 1}) + + # without enum definition + result = _parse_pb_value_to_python_value(value._pb, metadata_type, "enum_field") + assert result == 1 + result = _parse_pb_value_to_python_value( + value._pb, metadata_type, None, {"enum_field": singer_pb2.Genre} + ) + assert result == 1 + + # with enum definition + result = _parse_pb_value_to_python_value( + value._pb, metadata_type, "enum_field", {"enum_field": singer_pb2.Genre} + ) + assert result == "JAZZ" + # Larger test cases were extracted for readability def test__array(self): _type = PBType({"array_type": {"element_type": int64_type()}}) @@ -103,7 +156,79 @@ def test__array(self): } } ) - assert _parse_pb_value_to_python_value(value._pb, metadata_type) == [1, 2, 3, 4] + assert _parse_pb_value_to_python_value( + value._pb, metadata_type, "array_field" + ) == [1, 2, 3, 4] + + def test__array_of_protos(self): + _type = PBType({"array_type": {"element_type": proto_type()}}) + metadata_type = _pb_type_to_metadata_type(_type) + assert type(metadata_type) is SqlType.Array + assert type(metadata_type.element_type) is SqlType.Proto + + singer1 = singer_pb2.Singer(name="John") + singer2 = singer_pb2.Singer(name="Taylor") + value = PBValue( + { + "array_value": { + "values": [ + {"bytes_value": singer1.SerializeToString()}, + {"bytes_value": singer2.SerializeToString()}, + ] + } + } + ) + + # without proto definition + result = _parse_pb_value_to_python_value( + value._pb, metadata_type, "array_field" + ) + assert result == [singer1.SerializeToString(), singer2.SerializeToString()] + result = _parse_pb_value_to_python_value( + value._pb, metadata_type, None, {"array_field": singer_pb2.Singer()} + ) + assert result == [singer1.SerializeToString(), singer2.SerializeToString()] + + # with proto definition + result = _parse_pb_value_to_python_value( + value._pb, + metadata_type, + "array_field", + {"array_field": singer_pb2.Singer()}, + ) + assert result == [singer1, singer2] + + def test__array_of_enums(self): + _type = PBType({"array_type": {"element_type": enum_type()}}) + metadata_type = _pb_type_to_metadata_type(_type) + assert type(metadata_type) is SqlType.Array + assert type(metadata_type.element_type) is SqlType.Enum + + value = PBValue( + { + "array_value": { + "values": [ + {"int_value": 0}, # POP + {"int_value": 1}, # JAZZ + ] + } + } + ) + + # without enum definition + result = _parse_pb_value_to_python_value( + value._pb, metadata_type, "array_field" + ) + assert result == [0, 1] + + # with enum definition + result = _parse_pb_value_to_python_value( + value._pb, + metadata_type, + "array_field", + {"array_field": singer_pb2.Genre}, + ) + assert result == ["POP", "JAZZ"] def test__struct(self): _type = PBType( @@ -164,7 +289,9 @@ def test__struct(self): with pytest.raises(KeyError, match="Ambigious field name"): metadata_type["field3"] - result = _parse_pb_value_to_python_value(value._pb, metadata_type) + result = _parse_pb_value_to_python_value( + value._pb, metadata_type, "struct_field" + ) assert isinstance(result, Struct) assert result["field1"] == result[0] == 1 assert result[1] == "test2" @@ -177,6 +304,87 @@ def test__struct(self): assert result[2] == [2, 3, 4, 5] assert result[3] == "test4" + def test__struct_with_proto_and_enum(self): + singer1 = singer_pb2.Singer(name="John") + singer2 = singer_pb2.Singer(name="Taylor") + _type = PBType( + { + "struct_type": { + "fields": [ + { + "field_name": "field1", + "type_": proto_type(), + }, + { + "field_name": None, + "type_": proto_type(), + }, + { + "field_name": "field2", + "type_": enum_type(), + }, + { + "field_name": None, + "type_": enum_type(), + }, + ] + } + } + ) + value = PBValue( + { + "array_value": { + "values": [ + {"bytes_value": singer1.SerializeToString()}, + {"bytes_value": singer2.SerializeToString()}, + {"int_value": 0}, + {"int_value": 1}, + ] + } + } + ) + + metadata_type = _pb_type_to_metadata_type(_type) + assert type(metadata_type) is SqlType.Struct + assert type(metadata_type["field1"]) is SqlType.Proto + assert type(metadata_type["field2"]) is SqlType.Enum + assert type(metadata_type[0]) is SqlType.Proto + assert type(metadata_type[1]) is SqlType.Proto + assert type(metadata_type[2]) is SqlType.Enum + assert type(metadata_type[3]) is SqlType.Enum + + # without proto definition + result = _parse_pb_value_to_python_value( + value._pb, metadata_type, "struct_field" + ) + assert isinstance(result, Struct) + assert result["field1"] == singer1.SerializeToString() + assert result["field2"] == 0 + assert result[0] == singer1.SerializeToString() + assert result[1] == singer2.SerializeToString() + assert result[2] == 0 + assert result[3] == 1 + + # with proto definition + result = _parse_pb_value_to_python_value( + value._pb, + metadata_type, + "struct_field", + { + "struct_field.field1": singer_pb2.Singer(), + "struct_field.field2": singer_pb2.Genre, + }, + ) + assert isinstance(result, Struct) + assert result["field1"] == singer1 + assert result["field2"] == "POP" + assert result[0] == singer1 + # unnamed proto fields won't get parsed + assert result[1] == singer2.SerializeToString() + assert result[2] == "POP" + # unnamed enum fields won't get parsed + assert result[3] == 1 + def test__array_of_structs(self): _type = PBType( { @@ -254,7 +462,9 @@ def test__array_of_structs(self): assert type(metadata_type.element_type[1]) is SqlType.String assert type(metadata_type.element_type["field3"]) is SqlType.Bool - result = _parse_pb_value_to_python_value(value._pb, metadata_type) + result = _parse_pb_value_to_python_value( + value._pb, metadata_type, "array_field" + ) assert isinstance(result, list) assert len(result) == 4 @@ -278,6 +488,106 @@ def test__array_of_structs(self): assert result[3][1] == "test4" assert not result[3]["field3"] + def test__array_of_structs_with_proto_and_enum(self): + singer1 = singer_pb2.Singer(name="John") + singer2 = singer_pb2.Singer(name="Taylor") + _type = PBType( + { + "array_type": { + "element_type": { + "struct_type": { + "fields": [ + { + "field_name": "proto_field", + "type_": proto_type(), + }, + { + "field_name": "enum_field", + "type_": enum_type(), + }, + { + "field_name": None, + "type_": proto_type(), + }, + ] + } + } + } + } + ) + value = PBValue( + { + "array_value": { + "values": [ + { + "array_value": { + "values": [ + {"bytes_value": singer1.SerializeToString()}, + {"int_value": 0}, # POP + {"bytes_value": singer1.SerializeToString()}, + ] + } + }, + { + "array_value": { + "values": [ + {"bytes_value": singer2.SerializeToString()}, + {"int_value": 1}, # JAZZ + {"bytes_value": singer2.SerializeToString()}, + ] + } + }, + ] + } + } + ) + + metadata_type = _pb_type_to_metadata_type(_type) + assert type(metadata_type) is SqlType.Array + assert type(metadata_type.element_type) is SqlType.Struct + assert type(metadata_type.element_type["proto_field"]) is SqlType.Proto + assert type(metadata_type.element_type["enum_field"]) is SqlType.Enum + assert type(metadata_type.element_type[2]) is SqlType.Proto + + # without proto definition + result = _parse_pb_value_to_python_value( + value._pb, metadata_type, "array_field" + ) + assert isinstance(result, list) + assert len(result) == 2 + assert isinstance(result[0], Struct) + assert result[0]["proto_field"] == singer1.SerializeToString() + assert result[0]["enum_field"] == 0 + assert result[0][2] == singer1.SerializeToString() + assert isinstance(result[1], Struct) + assert result[1]["proto_field"] == singer2.SerializeToString() + assert result[1]["enum_field"] == 1 + assert result[1][2] == singer2.SerializeToString() + + # with proto definition + result = _parse_pb_value_to_python_value( + value._pb, + metadata_type, + "array_field", + { + "array_field.proto_field": singer_pb2.Singer(), + "array_field.enum_field": singer_pb2.Genre, + "array_field": singer_pb2.Singer(), # unused + }, + ) + assert isinstance(result, list) + assert len(result) == 2 + assert isinstance(result[0], Struct) + assert result[0]["proto_field"] == singer1 + assert result[0]["enum_field"] == "POP" + # unnamed proto fields won't get parsed + assert result[0][2] == singer1.SerializeToString() + assert isinstance(result[1], Struct) + assert result[1]["proto_field"] == singer2 + assert result[1]["enum_field"] == "JAZZ" + # unnamed proto fields won't get parsed + assert result[1][2] == singer2.SerializeToString() + def test__map(self): _type = PBType( { @@ -333,7 +643,7 @@ def test__map(self): assert type(metadata_type.key_type) is SqlType.Int64 assert type(metadata_type.value_type) is SqlType.String - result = _parse_pb_value_to_python_value(value._pb, metadata_type) + result = _parse_pb_value_to_python_value(value._pb, metadata_type, "map_field") assert isinstance(result, dict) assert len(result) == 4 @@ -387,13 +697,135 @@ def test__map_repeated_values(self): ) metadata_type = _pb_type_to_metadata_type(_type) - result = _parse_pb_value_to_python_value(value._pb, metadata_type) + result = _parse_pb_value_to_python_value(value._pb, metadata_type, "map_field") assert len(result) == 1 assert result == { 1: "test3", } + def test__map_with_protos(self): + singer1 = singer_pb2.Singer(name="John") + singer2 = singer_pb2.Singer(name="Taylor") + _type = PBType( + { + "map_type": { + "key_type": int64_type(), + "value_type": proto_type(), + } + } + ) + value = PBValue( + { + "array_value": { + "values": [ + { + "array_value": { + "values": [ + {"int_value": 1}, + {"bytes_value": singer1.SerializeToString()}, + ] + } + }, + { + "array_value": { + "values": [ + {"int_value": 2}, + {"bytes_value": singer2.SerializeToString()}, + ] + } + }, + ] + } + } + ) + + metadata_type = _pb_type_to_metadata_type(_type) + assert type(metadata_type) is SqlType.Map + assert type(metadata_type.key_type) is SqlType.Int64 + assert type(metadata_type.value_type) is SqlType.Proto + + # without proto definition + result = _parse_pb_value_to_python_value(value._pb, metadata_type, "map_field") + assert isinstance(result, dict) + assert len(result) == 2 + assert result[1] == singer1.SerializeToString() + assert result[2] == singer2.SerializeToString() + + # with proto definition + result = _parse_pb_value_to_python_value( + value._pb, + metadata_type, + "map_field", + { + "map_field.value": singer_pb2.Singer(), + }, + ) + assert isinstance(result, dict) + assert len(result) == 2 + assert result[1] == singer1 + assert result[2] == singer2 + + def test__map_with_enums(self): + _type = PBType( + { + "map_type": { + "key_type": int64_type(), + "value_type": enum_type(), + } + } + ) + value = PBValue( + { + "array_value": { + "values": [ + { + "array_value": { + "values": [ + {"int_value": 1}, + {"int_value": 0}, # POP + ] + } + }, + { + "array_value": { + "values": [ + {"int_value": 2}, + {"int_value": 1}, # JAZZ + ] + } + }, + ] + } + } + ) + + metadata_type = _pb_type_to_metadata_type(_type) + assert type(metadata_type) is SqlType.Map + assert type(metadata_type.key_type) is SqlType.Int64 + assert type(metadata_type.value_type) is SqlType.Enum + + # without enum definition + result = _parse_pb_value_to_python_value(value._pb, metadata_type, "map_field") + assert isinstance(result, dict) + assert len(result) == 2 + assert result[1] == 0 + assert result[2] == 1 + + # with enum definition + result = _parse_pb_value_to_python_value( + value._pb, + metadata_type, + "map_field", + { + "map_field.value": singer_pb2.Genre, + }, + ) + assert isinstance(result, dict) + assert len(result) == 2 + assert result[1] == "POP" + assert result[2] == "JAZZ" + def test__map_of_maps_of_structs(self): _type = PBType( { @@ -539,7 +971,7 @@ def test__map_of_maps_of_structs(self): assert type(metadata_type.value_type.value_type) is SqlType.Struct assert type(metadata_type.value_type.value_type["field1"]) is SqlType.Int64 assert type(metadata_type.value_type.value_type["field2"]) is SqlType.String - result = _parse_pb_value_to_python_value(value._pb, metadata_type) + result = _parse_pb_value_to_python_value(value._pb, metadata_type, "map_field") assert result[1]["1_1"]["field1"] == 1 assert result[1]["1_1"]["field2"] == "test1" @@ -553,23 +985,31 @@ def test__map_of_maps_of_structs(self): assert result[2]["2_2"]["field1"] == 4 assert result[2]["2_2"]["field2"] == "test4" - def test__map_of_lists_of_structs(self): + def test__map_of_maps_of_structs_with_proto_and_enum(self): + singer1 = singer_pb2.Singer(name="John") + singer2 = singer_pb2.Singer(name="Taylor") + _type = PBType( { "map_type": { - "key_type": TYPE_BYTES, + "key_type": int64_type(), "value_type": { - "array_type": { - "element_type": { + "map_type": { + "key_type": {"string_type": {}}, + "value_type": { "struct_type": { "fields": [ { - "field_name": "timestamp", - "type_": TYPE_TIMESTAMP, + "field_name": "int_field", + "type_": int64_type(), }, { - "field_name": "value", - "type_": TYPE_BYTES, + "field_name": "singer", + "type_": proto_type(), + }, + { + "field_name": "genre", + "type_": enum_type(), }, ] } @@ -582,20 +1022,225 @@ def test__map_of_lists_of_structs(self): value = PBValue( { "array_value": { - "values": [ # list of (byte, list) tuples + "values": [ # list of (int, map) tuples { "array_value": { - "values": [ # (byte, list) tuple - {"bytes_value": b"key1"}, + "values": [ # (int, map) tuples + {"int_value": 1}, { "array_value": { - "values": [ # list of structs + "values": [ # list of (str, struct) tuples { "array_value": { - "values": [ # (timestamp, bytes) tuple + "values": [ # (str, struct) tuples + {"string_value": "1_1"}, { - "timestamp_value": { - "seconds": 1111111111 + "array_value": { + "values": [ + { + "int_value": 12 + }, + { + "bytes_value": singer1.SerializeToString() + }, + { + "int_value": 0 + }, + ] + } + }, + ] + } + }, + { + "array_value": { + "values": [ # (str, struct) tuples + {"string_value": "1_2"}, + { + "array_value": { + "values": [ + { + "int_value": 34 + }, + { + "bytes_value": singer2.SerializeToString() + }, + { + "int_value": 1 + }, + ] + } + }, + ] + } + }, + ] + } + }, + ] + } + }, + { + "array_value": { + "values": [ # (int, map) tuples + {"int_value": 2}, + { + "array_value": { + "values": [ # list of (str, struct) tuples + { + "array_value": { + "values": [ # (str, struct) tuples + {"string_value": "2_1"}, + { + "array_value": { + "values": [ + { + "int_value": 56 + }, + { + "bytes_value": singer1.SerializeToString() + }, + { + "int_value": 2 + }, + ] + } + }, + ] + } + }, + { + "array_value": { + "values": [ # (str, struct) tuples + {"string_value": "2_2"}, + { + "array_value": { + "values": [ + { + "int_value": 78 + }, + { + "bytes_value": singer2.SerializeToString() + }, + { + "int_value": 3 + }, + ] + } + }, + ] + } + }, + ] + } + }, + ] + } + }, + ] + } + } + ) + + metadata_type = _pb_type_to_metadata_type(_type) + assert type(metadata_type) is SqlType.Map + assert type(metadata_type.key_type) is SqlType.Int64 + assert type(metadata_type.value_type) is SqlType.Map + assert type(metadata_type.value_type.key_type) is SqlType.String + assert type(metadata_type.value_type.value_type) is SqlType.Struct + assert type(metadata_type.value_type.value_type["int_field"]) is SqlType.Int64 + assert type(metadata_type.value_type.value_type["singer"]) is SqlType.Proto + assert type(metadata_type.value_type.value_type["genre"]) is SqlType.Enum + + # without proto definition + result = _parse_pb_value_to_python_value(value._pb, metadata_type, "map_field") + + assert result[1]["1_1"]["int_field"] == 12 + assert result[1]["1_1"]["singer"] == singer1.SerializeToString() + assert result[1]["1_1"]["genre"] == 0 + + assert result[1]["1_2"]["int_field"] == 34 + assert result[1]["1_2"]["singer"] == singer2.SerializeToString() + assert result[1]["1_2"]["genre"] == 1 + + assert result[2]["2_1"]["int_field"] == 56 + assert result[2]["2_1"]["singer"] == singer1.SerializeToString() + assert result[2]["2_1"]["genre"] == 2 + + assert result[2]["2_2"]["int_field"] == 78 + assert result[2]["2_2"]["singer"] == singer2.SerializeToString() + assert result[2]["2_2"]["genre"] == 3 + + # with proto definition + result = _parse_pb_value_to_python_value( + value._pb, + metadata_type, + "map_field", + { + "map_field.value.value.singer": singer_pb2.Singer(), + "map_field.value.value.genre": singer_pb2.Genre, + }, + ) + + assert result[1]["1_1"]["int_field"] == 12 + assert result[1]["1_1"]["singer"] == singer1 + assert result[1]["1_1"]["genre"] == "POP" + + assert result[1]["1_2"]["int_field"] == 34 + assert result[1]["1_2"]["singer"] == singer2 + assert result[1]["1_2"]["genre"] == "JAZZ" + + assert result[2]["2_1"]["int_field"] == 56 + assert result[2]["2_1"]["singer"] == singer1 + assert result[2]["2_1"]["genre"] == "FOLK" + + assert result[2]["2_2"]["int_field"] == 78 + assert result[2]["2_2"]["singer"] == singer2 + assert result[2]["2_2"]["genre"] == "ROCK" + + def test__map_of_lists_of_structs(self): + _type = PBType( + { + "map_type": { + "key_type": TYPE_BYTES, + "value_type": { + "array_type": { + "element_type": { + "struct_type": { + "fields": [ + { + "field_name": "timestamp", + "type_": TYPE_TIMESTAMP, + }, + { + "field_name": "value", + "type_": TYPE_BYTES, + }, + ] + } + }, + } + }, + } + } + ) + value = PBValue( + { + "array_value": { + "values": [ # list of (byte, list) tuples + { + "array_value": { + "values": [ # (byte, list) tuple + {"bytes_value": b"key1"}, + { + "array_value": { + "values": [ # list of structs + { + "array_value": { + "values": [ # (timestamp, bytes) tuple + { + "timestamp_value": { + "seconds": 1111111111 } }, { @@ -679,7 +1324,7 @@ def test__map_of_lists_of_structs(self): is SqlType.Timestamp ) assert type(metadata_type.value_type.element_type["value"]) is SqlType.Bytes - result = _parse_pb_value_to_python_value(value._pb, metadata_type) + result = _parse_pb_value_to_python_value(value._pb, metadata_type, "map_field") timestamp1 = DatetimeWithNanoseconds( 2005, 3, 18, 1, 58, 31, tzinfo=datetime.timezone.utc @@ -703,6 +1348,341 @@ def test__map_of_lists_of_structs(self): assert result[b"key2"][1]["timestamp"] == timestamp4 assert result[b"key2"][1]["value"] == b"key2-value2" + def test__map_of_lists_of_structs_with_protos(self): + singer1 = singer_pb2.Singer(name="John") + singer2 = singer_pb2.Singer(name="Taylor") + singer3 = singer_pb2.Singer(name="Jay") + singer4 = singer_pb2.Singer(name="Eric") + + _type = PBType( + { + "map_type": { + "key_type": TYPE_BYTES, + "value_type": { + "array_type": { + "element_type": { + "struct_type": { + "fields": [ + { + "field_name": "timestamp", + "type_": TYPE_TIMESTAMP, + }, + { + "field_name": "value", + "type_": proto_type(), + }, + ] + } + }, + } + }, + } + } + ) + value = PBValue( + { + "array_value": { + "values": [ # list of (byte, list) tuples + { + "array_value": { + "values": [ # (byte, list) tuple + {"bytes_value": b"key1"}, + { + "array_value": { + "values": [ # list of structs + { + "array_value": { + "values": [ # (timestamp, bytes) tuple + { + "timestamp_value": { + "seconds": 1111111111 + } + }, + { + "bytes_value": singer1.SerializeToString() + }, + ] + } + }, + { + "array_value": { + "values": [ # (timestamp, bytes) tuple + { + "timestamp_value": { + "seconds": 2222222222 + } + }, + { + "bytes_value": singer2.SerializeToString() + }, + ] + } + }, + ] + } + }, + ] + } + }, + { + "array_value": { + "values": [ # (byte, list) tuple + {"bytes_value": b"key2"}, + { + "array_value": { + "values": [ # list of structs + { + "array_value": { + "values": [ # (timestamp, bytes) tuple + { + "timestamp_value": { + "seconds": 3333333333 + } + }, + { + "bytes_value": singer3.SerializeToString() + }, + ] + } + }, + { + "array_value": { + "values": [ # (timestamp, bytes) tuple + { + "timestamp_value": { + "seconds": 4444444444 + } + }, + { + "bytes_value": singer4.SerializeToString() + }, + ] + } + }, + ] + } + }, + ] + } + }, + ] + } + } + ) + metadata_type = _pb_type_to_metadata_type(_type) + assert type(metadata_type) is SqlType.Map + assert type(metadata_type.key_type) is SqlType.Bytes + assert type(metadata_type.value_type) is SqlType.Array + assert type(metadata_type.value_type.element_type) is SqlType.Struct + assert ( + type(metadata_type.value_type.element_type["timestamp"]) + is SqlType.Timestamp + ) + assert type(metadata_type.value_type.element_type["value"]) is SqlType.Proto + + timestamp1 = DatetimeWithNanoseconds( + 2005, 3, 18, 1, 58, 31, tzinfo=datetime.timezone.utc + ) + timestamp2 = DatetimeWithNanoseconds( + 2040, 6, 2, 3, 57, 2, tzinfo=datetime.timezone.utc + ) + timestamp3 = DatetimeWithNanoseconds( + 2075, 8, 18, 5, 55, 33, tzinfo=datetime.timezone.utc + ) + timestamp4 = DatetimeWithNanoseconds( + 2110, 11, 3, 7, 54, 4, tzinfo=datetime.timezone.utc + ) + + # without proto definition + result = _parse_pb_value_to_python_value(value._pb, metadata_type, "map_field") + assert result[b"key1"][0]["timestamp"] == timestamp1 + assert result[b"key1"][0]["value"] == singer1.SerializeToString() + assert result[b"key1"][1]["timestamp"] == timestamp2 + assert result[b"key1"][1]["value"] == singer2.SerializeToString() + assert result[b"key2"][0]["timestamp"] == timestamp3 + assert result[b"key2"][0]["value"] == singer3.SerializeToString() + assert result[b"key2"][1]["timestamp"] == timestamp4 + assert result[b"key2"][1]["value"] == singer4.SerializeToString() + + # with proto definition + result = _parse_pb_value_to_python_value( + value._pb, + metadata_type, + "map_field", + { + "map_field.value.value": singer_pb2.Singer(), + }, + ) + assert result[b"key1"][0]["timestamp"] == timestamp1 + assert result[b"key1"][0]["value"] == singer1 + assert result[b"key1"][1]["timestamp"] == timestamp2 + assert result[b"key1"][1]["value"] == singer2 + assert result[b"key2"][0]["timestamp"] == timestamp3 + assert result[b"key2"][0]["value"] == singer3 + assert result[b"key2"][1]["timestamp"] == timestamp4 + assert result[b"key2"][1]["value"] == singer4 + + def test__map_of_lists_of_structs_with_enums(self): + _type = PBType( + { + "map_type": { + "key_type": TYPE_BYTES, + "value_type": { + "array_type": { + "element_type": { + "struct_type": { + "fields": [ + { + "field_name": "timestamp", + "type_": TYPE_TIMESTAMP, + }, + { + "field_name": "value", + "type_": enum_type(), + }, + ] + } + }, + } + }, + } + } + ) + value = PBValue( + { + "array_value": { + "values": [ # list of (byte, list) tuples + { + "array_value": { + "values": [ # (byte, list) tuple + {"bytes_value": b"key1"}, + { + "array_value": { + "values": [ # list of structs + { + "array_value": { + "values": [ # (timestamp, bytes) tuple + { + "timestamp_value": { + "seconds": 1111111111 + } + }, + {"int_value": 0}, + ] + } + }, + { + "array_value": { + "values": [ # (timestamp, bytes) tuple + { + "timestamp_value": { + "seconds": 2222222222 + } + }, + {"int_value": 1}, + ] + } + }, + ] + } + }, + ] + } + }, + { + "array_value": { + "values": [ # (byte, list) tuple + {"bytes_value": b"key2"}, + { + "array_value": { + "values": [ # list of structs + { + "array_value": { + "values": [ # (timestamp, bytes) tuple + { + "timestamp_value": { + "seconds": 3333333333 + } + }, + {"int_value": 2}, + ] + } + }, + { + "array_value": { + "values": [ # (timestamp, bytes) tuple + { + "timestamp_value": { + "seconds": 4444444444 + } + }, + {"int_value": 3}, + ] + } + }, + ] + } + }, + ] + } + }, + ] + } + } + ) + metadata_type = _pb_type_to_metadata_type(_type) + assert type(metadata_type) is SqlType.Map + assert type(metadata_type.key_type) is SqlType.Bytes + assert type(metadata_type.value_type) is SqlType.Array + assert type(metadata_type.value_type.element_type) is SqlType.Struct + assert ( + type(metadata_type.value_type.element_type["timestamp"]) + is SqlType.Timestamp + ) + assert type(metadata_type.value_type.element_type["value"]) is SqlType.Enum + + timestamp1 = DatetimeWithNanoseconds( + 2005, 3, 18, 1, 58, 31, tzinfo=datetime.timezone.utc + ) + timestamp2 = DatetimeWithNanoseconds( + 2040, 6, 2, 3, 57, 2, tzinfo=datetime.timezone.utc + ) + timestamp3 = DatetimeWithNanoseconds( + 2075, 8, 18, 5, 55, 33, tzinfo=datetime.timezone.utc + ) + timestamp4 = DatetimeWithNanoseconds( + 2110, 11, 3, 7, 54, 4, tzinfo=datetime.timezone.utc + ) + + # without enum definition + result = _parse_pb_value_to_python_value(value._pb, metadata_type, "map_field") + assert result[b"key1"][0]["timestamp"] == timestamp1 + assert result[b"key1"][0]["value"] == 0 + assert result[b"key1"][1]["timestamp"] == timestamp2 + assert result[b"key1"][1]["value"] == 1 + assert result[b"key2"][0]["timestamp"] == timestamp3 + assert result[b"key2"][0]["value"] == 2 + assert result[b"key2"][1]["timestamp"] == timestamp4 + assert result[b"key2"][1]["value"] == 3 + + # with enum definition + result = _parse_pb_value_to_python_value( + value._pb, + metadata_type, + "map_field", + { + "map_field.value.value": singer_pb2.Genre, + }, + ) + assert result[b"key1"][0]["timestamp"] == timestamp1 + assert result[b"key1"][0]["value"] == "POP" + assert result[b"key1"][1]["timestamp"] == timestamp2 + assert result[b"key1"][1]["value"] == "JAZZ" + assert result[b"key2"][0]["timestamp"] == timestamp3 + assert result[b"key2"][0]["value"] == "FOLK" + assert result[b"key2"][1]["timestamp"] == timestamp4 + assert result[b"key2"][1]["value"] == "ROCK" + def test__invalid_type_throws_exception(self): _type = PBType({"string_type": {}}) value = PBValue({"int_value": 1}) @@ -712,4 +1692,4 @@ def test__invalid_type_throws_exception(self): ValueError, match="string_value field for String type not found in a Value.", ): - _parse_pb_value_to_python_value(value._pb, metadata_type) + _parse_pb_value_to_python_value(value._pb, metadata_type, "string_field") diff --git a/tests/unit/data/execute_query/test_query_result_row_reader.py b/tests/unit/data/execute_query/test_query_result_row_reader.py index 6adb1e3c7..ab98b54bd 100644 --- a/tests/unit/data/execute_query/test_query_result_row_reader.py +++ b/tests/unit/data/execute_query/test_query_result_row_reader.py @@ -32,7 +32,9 @@ metadata, proto_rows_bytes, str_val, + bytes_val, ) +from samples.testdata import singer_pb2 class TestQueryResultRowReader: @@ -116,8 +118,8 @@ def test__received_values_are_passed_to_parser_in_batches(self): reader.consume([proto_rows_bytes(int_val(1), int_val(2))], metadata) parse_mock.assert_has_calls( [ - mock.call(PBValue(int_val(1)), SqlType.Int64()), - mock.call(PBValue(int_val(2)), SqlType.Int64()), + mock.call(PBValue(int_val(1)), SqlType.Int64(), "test1", None), + mock.call(PBValue(int_val(2)), SqlType.Int64(), "test2", None), ] ) @@ -137,7 +139,7 @@ def test__parser_errors_are_forwarded(self): parse_mock.assert_has_calls( [ - mock.call(PBValue(values[0]), SqlType.Int64()), + mock.call(PBValue(values[0]), SqlType.Int64(), "test1", None), ] ) @@ -243,6 +245,40 @@ def test_multiple_batches(self): assert row4["test1"] == 7 assert row4["test2"] == 8 + def test_multiple_batches_with_proto_and_enum_types(self): + singer1 = singer_pb2.Singer(name="John") + singer2 = singer_pb2.Singer(name="Taylor") + singer3 = singer_pb2.Singer(name="Jay") + singer4 = singer_pb2.Singer(name="Eric") + + reader = _QueryResultRowReader() + batches = [ + proto_rows_bytes( + bytes_val(singer1.SerializeToString()), + int_val(0), + bytes_val(singer2.SerializeToString()), + int_val(1), + ), + proto_rows_bytes(bytes_val(singer3.SerializeToString()), int_val(2)), + proto_rows_bytes(bytes_val(singer4.SerializeToString()), int_val(3)), + ] + + results = reader.consume( + batches, + Metadata([("singer", SqlType.Proto()), ("genre", SqlType.Enum())]), + {"singer": singer_pb2.Singer(), "genre": singer_pb2.Genre}, + ) + assert len(results) == 4 + [row1, row2, row3, row4] = results + assert row1["singer"] == singer1 + assert row1["genre"] == "POP" + assert row2["singer"] == singer2 + assert row2["genre"] == "JAZZ" + assert row3["singer"] == singer3 + assert row3["genre"] == "FOLK" + assert row4["singer"] == singer4 + assert row4["genre"] == "ROCK" + class TestMetadata: def test__duplicate_column_names(self): From 145110f8529434aa8178afeecefb662f8db07263 Mon Sep 17 00:00:00 2001 From: Daniel Sanche Date: Fri, 26 Sep 2025 11:12:39 -0700 Subject: [PATCH 6/8] chore(tests): prefer bytes for mutation fields (#1207) * chore(tests): prefer bytes for mutation fields * decode instead of encode --- samples/hello/async_main.py | 8 ++++---- samples/hello/main.py | 17 +++++++++-------- 2 files changed, 13 insertions(+), 12 deletions(-) diff --git a/samples/hello/async_main.py b/samples/hello/async_main.py index 34159bedb..af95898e5 100644 --- a/samples/hello/async_main.py +++ b/samples/hello/async_main.py @@ -57,7 +57,7 @@ async def main(project_id, instance_id, table_id): # Create a column family with GC policy : most recent N versions # Define the GC policy to retain only the most recent 2 versions max_versions_rule = column_family.MaxVersionsGCRule(2) - column_family_id = "cf1" + column_family_id = b"cf1" column_families = {column_family_id: max_versions_rule} if not admin_table.exists(): admin_table.create(column_families=column_families) @@ -70,9 +70,9 @@ async def main(project_id, instance_id, table_id): wait_for_table(admin_table) # [START bigtable_async_hw_write_rows] print("Writing some greetings to the table.") - greetings = ["Hello World!", "Hello Cloud Bigtable!", "Hello Python!"] + greetings = [b"Hello World!", b"Hello Cloud Bigtable!", b"Hello Python!"] mutations = [] - column = "greeting" + column = b"greeting" for i, value in enumerate(greetings): # Note: This example uses sequential numeric IDs for simplicity, # but this can result in poor performance in a production @@ -84,7 +84,7 @@ async def main(project_id, instance_id, table_id): # the best performance, see the documentation: # # https://cloud.google.com/bigtable/docs/schema-design - row_key = "greeting{}".format(i).encode() + row_key = f"greeting{i}".encode() row_mutation = bigtable.data.RowMutationEntry( row_key, bigtable.data.SetCell(column_family_id, column, value) ) diff --git a/samples/hello/main.py b/samples/hello/main.py index 41124e826..7a193ba6f 100644 --- a/samples/hello/main.py +++ b/samples/hello/main.py @@ -57,7 +57,7 @@ def main(project_id, instance_id, table_id): # Create a column family with GC policy : most recent N versions # Define the GC policy to retain only the most recent 2 versions max_versions_rule = bigtable.column_family.MaxVersionsGCRule(2) - column_family_id = "cf1" + column_family_id = b"cf1" column_families = {column_family_id: max_versions_rule} if not table.exists(): table.create(column_families=column_families) @@ -71,9 +71,9 @@ def main(project_id, instance_id, table_id): # [START bigtable_hw_write_rows] print("Writing some greetings to the table.") - greetings = ["Hello World!", "Hello Cloud Bigtable!", "Hello Python!"] + greetings = [b"Hello World!", b"Hello Cloud Bigtable!", b"Hello Python!"] rows = [] - column = "greeting".encode() + column = b"greeting" for i, value in enumerate(greetings): # Note: This example uses sequential numeric IDs for simplicity, # but this can result in poor performance in a production @@ -85,10 +85,10 @@ def main(project_id, instance_id, table_id): # the best performance, see the documentation: # # https://cloud.google.com/bigtable/docs/schema-design - row_key = "greeting{}".format(i).encode() + row_key = f"greeting{i}".encode() row = table.direct_row(row_key) row.set_cell( - column_family_id, column, value, timestamp=datetime.datetime.utcnow() + column_family_id, column, value, timestamp=datetime.datetime.utcnow(), ) rows.append(row) table.mutate_rows(rows) @@ -103,10 +103,10 @@ def main(project_id, instance_id, table_id): # [START bigtable_hw_get_with_filter] # [START bigtable_hw_get_by_key] print("Getting a single greeting by row key.") - key = "greeting0".encode() + key = b"greeting0" row = table.read_row(key, row_filter) - cell = row.cells[column_family_id][column][0] + cell = row.cells[column_family_id.decode("utf-8")][column][0] print(cell.value.decode("utf-8")) # [END bigtable_hw_get_by_key] # [END bigtable_hw_get_with_filter] @@ -117,7 +117,8 @@ def main(project_id, instance_id, table_id): partial_rows = table.read_rows(filter_=row_filter) for row in partial_rows: - cell = row.cells[column_family_id][column][0] + column_family_id_str = column_family_id.decode("utf-8") + cell = row.cells[column_family_id_str][column][0] print(cell.value.decode("utf-8")) # [END bigtable_hw_scan_all] # [END bigtable_hw_scan_with_filter] From bbfd746c61a6362efa42c7899ec3e34ceb541c83 Mon Sep 17 00:00:00 2001 From: Jack Dingilian Date: Mon, 6 Oct 2025 18:33:05 -0400 Subject: [PATCH 7/8] fix: Fix instance registration cleanup on early iterator termination (#1216) --- google/cloud/bigtable/data/_async/client.py | 35 +++-- .../bigtable/data/_sync_autogen/client.py | 31 +++-- .../_async/execute_query_iterator.py | 88 +++++++------ .../_sync_autogen/execute_query_iterator.py | 68 ++++++---- tests/unit/data/_async/test_client.py | 20 +-- tests/unit/data/_sync_autogen/test_client.py | 20 +-- .../_async/test_query_iterator.py | 121 ++++++++++++++++++ .../_sync_autogen/test_query_iterator.py | 103 +++++++++++++++ 8 files changed, 377 insertions(+), 109 deletions(-) diff --git a/google/cloud/bigtable/data/_async/client.py b/google/cloud/bigtable/data/_async/client.py index 516e20eb3..0af7154a6 100644 --- a/google/cloud/bigtable/data/_async/client.py +++ b/google/cloud/bigtable/data/_async/client.py @@ -476,7 +476,8 @@ async def _manage_channel( async def _register_instance( self, instance_id: str, - owner: _DataApiTargetAsync | ExecuteQueryIteratorAsync, + app_profile_id: Optional[str], + owner_id: int, ) -> None: """ Registers an instance with the client, and warms the channel for the instance @@ -486,13 +487,15 @@ async def _register_instance( Args: instance_id: id of the instance to register. - owner: table that owns the instance. Owners will be tracked in + app_profile_id: id of the app profile calling the instance. + owner_id: integer id of the object owning the instance. Owners will be tracked in _instance_owners, and instances will only be unregistered when all - owners call _remove_instance_registration + owners call _remove_instance_registration. Can be obtained by calling + `id` identity funcion, using `id(owner)` """ instance_name = self._gapic_client.instance_path(self.project, instance_id) - instance_key = _WarmedInstanceKey(instance_name, owner.app_profile_id) - self._instance_owners.setdefault(instance_key, set()).add(id(owner)) + instance_key = _WarmedInstanceKey(instance_name, app_profile_id) + self._instance_owners.setdefault(instance_key, set()).add(owner_id) if instance_key not in self._active_instances: self._active_instances.add(instance_key) if self._channel_refresh_task: @@ -510,10 +513,11 @@ async def _register_instance( "_DataApiTargetAsync": "_DataApiTarget", } ) - async def _remove_instance_registration( + def _remove_instance_registration( self, instance_id: str, - owner: _DataApiTargetAsync | ExecuteQueryIteratorAsync, + app_profile_id: Optional[str], + owner_id: int, ) -> bool: """ Removes an instance from the client's registered instances, to prevent @@ -523,17 +527,17 @@ async def _remove_instance_registration( Args: instance_id: id of the instance to remove - owner: table that owns the instance. Owners will be tracked in - _instance_owners, and instances will only be unregistered when all - owners call _remove_instance_registration + app_profile_id: id of the app profile calling the instance. + owner_id: integer id of the object owning the instance. Can be + obtained by the `id` identity funcion, using `id(owner)`. Returns: bool: True if instance was removed, else False """ instance_name = self._gapic_client.instance_path(self.project, instance_id) - instance_key = _WarmedInstanceKey(instance_name, owner.app_profile_id) + instance_key = _WarmedInstanceKey(instance_name, app_profile_id) owner_list = self._instance_owners.get(instance_key, set()) try: - owner_list.remove(id(owner)) + owner_list.remove(owner_id) if len(owner_list) == 0: self._active_instances.remove(instance_key) return True @@ -1014,7 +1018,8 @@ def __init__( self._register_instance_future = CrossSync.create_task( self.client._register_instance, self.instance_id, - self, + self.app_profile_id, + id(self), sync_executor=self.client._executor, ) except RuntimeError as e: @@ -1725,7 +1730,9 @@ async def close(self): """ if self._register_instance_future: self._register_instance_future.cancel() - await self.client._remove_instance_registration(self.instance_id, self) + self.client._remove_instance_registration( + self.instance_id, self.app_profile_id, id(self) + ) @CrossSync.convert(sync_name="__enter__") async def __aenter__(self): diff --git a/google/cloud/bigtable/data/_sync_autogen/client.py b/google/cloud/bigtable/data/_sync_autogen/client.py index a168f360d..adc849649 100644 --- a/google/cloud/bigtable/data/_sync_autogen/client.py +++ b/google/cloud/bigtable/data/_sync_autogen/client.py @@ -354,7 +354,7 @@ def _manage_channel( next_sleep = max(next_refresh - (time.monotonic() - start_timestamp), 0) def _register_instance( - self, instance_id: str, owner: _DataApiTarget | ExecuteQueryIterator + self, instance_id: str, app_profile_id: Optional[str], owner_id: int ) -> None: """Registers an instance with the client, and warms the channel for the instance The client will periodically refresh grpc channel used to make @@ -363,12 +363,14 @@ def _register_instance( Args: instance_id: id of the instance to register. - owner: table that owns the instance. Owners will be tracked in + app_profile_id: id of the app profile calling the instance. + owner_id: integer id of the object owning the instance. Owners will be tracked in _instance_owners, and instances will only be unregistered when all - owners call _remove_instance_registration""" + owners call _remove_instance_registration. Can be obtained by calling + `id` identity funcion, using `id(owner)`""" instance_name = self._gapic_client.instance_path(self.project, instance_id) - instance_key = _WarmedInstanceKey(instance_name, owner.app_profile_id) - self._instance_owners.setdefault(instance_key, set()).add(id(owner)) + instance_key = _WarmedInstanceKey(instance_name, app_profile_id) + self._instance_owners.setdefault(instance_key, set()).add(owner_id) if instance_key not in self._active_instances: self._active_instances.add(instance_key) if self._channel_refresh_task: @@ -377,7 +379,7 @@ def _register_instance( self._start_background_channel_refresh() def _remove_instance_registration( - self, instance_id: str, owner: _DataApiTarget | ExecuteQueryIterator + self, instance_id: str, app_profile_id: Optional[str], owner_id: int ) -> bool: """Removes an instance from the client's registered instances, to prevent warming new channels for the instance @@ -386,16 +388,16 @@ def _remove_instance_registration( Args: instance_id: id of the instance to remove - owner: table that owns the instance. Owners will be tracked in - _instance_owners, and instances will only be unregistered when all - owners call _remove_instance_registration + app_profile_id: id of the app profile calling the instance. + owner_id: integer id of the object owning the instance. Can be + obtained by the `id` identity funcion, using `id(owner)`. Returns: bool: True if instance was removed, else False""" instance_name = self._gapic_client.instance_path(self.project, instance_id) - instance_key = _WarmedInstanceKey(instance_name, owner.app_profile_id) + instance_key = _WarmedInstanceKey(instance_name, app_profile_id) owner_list = self._instance_owners.get(instance_key, set()) try: - owner_list.remove(id(owner)) + owner_list.remove(owner_id) if len(owner_list) == 0: self._active_instances.remove(instance_key) return True @@ -806,7 +808,8 @@ def __init__( self._register_instance_future = CrossSync._Sync_Impl.create_task( self.client._register_instance, self.instance_id, - self, + self.app_profile_id, + id(self), sync_executor=self.client._executor, ) except RuntimeError as e: @@ -1460,7 +1463,9 @@ def close(self): """Called to close the Table instance and release any resources held by it.""" if self._register_instance_future: self._register_instance_future.cancel() - self.client._remove_instance_registration(self.instance_id, self) + self.client._remove_instance_registration( + self.instance_id, self.app_profile_id, id(self) + ) def __enter__(self): """Implement async context manager protocol diff --git a/google/cloud/bigtable/data/execute_query/_async/execute_query_iterator.py b/google/cloud/bigtable/data/execute_query/_async/execute_query_iterator.py index 41900bb12..2beda4cd6 100644 --- a/google/cloud/bigtable/data/execute_query/_async/execute_query_iterator.py +++ b/google/cloud/bigtable/data/execute_query/_async/execute_query_iterator.py @@ -127,6 +127,7 @@ def __init__( self.has_received_token = False self._result_generator = self._next_impl() self._register_instance_task = None + self._fully_consumed = False self._is_closed = False self._request_body = request_body self._attempt_timeout_gen = _attempt_timeout_generator( @@ -145,7 +146,8 @@ def __init__( self._register_instance_task = CrossSync.create_task( self._client._register_instance, self._instance_id, - self, + self.app_profile_id, + id(self), sync_executor=self._client._executor, ) except RuntimeError as e: @@ -193,39 +195,42 @@ async def _next_impl(self) -> CrossSync.Iterator[QueryResultRow]: Generator wrapping the response stream which parses the stream results and returns full `QueryResultRow`s. """ - async for response in self._stream: - try: - # we've received a resume token, so we can finalize the metadata - if self._final_metadata is None and _has_resume_token(response): - self._finalize_metadata() - - batches_to_parse = self._byte_cursor.consume(response) - if not batches_to_parse: - continue - # metadata must be set at this point since there must be a resume_token - # for byte_cursor to yield data - if not self.metadata: - raise ValueError( - "Error parsing response before finalizing metadata" + try: + async for response in self._stream: + try: + # we've received a resume token, so we can finalize the metadata + if self._final_metadata is None and _has_resume_token(response): + self._finalize_metadata() + + batches_to_parse = self._byte_cursor.consume(response) + if not batches_to_parse: + continue + # metadata must be set at this point since there must be a resume_token + # for byte_cursor to yield data + if not self.metadata: + raise ValueError( + "Error parsing response before finalizing metadata" + ) + results = self._reader.consume( + batches_to_parse, self.metadata, self._column_info ) - results = self._reader.consume( - batches_to_parse, self.metadata, self._column_info - ) - if results is None: - continue - - except ValueError as e: - raise InvalidExecuteQueryResponse( - "Invalid ExecuteQuery response received" - ) from e - - for result in results: - yield result - # this means the stream has finished with no responses. In that case we know the - # latest_prepare_reponses was used successfully so we can finalize the metadata - if self._final_metadata is None: - self._finalize_metadata() - await self.close() + if results is None: + continue + + except ValueError as e: + raise InvalidExecuteQueryResponse( + "Invalid ExecuteQuery response received" + ) from e + + for result in results: + yield result + # this means the stream has finished with no responses. In that case we know the + # latest_prepare_reponses was used successfully so we can finalize the metadata + if self._final_metadata is None: + self._finalize_metadata() + self._fully_consumed = True + finally: + self._close_internal() @CrossSync.convert(sync_name="__next__", replace_symbols={"__anext__": "__next__"}) async def __anext__(self) -> QueryResultRow: @@ -285,15 +290,26 @@ def metadata(self) -> Metadata: @CrossSync.convert async def close(self) -> None: """ - Cancel all background tasks. Should be called all rows were processed. + Cancel all background tasks. Should be called after all rows were processed. + + Called automatically by iterator :raises: :class:`ValueError ` if called in an invalid state """ + # this doesn't need to be async anymore but we wrap the sync api to avoid a breaking + # change + self._close_internal() + + def _close_internal(self) -> None: if self._is_closed: return - if not self._byte_cursor.empty(): + # Throw an error if the iterator has been successfully consumed but there is + # still buffered data + if self._fully_consumed and not self._byte_cursor.empty(): raise ValueError("Unexpected buffered data at end of executeQuery reqest") self._is_closed = True if self._register_instance_task is not None: self._register_instance_task.cancel() - await self._client._remove_instance_registration(self._instance_id, self) + self._client._remove_instance_registration( + self._instance_id, self.app_profile_id, id(self) + ) diff --git a/google/cloud/bigtable/data/execute_query/_sync_autogen/execute_query_iterator.py b/google/cloud/bigtable/data/execute_query/_sync_autogen/execute_query_iterator.py index 6b29cbfe7..68594d0e8 100644 --- a/google/cloud/bigtable/data/execute_query/_sync_autogen/execute_query_iterator.py +++ b/google/cloud/bigtable/data/execute_query/_sync_autogen/execute_query_iterator.py @@ -102,6 +102,7 @@ def __init__( self.has_received_token = False self._result_generator = self._next_impl() self._register_instance_task = None + self._fully_consumed = False self._is_closed = False self._request_body = request_body self._attempt_timeout_gen = _attempt_timeout_generator( @@ -120,7 +121,8 @@ def __init__( self._register_instance_task = CrossSync._Sync_Impl.create_task( self._client._register_instance, self._instance_id, - self, + self.app_profile_id, + id(self), sync_executor=self._client._executor, ) except RuntimeError as e: @@ -159,31 +161,34 @@ def _make_request_with_resume_token(self): def _next_impl(self) -> CrossSync._Sync_Impl.Iterator[QueryResultRow]: """Generator wrapping the response stream which parses the stream results and returns full `QueryResultRow`s.""" - for response in self._stream: - try: - if self._final_metadata is None and _has_resume_token(response): - self._finalize_metadata() - batches_to_parse = self._byte_cursor.consume(response) - if not batches_to_parse: - continue - if not self.metadata: - raise ValueError( - "Error parsing response before finalizing metadata" + try: + for response in self._stream: + try: + if self._final_metadata is None and _has_resume_token(response): + self._finalize_metadata() + batches_to_parse = self._byte_cursor.consume(response) + if not batches_to_parse: + continue + if not self.metadata: + raise ValueError( + "Error parsing response before finalizing metadata" + ) + results = self._reader.consume( + batches_to_parse, self.metadata, self._column_info ) - results = self._reader.consume( - batches_to_parse, self.metadata, self._column_info - ) - if results is None: - continue - except ValueError as e: - raise InvalidExecuteQueryResponse( - "Invalid ExecuteQuery response received" - ) from e - for result in results: - yield result - if self._final_metadata is None: - self._finalize_metadata() - self.close() + if results is None: + continue + except ValueError as e: + raise InvalidExecuteQueryResponse( + "Invalid ExecuteQuery response received" + ) from e + for result in results: + yield result + if self._final_metadata is None: + self._finalize_metadata() + self._fully_consumed = True + finally: + self._close_internal() def __next__(self) -> QueryResultRow: """Yields QueryResultRows representing the results of the query. @@ -233,15 +238,22 @@ def metadata(self) -> Metadata: return self._final_metadata def close(self) -> None: - """Cancel all background tasks. Should be called all rows were processed. + """Cancel all background tasks. Should be called after all rows were processed. + + Called automatically by iterator :raises: :class:`ValueError ` if called in an invalid state """ + self._close_internal() + + def _close_internal(self) -> None: if self._is_closed: return - if not self._byte_cursor.empty(): + if self._fully_consumed and (not self._byte_cursor.empty()): raise ValueError("Unexpected buffered data at end of executeQuery reqest") self._is_closed = True if self._register_instance_task is not None: self._register_instance_task.cancel() - self._client._remove_instance_registration(self._instance_id, self) + self._client._remove_instance_registration( + self._instance_id, self.app_profile_id, id(self) + ) diff --git a/tests/unit/data/_async/test_client.py b/tests/unit/data/_async/test_client.py index 9e434d12f..a5ec1d02d 100644 --- a/tests/unit/data/_async/test_client.py +++ b/tests/unit/data/_async/test_client.py @@ -537,7 +537,7 @@ async def test__register_instance(self): client_mock._ping_and_warm_instances = CrossSync.Mock() table_mock = mock.Mock() await self._get_target_class()._register_instance( - client_mock, "instance-1", table_mock + client_mock, "instance-1", table_mock.app_profile_id, id(table_mock) ) # first call should start background refresh assert client_mock._start_background_channel_refresh.call_count == 1 @@ -555,7 +555,7 @@ async def test__register_instance(self): # next call should not call _start_background_channel_refresh again table_mock2 = mock.Mock() await self._get_target_class()._register_instance( - client_mock, "instance-2", table_mock2 + client_mock, "instance-2", table_mock2.app_profile_id, id(table_mock2) ) assert client_mock._start_background_channel_refresh.call_count == 1 assert ( @@ -607,7 +607,7 @@ async def test__register_instance_duplicate(self): ) # fake first registration await self._get_target_class()._register_instance( - client_mock, "instance-1", table_mock + client_mock, "instance-1", table_mock.app_profile_id, id(table_mock) ) assert len(active_instances) == 1 assert expected_key == tuple(list(active_instances)[0]) @@ -617,7 +617,7 @@ async def test__register_instance_duplicate(self): assert client_mock._ping_and_warm_instances.call_count == 1 # next call should do nothing await self._get_target_class()._register_instance( - client_mock, "instance-1", table_mock + client_mock, "instance-1", table_mock.app_profile_id, id(table_mock) ) assert len(active_instances) == 1 assert expected_key == tuple(list(active_instances)[0]) @@ -659,7 +659,7 @@ async def test__register_instance_state( for instance, profile in insert_instances: table_mock.app_profile_id = profile await self._get_target_class()._register_instance( - client_mock, instance, table_mock + client_mock, instance, profile, id(table_mock) ) assert len(active_instances) == len(expected_active) assert len(instance_owners) == len(expected_owner_keys) @@ -682,8 +682,8 @@ async def test__register_instance_state( async def test__remove_instance_registration(self): client = self._make_client(project="project-id") table = mock.Mock() - await client._register_instance("instance-1", table) - await client._register_instance("instance-2", table) + await client._register_instance("instance-1", table.app_profile_id, id(table)) + await client._register_instance("instance-2", table.app_profile_id, id(table)) assert len(client._active_instances) == 2 assert len(client._instance_owners.keys()) == 2 instance_1_path = client._gapic_client.instance_path( @@ -698,13 +698,15 @@ async def test__remove_instance_registration(self): assert list(client._instance_owners[instance_1_key])[0] == id(table) assert len(client._instance_owners[instance_2_key]) == 1 assert list(client._instance_owners[instance_2_key])[0] == id(table) - success = await client._remove_instance_registration("instance-1", table) + success = client._remove_instance_registration( + "instance-1", table.app_profile_id, id(table) + ) assert success assert len(client._active_instances) == 1 assert len(client._instance_owners[instance_1_key]) == 0 assert len(client._instance_owners[instance_2_key]) == 1 assert client._active_instances == {instance_2_key} - success = await client._remove_instance_registration("fake-key", table) + success = client._remove_instance_registration("fake-key", "profile", id(table)) assert not success assert len(client._active_instances) == 1 await client.close() diff --git a/tests/unit/data/_sync_autogen/test_client.py b/tests/unit/data/_sync_autogen/test_client.py index 506ad7e94..6ad6c1063 100644 --- a/tests/unit/data/_sync_autogen/test_client.py +++ b/tests/unit/data/_sync_autogen/test_client.py @@ -428,7 +428,7 @@ def test__register_instance(self): client_mock._ping_and_warm_instances = CrossSync._Sync_Impl.Mock() table_mock = mock.Mock() self._get_target_class()._register_instance( - client_mock, "instance-1", table_mock + client_mock, "instance-1", table_mock.app_profile_id, id(table_mock) ) assert client_mock._start_background_channel_refresh.call_count == 1 expected_key = ("prefix/instance-1", table_mock.app_profile_id) @@ -439,7 +439,7 @@ def test__register_instance(self): client_mock._channel_refresh_task = mock.Mock() table_mock2 = mock.Mock() self._get_target_class()._register_instance( - client_mock, "instance-2", table_mock2 + client_mock, "instance-2", table_mock2.app_profile_id, id(table_mock2) ) assert client_mock._start_background_channel_refresh.call_count == 1 assert ( @@ -478,7 +478,7 @@ def test__register_instance_duplicate(self): table_mock = mock.Mock() expected_key = ("prefix/instance-1", table_mock.app_profile_id) self._get_target_class()._register_instance( - client_mock, "instance-1", table_mock + client_mock, "instance-1", table_mock.app_profile_id, id(table_mock) ) assert len(active_instances) == 1 assert expected_key == tuple(list(active_instances)[0]) @@ -486,7 +486,7 @@ def test__register_instance_duplicate(self): assert expected_key == tuple(list(instance_owners)[0]) assert client_mock._ping_and_warm_instances.call_count == 1 self._get_target_class()._register_instance( - client_mock, "instance-1", table_mock + client_mock, "instance-1", table_mock.app_profile_id, id(table_mock) ) assert len(active_instances) == 1 assert expected_key == tuple(list(active_instances)[0]) @@ -523,7 +523,7 @@ def test__register_instance_state( for instance, profile in insert_instances: table_mock.app_profile_id = profile self._get_target_class()._register_instance( - client_mock, instance, table_mock + client_mock, instance, profile, id(table_mock) ) assert len(active_instances) == len(expected_active) assert len(instance_owners) == len(expected_owner_keys) @@ -545,8 +545,8 @@ def test__register_instance_state( def test__remove_instance_registration(self): client = self._make_client(project="project-id") table = mock.Mock() - client._register_instance("instance-1", table) - client._register_instance("instance-2", table) + client._register_instance("instance-1", table.app_profile_id, id(table)) + client._register_instance("instance-2", table.app_profile_id, id(table)) assert len(client._active_instances) == 2 assert len(client._instance_owners.keys()) == 2 instance_1_path = client._gapic_client.instance_path( @@ -561,13 +561,15 @@ def test__remove_instance_registration(self): assert list(client._instance_owners[instance_1_key])[0] == id(table) assert len(client._instance_owners[instance_2_key]) == 1 assert list(client._instance_owners[instance_2_key])[0] == id(table) - success = client._remove_instance_registration("instance-1", table) + success = client._remove_instance_registration( + "instance-1", table.app_profile_id, id(table) + ) assert success assert len(client._active_instances) == 1 assert len(client._instance_owners[instance_1_key]) == 0 assert len(client._instance_owners[instance_2_key]) == 1 assert client._active_instances == {instance_2_key} - success = client._remove_instance_registration("fake-key", table) + success = client._remove_instance_registration("fake-key", "profile", id(table)) assert not success assert len(client._active_instances) == 1 client.close() diff --git a/tests/unit/data/execute_query/_async/test_query_iterator.py b/tests/unit/data/execute_query/_async/test_query_iterator.py index 982365556..df6321f7f 100644 --- a/tests/unit/data/execute_query/_async/test_query_iterator.py +++ b/tests/unit/data/execute_query/_async/test_query_iterator.py @@ -12,6 +12,7 @@ # See the License for the specific language governing permissions and # limitations under the License. +import gc from google.cloud.bigtable.data import exceptions from google.cloud.bigtable.data.execute_query.metadata import ( _pb_metadata_to_metadata_types, @@ -284,3 +285,123 @@ async def test_iterator_returns_error_if_metadata_requested_too_early( with pytest.raises(exceptions.EarlyMetadataCallError): iterator.metadata + + @CrossSync.pytest + async def test_iterator_closes_on_full_consumption(self, proto_byte_stream): + """ + Tests that the iterator's close() method is called after all results + have been successfully consumed. + """ + client_mock = mock.Mock() + client_mock._register_instance = CrossSync.Mock() + client_mock._remove_instance_registration = CrossSync.Mock() + client_mock._executor = concurrent.futures.ThreadPoolExecutor() + mock_async_iterator = MockIterator(proto_byte_stream) + + with mock.patch.object( + CrossSync, "retry_target_stream", return_value=mock_async_iterator + ): + iterator = self._make_one( + client=client_mock, + instance_id="test-instance", + app_profile_id="test_profile", + request_body={}, + prepare_metadata=_pb_metadata_to_metadata_types( + metadata( + column("test1", int64_type()), column("test2", int64_type()) + ) + ), + attempt_timeout=10, + operation_timeout=10, + ) + # Consume the entire iterator + results = [row async for row in iterator] + assert len(results) == 3 + + # The close method should be called automatically by the finally block + client_mock._remove_instance_registration.assert_called_once() + assert iterator.is_closed + + @CrossSync.pytest + async def test_iterator_closes_on_early_break(self, proto_byte_stream): + """ + Tests that the iterator's close() method is called if the user breaks + out of the iteration loop early. + """ + client_mock = mock.Mock() + client_mock._register_instance = CrossSync.Mock() + client_mock._remove_instance_registration = CrossSync.Mock() + mock_async_iterator = MockIterator(proto_byte_stream) + iterator = None + with mock.patch.object( + CrossSync, "retry_target_stream", return_value=mock_async_iterator + ): + iterator = CrossSync.ExecuteQueryIterator( + client=client_mock, + instance_id="test-instance", + app_profile_id="test_profile", + request_body={}, + prepare_metadata=_pb_metadata_to_metadata_types( + metadata( + column("test1", int64_type()), column("test2", int64_type()) + ) + ), + attempt_timeout=10, + operation_timeout=10, + ) + async for _ in iterator: + break + + del iterator + await CrossSync.sleep(1) + # GC outside the loop bc the mock ends up holding a reference to + # the iterator + gc.collect() + await CrossSync.sleep(1) + + # The close method should be called by the finally block when the + # generator is closed + client_mock._remove_instance_registration.assert_called_once() + + @CrossSync.pytest + async def test_iterator_closes_on_error(self, proto_byte_stream): + """ + Tests that the iterator's close() method is called if an exception + is raised during iteration. + """ + client_mock = mock.Mock() + client_mock._register_instance = CrossSync.Mock() + client_mock._remove_instance_registration = CrossSync.Mock() + + class MockErrorIterator(MockIterator): + @CrossSync.convert( + sync_name="__next__", replace_symbols={"__anext__": "__next__"} + ) + async def __anext__(self): + if self.idx >= 1: + raise ValueError("Injected-test-error") + return await super().__anext__() + + mock_async_iterator = MockErrorIterator(proto_byte_stream) + with mock.patch.object( + CrossSync, "retry_target_stream", return_value=mock_async_iterator + ): + iterator = self._make_one( + client=client_mock, + instance_id="test-instance", + app_profile_id="test_profile", + request_body={}, + prepare_metadata=_pb_metadata_to_metadata_types( + metadata( + column("test1", int64_type()), column("test2", int64_type()) + ) + ), + attempt_timeout=10, + operation_timeout=10, + ) + with pytest.raises(ValueError, match="Injected-test-error"): + async for _ in iterator: + pass + + # The close method should be called by the finally block on error + client_mock._remove_instance_registration.assert_called_once() diff --git a/tests/unit/data/execute_query/_sync_autogen/test_query_iterator.py b/tests/unit/data/execute_query/_sync_autogen/test_query_iterator.py index d4f3ec26f..3915693cd 100644 --- a/tests/unit/data/execute_query/_sync_autogen/test_query_iterator.py +++ b/tests/unit/data/execute_query/_sync_autogen/test_query_iterator.py @@ -15,6 +15,7 @@ # This file is automatically generated by CrossSync. Do not edit manually. +import gc from google.cloud.bigtable.data import exceptions from google.cloud.bigtable.data.execute_query.metadata import ( _pb_metadata_to_metadata_types, @@ -248,3 +249,105 @@ def test_iterator_returns_error_if_metadata_requested_too_early( ) with pytest.raises(exceptions.EarlyMetadataCallError): iterator.metadata + + def test_iterator_closes_on_full_consumption(self, proto_byte_stream): + """Tests that the iterator's close() method is called after all results + have been successfully consumed.""" + client_mock = mock.Mock() + client_mock._register_instance = CrossSync._Sync_Impl.Mock() + client_mock._remove_instance_registration = CrossSync._Sync_Impl.Mock() + client_mock._executor = concurrent.futures.ThreadPoolExecutor() + mock_async_iterator = MockIterator(proto_byte_stream) + with mock.patch.object( + CrossSync._Sync_Impl, + "retry_target_stream", + return_value=mock_async_iterator, + ): + iterator = self._make_one( + client=client_mock, + instance_id="test-instance", + app_profile_id="test_profile", + request_body={}, + prepare_metadata=_pb_metadata_to_metadata_types( + metadata( + column("test1", int64_type()), column("test2", int64_type()) + ) + ), + attempt_timeout=10, + operation_timeout=10, + ) + results = [row for row in iterator] + assert len(results) == 3 + client_mock._remove_instance_registration.assert_called_once() + assert iterator.is_closed + + def test_iterator_closes_on_early_break(self, proto_byte_stream): + """Tests that the iterator's close() method is called if the user breaks + out of the iteration loop early.""" + client_mock = mock.Mock() + client_mock._register_instance = CrossSync._Sync_Impl.Mock() + client_mock._remove_instance_registration = CrossSync._Sync_Impl.Mock() + mock_async_iterator = MockIterator(proto_byte_stream) + iterator = None + with mock.patch.object( + CrossSync._Sync_Impl, + "retry_target_stream", + return_value=mock_async_iterator, + ): + iterator = CrossSync._Sync_Impl.ExecuteQueryIterator( + client=client_mock, + instance_id="test-instance", + app_profile_id="test_profile", + request_body={}, + prepare_metadata=_pb_metadata_to_metadata_types( + metadata( + column("test1", int64_type()), column("test2", int64_type()) + ) + ), + attempt_timeout=10, + operation_timeout=10, + ) + for _ in iterator: + break + del iterator + CrossSync._Sync_Impl.sleep(1) + gc.collect() + CrossSync._Sync_Impl.sleep(1) + client_mock._remove_instance_registration.assert_called_once() + + def test_iterator_closes_on_error(self, proto_byte_stream): + """Tests that the iterator's close() method is called if an exception + is raised during iteration.""" + client_mock = mock.Mock() + client_mock._register_instance = CrossSync._Sync_Impl.Mock() + client_mock._remove_instance_registration = CrossSync._Sync_Impl.Mock() + + class MockErrorIterator(MockIterator): + def __next__(self): + if self.idx >= 1: + raise ValueError("Injected-test-error") + return super().__next__() + + mock_async_iterator = MockErrorIterator(proto_byte_stream) + with mock.patch.object( + CrossSync._Sync_Impl, + "retry_target_stream", + return_value=mock_async_iterator, + ): + iterator = self._make_one( + client=client_mock, + instance_id="test-instance", + app_profile_id="test_profile", + request_body={}, + prepare_metadata=_pb_metadata_to_metadata_types( + metadata( + column("test1", int64_type()), column("test2", int64_type()) + ) + ), + attempt_timeout=10, + operation_timeout=10, + ) + with pytest.raises(ValueError, match="Injected-test-error"): + for _ in iterator: + pass + client_mock._remove_instance_registration.assert_called_once() From f6e41f8f155012782547989579d3eb6600118f0c Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Tue, 7 Oct 2025 16:46:42 -0700 Subject: [PATCH 8/8] chore(main): release 2.33.0 (#1185) --- .release-please-manifest.json | 2 +- CHANGELOG.md | 14 ++++++++++++++ google/cloud/bigtable/gapic_version.py | 2 +- google/cloud/bigtable_admin/gapic_version.py | 2 +- google/cloud/bigtable_admin_v2/gapic_version.py | 2 +- google/cloud/bigtable_v2/gapic_version.py | 2 +- 6 files changed, 19 insertions(+), 5 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 355f140d6..12401d7d2 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "2.32.0" + ".": "2.33.0" } \ No newline at end of file diff --git a/CHANGELOG.md b/CHANGELOG.md index d03080164..7dc43a9a2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,20 @@ [1]: https://pypi.org/project/google-cloud-bigtable/#history +## [2.33.0](https://github.com/googleapis/python-bigtable/compare/v2.32.0...v2.33.0) (2025-10-06) + + +### Features + +* Add support for Proto and Enum types ([#1202](https://github.com/googleapis/python-bigtable/issues/1202)) ([34ceb86](https://github.com/googleapis/python-bigtable/commit/34ceb86007db08d453fa25cca4968d5b498ffcd6)) +* Expose universe_domain for tpc ([#1150](https://github.com/googleapis/python-bigtable/issues/1150)) ([451fd97](https://github.com/googleapis/python-bigtable/commit/451fd97e435218ffed47d39423680ffc4feccac4)) + + +### Bug Fixes + +* Fix instance registration cleanup on early iterator termination ([#1216](https://github.com/googleapis/python-bigtable/issues/1216)) ([bbfd746](https://github.com/googleapis/python-bigtable/commit/bbfd746c61a6362efa42c7899ec3e34ceb541c83)) +* Refactor channel refresh ([#1174](https://github.com/googleapis/python-bigtable/issues/1174)) ([6fa3008](https://github.com/googleapis/python-bigtable/commit/6fa30084058bc34d4487d1fee5c87d7795ff167a)) + ## [2.32.0](https://github.com/googleapis/python-bigtable/compare/v2.31.0...v2.32.0) (2025-08-01) diff --git a/google/cloud/bigtable/gapic_version.py b/google/cloud/bigtable/gapic_version.py index 3c958586f..0c5de5c03 100644 --- a/google/cloud/bigtable/gapic_version.py +++ b/google/cloud/bigtable/gapic_version.py @@ -13,4 +13,4 @@ # See the License for the specific language governing permissions and # limitations under the License. # -__version__ = "2.32.0" # {x-release-please-version} +__version__ = "2.33.0" # {x-release-please-version} diff --git a/google/cloud/bigtable_admin/gapic_version.py b/google/cloud/bigtable_admin/gapic_version.py index 3c958586f..0c5de5c03 100644 --- a/google/cloud/bigtable_admin/gapic_version.py +++ b/google/cloud/bigtable_admin/gapic_version.py @@ -13,4 +13,4 @@ # See the License for the specific language governing permissions and # limitations under the License. # -__version__ = "2.32.0" # {x-release-please-version} +__version__ = "2.33.0" # {x-release-please-version} diff --git a/google/cloud/bigtable_admin_v2/gapic_version.py b/google/cloud/bigtable_admin_v2/gapic_version.py index 3c958586f..0c5de5c03 100644 --- a/google/cloud/bigtable_admin_v2/gapic_version.py +++ b/google/cloud/bigtable_admin_v2/gapic_version.py @@ -13,4 +13,4 @@ # See the License for the specific language governing permissions and # limitations under the License. # -__version__ = "2.32.0" # {x-release-please-version} +__version__ = "2.33.0" # {x-release-please-version} diff --git a/google/cloud/bigtable_v2/gapic_version.py b/google/cloud/bigtable_v2/gapic_version.py index 3c958586f..0c5de5c03 100644 --- a/google/cloud/bigtable_v2/gapic_version.py +++ b/google/cloud/bigtable_v2/gapic_version.py @@ -13,4 +13,4 @@ # See the License for the specific language governing permissions and # limitations under the License. # -__version__ = "2.32.0" # {x-release-please-version} +__version__ = "2.33.0" # {x-release-please-version}