From d9626a84d105fedb5c24c089f698ae6857df3503 Mon Sep 17 00:00:00 2001 From: Daniel Sanche Date: Thu, 14 Aug 2025 15:09:05 -0700 Subject: [PATCH 1/5] added alias to bigtable/admin --- google/cloud/bigtable/admin/__init__.py | 410 ++++++++++++++++++++++++ 1 file changed, 410 insertions(+) create mode 100644 google/cloud/bigtable/admin/__init__.py diff --git a/google/cloud/bigtable/admin/__init__.py b/google/cloud/bigtable/admin/__init__.py new file mode 100644 index 000000000..c8f2a4482 --- /dev/null +++ b/google/cloud/bigtable/admin/__init__.py @@ -0,0 +1,410 @@ +# -*- 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. +# +from google.cloud.bigtable_admin import gapic_version as package_version + +__version__ = package_version.__version__ + + +from google.cloud.bigtable_admin_v2.services.bigtable_instance_admin.client import ( + BigtableInstanceAdminClient, +) +from google.cloud.bigtable_admin_v2.services.bigtable_instance_admin.async_client import ( + BigtableInstanceAdminAsyncClient, +) +from google.cloud.bigtable_admin_v2.services.bigtable_table_admin.client import ( + BigtableTableAdminClient, +) +from google.cloud.bigtable_admin_v2.services.bigtable_table_admin.async_client import ( + BigtableTableAdminAsyncClient, +) + +from google.cloud.bigtable_admin_v2.types.bigtable_instance_admin import ( + CreateAppProfileRequest, +) +from google.cloud.bigtable_admin_v2.types.bigtable_instance_admin import ( + CreateClusterMetadata, +) +from google.cloud.bigtable_admin_v2.types.bigtable_instance_admin import ( + CreateClusterRequest, +) +from google.cloud.bigtable_admin_v2.types.bigtable_instance_admin import ( + CreateInstanceMetadata, +) +from google.cloud.bigtable_admin_v2.types.bigtable_instance_admin import ( + CreateInstanceRequest, +) +from google.cloud.bigtable_admin_v2.types.bigtable_instance_admin import ( + CreateLogicalViewMetadata, +) +from google.cloud.bigtable_admin_v2.types.bigtable_instance_admin import ( + CreateLogicalViewRequest, +) +from google.cloud.bigtable_admin_v2.types.bigtable_instance_admin import ( + CreateMaterializedViewMetadata, +) +from google.cloud.bigtable_admin_v2.types.bigtable_instance_admin import ( + CreateMaterializedViewRequest, +) +from google.cloud.bigtable_admin_v2.types.bigtable_instance_admin import ( + DeleteAppProfileRequest, +) +from google.cloud.bigtable_admin_v2.types.bigtable_instance_admin import ( + DeleteClusterRequest, +) +from google.cloud.bigtable_admin_v2.types.bigtable_instance_admin import ( + DeleteInstanceRequest, +) +from google.cloud.bigtable_admin_v2.types.bigtable_instance_admin import ( + DeleteLogicalViewRequest, +) +from google.cloud.bigtable_admin_v2.types.bigtable_instance_admin import ( + DeleteMaterializedViewRequest, +) +from google.cloud.bigtable_admin_v2.types.bigtable_instance_admin import ( + GetAppProfileRequest, +) +from google.cloud.bigtable_admin_v2.types.bigtable_instance_admin import ( + GetClusterRequest, +) +from google.cloud.bigtable_admin_v2.types.bigtable_instance_admin import ( + GetInstanceRequest, +) +from google.cloud.bigtable_admin_v2.types.bigtable_instance_admin import ( + GetLogicalViewRequest, +) +from google.cloud.bigtable_admin_v2.types.bigtable_instance_admin import ( + GetMaterializedViewRequest, +) +from google.cloud.bigtable_admin_v2.types.bigtable_instance_admin import ( + ListAppProfilesRequest, +) +from google.cloud.bigtable_admin_v2.types.bigtable_instance_admin import ( + ListAppProfilesResponse, +) +from google.cloud.bigtable_admin_v2.types.bigtable_instance_admin import ( + ListClustersRequest, +) +from google.cloud.bigtable_admin_v2.types.bigtable_instance_admin import ( + ListClustersResponse, +) +from google.cloud.bigtable_admin_v2.types.bigtable_instance_admin import ( + ListHotTabletsRequest, +) +from google.cloud.bigtable_admin_v2.types.bigtable_instance_admin import ( + ListHotTabletsResponse, +) +from google.cloud.bigtable_admin_v2.types.bigtable_instance_admin import ( + ListInstancesRequest, +) +from google.cloud.bigtable_admin_v2.types.bigtable_instance_admin import ( + ListInstancesResponse, +) +from google.cloud.bigtable_admin_v2.types.bigtable_instance_admin import ( + ListLogicalViewsRequest, +) +from google.cloud.bigtable_admin_v2.types.bigtable_instance_admin import ( + ListLogicalViewsResponse, +) +from google.cloud.bigtable_admin_v2.types.bigtable_instance_admin import ( + ListMaterializedViewsRequest, +) +from google.cloud.bigtable_admin_v2.types.bigtable_instance_admin import ( + ListMaterializedViewsResponse, +) +from google.cloud.bigtable_admin_v2.types.bigtable_instance_admin import ( + PartialUpdateClusterMetadata, +) +from google.cloud.bigtable_admin_v2.types.bigtable_instance_admin import ( + PartialUpdateClusterRequest, +) +from google.cloud.bigtable_admin_v2.types.bigtable_instance_admin import ( + PartialUpdateInstanceRequest, +) +from google.cloud.bigtable_admin_v2.types.bigtable_instance_admin import ( + UpdateAppProfileMetadata, +) +from google.cloud.bigtable_admin_v2.types.bigtable_instance_admin import ( + UpdateAppProfileRequest, +) +from google.cloud.bigtable_admin_v2.types.bigtable_instance_admin import ( + UpdateClusterMetadata, +) +from google.cloud.bigtable_admin_v2.types.bigtable_instance_admin import ( + UpdateInstanceMetadata, +) +from google.cloud.bigtable_admin_v2.types.bigtable_instance_admin import ( + UpdateLogicalViewMetadata, +) +from google.cloud.bigtable_admin_v2.types.bigtable_instance_admin import ( + UpdateLogicalViewRequest, +) +from google.cloud.bigtable_admin_v2.types.bigtable_instance_admin import ( + UpdateMaterializedViewMetadata, +) +from google.cloud.bigtable_admin_v2.types.bigtable_instance_admin import ( + UpdateMaterializedViewRequest, +) +from google.cloud.bigtable_admin_v2.types.bigtable_table_admin import ( + CheckConsistencyRequest, +) +from google.cloud.bigtable_admin_v2.types.bigtable_table_admin import ( + CheckConsistencyResponse, +) +from google.cloud.bigtable_admin_v2.types.bigtable_table_admin import CopyBackupMetadata +from google.cloud.bigtable_admin_v2.types.bigtable_table_admin import CopyBackupRequest +from google.cloud.bigtable_admin_v2.types.bigtable_table_admin import ( + CreateAuthorizedViewMetadata, +) +from google.cloud.bigtable_admin_v2.types.bigtable_table_admin import ( + CreateAuthorizedViewRequest, +) +from google.cloud.bigtable_admin_v2.types.bigtable_table_admin import ( + CreateBackupMetadata, +) +from google.cloud.bigtable_admin_v2.types.bigtable_table_admin import ( + CreateBackupRequest, +) +from google.cloud.bigtable_admin_v2.types.bigtable_table_admin import ( + CreateTableFromSnapshotMetadata, +) +from google.cloud.bigtable_admin_v2.types.bigtable_table_admin import ( + CreateTableFromSnapshotRequest, +) +from google.cloud.bigtable_admin_v2.types.bigtable_table_admin import CreateTableRequest +from google.cloud.bigtable_admin_v2.types.bigtable_table_admin import ( + DataBoostReadLocalWrites, +) +from google.cloud.bigtable_admin_v2.types.bigtable_table_admin import ( + DeleteAuthorizedViewRequest, +) +from google.cloud.bigtable_admin_v2.types.bigtable_table_admin import ( + DeleteBackupRequest, +) +from google.cloud.bigtable_admin_v2.types.bigtable_table_admin import ( + DeleteSnapshotRequest, +) +from google.cloud.bigtable_admin_v2.types.bigtable_table_admin import DeleteTableRequest +from google.cloud.bigtable_admin_v2.types.bigtable_table_admin import ( + DropRowRangeRequest, +) +from google.cloud.bigtable_admin_v2.types.bigtable_table_admin import ( + GenerateConsistencyTokenRequest, +) +from google.cloud.bigtable_admin_v2.types.bigtable_table_admin import ( + GenerateConsistencyTokenResponse, +) +from google.cloud.bigtable_admin_v2.types.bigtable_table_admin import ( + GetAuthorizedViewRequest, +) +from google.cloud.bigtable_admin_v2.types.bigtable_table_admin import GetBackupRequest +from google.cloud.bigtable_admin_v2.types.bigtable_table_admin import GetSnapshotRequest +from google.cloud.bigtable_admin_v2.types.bigtable_table_admin import GetTableRequest +from google.cloud.bigtable_admin_v2.types.bigtable_table_admin import ( + ListAuthorizedViewsRequest, +) +from google.cloud.bigtable_admin_v2.types.bigtable_table_admin import ( + ListAuthorizedViewsResponse, +) +from google.cloud.bigtable_admin_v2.types.bigtable_table_admin import ListBackupsRequest +from google.cloud.bigtable_admin_v2.types.bigtable_table_admin import ( + ListBackupsResponse, +) +from google.cloud.bigtable_admin_v2.types.bigtable_table_admin import ( + ListSnapshotsRequest, +) +from google.cloud.bigtable_admin_v2.types.bigtable_table_admin import ( + ListSnapshotsResponse, +) +from google.cloud.bigtable_admin_v2.types.bigtable_table_admin import ListTablesRequest +from google.cloud.bigtable_admin_v2.types.bigtable_table_admin import ListTablesResponse +from google.cloud.bigtable_admin_v2.types.bigtable_table_admin import ( + ModifyColumnFamiliesRequest, +) +from google.cloud.bigtable_admin_v2.types.bigtable_table_admin import ( + OptimizeRestoredTableMetadata, +) +from google.cloud.bigtable_admin_v2.types.bigtable_table_admin import ( + RestoreTableMetadata, +) +from google.cloud.bigtable_admin_v2.types.bigtable_table_admin import ( + RestoreTableRequest, +) +from google.cloud.bigtable_admin_v2.types.bigtable_table_admin import ( + SnapshotTableMetadata, +) +from google.cloud.bigtable_admin_v2.types.bigtable_table_admin import ( + SnapshotTableRequest, +) +from google.cloud.bigtable_admin_v2.types.bigtable_table_admin import ( + StandardReadRemoteWrites, +) +from google.cloud.bigtable_admin_v2.types.bigtable_table_admin import ( + UndeleteTableMetadata, +) +from google.cloud.bigtable_admin_v2.types.bigtable_table_admin import ( + UndeleteTableRequest, +) +from google.cloud.bigtable_admin_v2.types.bigtable_table_admin import ( + UpdateAuthorizedViewMetadata, +) +from google.cloud.bigtable_admin_v2.types.bigtable_table_admin import ( + UpdateAuthorizedViewRequest, +) +from google.cloud.bigtable_admin_v2.types.bigtable_table_admin import ( + UpdateBackupRequest, +) +from google.cloud.bigtable_admin_v2.types.bigtable_table_admin import ( + UpdateTableMetadata, +) +from google.cloud.bigtable_admin_v2.types.bigtable_table_admin import UpdateTableRequest +from google.cloud.bigtable_admin_v2.types.common import OperationProgress +from google.cloud.bigtable_admin_v2.types.common import StorageType +from google.cloud.bigtable_admin_v2.types.instance import AppProfile +from google.cloud.bigtable_admin_v2.types.instance import AutoscalingLimits +from google.cloud.bigtable_admin_v2.types.instance import AutoscalingTargets +from google.cloud.bigtable_admin_v2.types.instance import Cluster +from google.cloud.bigtable_admin_v2.types.instance import HotTablet +from google.cloud.bigtable_admin_v2.types.instance import Instance +from google.cloud.bigtable_admin_v2.types.instance import LogicalView +from google.cloud.bigtable_admin_v2.types.instance import MaterializedView +from google.cloud.bigtable_admin_v2.types.table import AuthorizedView +from google.cloud.bigtable_admin_v2.types.table import Backup +from google.cloud.bigtable_admin_v2.types.table import BackupInfo +from google.cloud.bigtable_admin_v2.types.table import ChangeStreamConfig +from google.cloud.bigtable_admin_v2.types.table import ColumnFamily +from google.cloud.bigtable_admin_v2.types.table import EncryptionInfo +from google.cloud.bigtable_admin_v2.types.table import GcRule +from google.cloud.bigtable_admin_v2.types.table import RestoreInfo +from google.cloud.bigtable_admin_v2.types.table import Snapshot +from google.cloud.bigtable_admin_v2.types.table import Table +from google.cloud.bigtable_admin_v2.types.table import RestoreSourceType +from google.cloud.bigtable_admin_v2.types.types import Type + +__all__ = ( + "BigtableInstanceAdminClient", + "BigtableInstanceAdminAsyncClient", + "BigtableTableAdminClient", + "BigtableTableAdminAsyncClient", + "CreateAppProfileRequest", + "CreateClusterMetadata", + "CreateClusterRequest", + "CreateInstanceMetadata", + "CreateInstanceRequest", + "CreateLogicalViewMetadata", + "CreateLogicalViewRequest", + "CreateMaterializedViewMetadata", + "CreateMaterializedViewRequest", + "DeleteAppProfileRequest", + "DeleteClusterRequest", + "DeleteInstanceRequest", + "DeleteLogicalViewRequest", + "DeleteMaterializedViewRequest", + "GetAppProfileRequest", + "GetClusterRequest", + "GetInstanceRequest", + "GetLogicalViewRequest", + "GetMaterializedViewRequest", + "ListAppProfilesRequest", + "ListAppProfilesResponse", + "ListClustersRequest", + "ListClustersResponse", + "ListHotTabletsRequest", + "ListHotTabletsResponse", + "ListInstancesRequest", + "ListInstancesResponse", + "ListLogicalViewsRequest", + "ListLogicalViewsResponse", + "ListMaterializedViewsRequest", + "ListMaterializedViewsResponse", + "PartialUpdateClusterMetadata", + "PartialUpdateClusterRequest", + "PartialUpdateInstanceRequest", + "UpdateAppProfileMetadata", + "UpdateAppProfileRequest", + "UpdateClusterMetadata", + "UpdateInstanceMetadata", + "UpdateLogicalViewMetadata", + "UpdateLogicalViewRequest", + "UpdateMaterializedViewMetadata", + "UpdateMaterializedViewRequest", + "CheckConsistencyRequest", + "CheckConsistencyResponse", + "CopyBackupMetadata", + "CopyBackupRequest", + "CreateAuthorizedViewMetadata", + "CreateAuthorizedViewRequest", + "CreateBackupMetadata", + "CreateBackupRequest", + "CreateTableFromSnapshotMetadata", + "CreateTableFromSnapshotRequest", + "CreateTableRequest", + "DataBoostReadLocalWrites", + "DeleteAuthorizedViewRequest", + "DeleteBackupRequest", + "DeleteSnapshotRequest", + "DeleteTableRequest", + "DropRowRangeRequest", + "GenerateConsistencyTokenRequest", + "GenerateConsistencyTokenResponse", + "GetAuthorizedViewRequest", + "GetBackupRequest", + "GetSnapshotRequest", + "GetTableRequest", + "ListAuthorizedViewsRequest", + "ListAuthorizedViewsResponse", + "ListBackupsRequest", + "ListBackupsResponse", + "ListSnapshotsRequest", + "ListSnapshotsResponse", + "ListTablesRequest", + "ListTablesResponse", + "ModifyColumnFamiliesRequest", + "OptimizeRestoredTableMetadata", + "RestoreTableMetadata", + "RestoreTableRequest", + "SnapshotTableMetadata", + "SnapshotTableRequest", + "StandardReadRemoteWrites", + "UndeleteTableMetadata", + "UndeleteTableRequest", + "UpdateAuthorizedViewMetadata", + "UpdateAuthorizedViewRequest", + "UpdateBackupRequest", + "UpdateTableMetadata", + "UpdateTableRequest", + "OperationProgress", + "StorageType", + "AppProfile", + "AutoscalingLimits", + "AutoscalingTargets", + "Cluster", + "HotTablet", + "Instance", + "LogicalView", + "MaterializedView", + "AuthorizedView", + "Backup", + "BackupInfo", + "ChangeStreamConfig", + "ColumnFamily", + "EncryptionInfo", + "GcRule", + "RestoreInfo", + "Snapshot", + "Table", + "RestoreSourceType", + "Type", +) From 300d1bacfe0afadb6d67e4354e958ffae0373638 Mon Sep 17 00:00:00 2001 From: Daniel Sanche Date: Fri, 15 Aug 2025 15:18:42 -0700 Subject: [PATCH 2/5] moved classic client into its own subdirectory --- google/cloud/bigtable/__init__.py | 71 ++++++++++++++----- google/cloud/bigtable/classic/__init__.py | 25 +++++++ .../bigtable/{ => classic}/app_profile.py | 2 +- google/cloud/bigtable/{ => classic}/backup.py | 4 +- .../cloud/bigtable/{ => classic}/batcher.py | 0 google/cloud/bigtable/{ => classic}/client.py | 6 +- .../cloud/bigtable/{ => classic}/cluster.py | 0 .../bigtable/{ => classic}/column_family.py | 0 .../bigtable/{ => classic}/encryption_info.py | 2 +- google/cloud/bigtable/{ => classic}/enums.py | 0 google/cloud/bigtable/{ => classic}/error.py | 0 .../cloud/bigtable/{ => classic}/helpers.py | 0 .../cloud/bigtable/{ => classic}/instance.py | 8 +-- google/cloud/bigtable/{ => classic}/policy.py | 0 google/cloud/bigtable/{ => classic}/row.py | 0 .../cloud/bigtable/{ => classic}/row_data.py | 4 +- .../bigtable/{ => classic}/row_filters.py | 0 .../bigtable/{ => classic}/row_merger.py | 2 +- .../cloud/bigtable/{ => classic}/row_set.py | 0 google/cloud/bigtable/{ => classic}/table.py | 30 ++++---- 20 files changed, 106 insertions(+), 48 deletions(-) create mode 100644 google/cloud/bigtable/classic/__init__.py rename google/cloud/bigtable/{ => classic}/app_profile.py (99%) rename google/cloud/bigtable/{ => classic}/backup.py (99%) rename google/cloud/bigtable/{ => classic}/batcher.py (100%) rename google/cloud/bigtable/{ => classic}/client.py (99%) rename google/cloud/bigtable/{ => classic}/cluster.py (100%) rename google/cloud/bigtable/{ => classic}/column_family.py (100%) rename google/cloud/bigtable/{ => classic}/encryption_info.py (97%) rename google/cloud/bigtable/{ => classic}/enums.py (100%) rename google/cloud/bigtable/{ => classic}/error.py (100%) rename google/cloud/bigtable/{ => classic}/helpers.py (100%) rename google/cloud/bigtable/{ => classic}/instance.py (99%) rename google/cloud/bigtable/{ => classic}/policy.py (100%) rename google/cloud/bigtable/{ => classic}/row.py (100%) rename google/cloud/bigtable/{ => classic}/row_data.py (99%) rename google/cloud/bigtable/{ => classic}/row_filters.py (100%) rename google/cloud/bigtable/{ => classic}/row_merger.py (99%) rename google/cloud/bigtable/{ => classic}/row_set.py (100%) rename google/cloud/bigtable/{ => classic}/table.py (98%) diff --git a/google/cloud/bigtable/__init__.py b/google/cloud/bigtable/__init__.py index 7331ff241..211a19767 100644 --- a/google/cloud/bigtable/__init__.py +++ b/google/cloud/bigtable/__init__.py @@ -1,25 +1,58 @@ -# Copyright 2015 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. +import importlib +import sys +import warnings -"""Google Cloud Bigtable API package.""" -from google.cloud.bigtable.client import Client +_LEGACY_MODULE_NAMES = { + "app_profile", + "backup", + "batcher", + "client", + "cluster", + "column_family", + "encryption_info", + "enums", + "error", + "helpers", + "instance", + "policy", + "row_data", + "row_filters", + "row_merger", + "row_set", + "row", + "table", +} -from google.cloud.bigtable import gapic_version as package_version +# Eagerly create aliases in sys.modules for full backward compatibility. +# This is more robust than the lazy __getattr__ approach because it handles +# direct submodule imports (e.g., `import google.cloud.bigtable.row_data`). +for module_name in _LEGACY_MODULE_NAMES: + # Define the old and new module paths + old_path = f"google.cloud.bigtable.{module_name}" + new_path = f".classic.{module_name}" -__version__: str + # Import the module from its new location + module = importlib.import_module(new_path, __name__) -__version__ = package_version.__version__ + # Inject the loaded module into sys.modules under its old path. + # This makes Python's import machinery find it automatically. + sys.modules[old_path] = module -__all__ = ["__version__", "Client"] + # Attach the module as an attribute to the current package + setattr(sys.modules[__name__], module_name, module) + +# You can also issue a single, general warning that some modules were moved. +warnings.warn( + ( + "Several modules have been moved to the `google.cloud.bigtable.classic` " + "subpackage. The top-level aliases will be removed in a future version." + ), + DeprecationWarning, + stacklevel=2, +) + +# previously exported classes +from google.cloud.bigtable.classic.client import Client +from . import gapic_version +__version__ = gapic_version.__version__ \ No newline at end of file diff --git a/google/cloud/bigtable/classic/__init__.py b/google/cloud/bigtable/classic/__init__.py new file mode 100644 index 000000000..04e4c4e9c --- /dev/null +++ b/google/cloud/bigtable/classic/__init__.py @@ -0,0 +1,25 @@ +# Copyright 2015 Google LLC +# +# Licensed under the Apache License, Version 2.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. + +"""Google Cloud Bigtable API package.""" + +from .client import Client + +from google.cloud.bigtable import gapic_version as package_version + +__version__: str + +__version__ = package_version.__version__ + +__all__ = ["__version__", "Client"] diff --git a/google/cloud/bigtable/app_profile.py b/google/cloud/bigtable/classic/app_profile.py similarity index 99% rename from google/cloud/bigtable/app_profile.py rename to google/cloud/bigtable/classic/app_profile.py index 8cde66146..629abaff0 100644 --- a/google/cloud/bigtable/app_profile.py +++ b/google/cloud/bigtable/classic/app_profile.py @@ -17,7 +17,7 @@ import re -from google.cloud.bigtable.enums import RoutingPolicyType +from .enums import RoutingPolicyType from google.cloud.bigtable_admin_v2.types import instance from google.protobuf import field_mask_pb2 from google.api_core.exceptions import NotFound diff --git a/google/cloud/bigtable/backup.py b/google/cloud/bigtable/classic/backup.py similarity index 99% rename from google/cloud/bigtable/backup.py rename to google/cloud/bigtable/classic/backup.py index 5b2cafc54..3ddf34070 100644 --- a/google/cloud/bigtable/backup.py +++ b/google/cloud/bigtable/classic/backup.py @@ -19,8 +19,8 @@ from google.cloud._helpers import _datetime_to_pb_timestamp # type: ignore from google.cloud.bigtable_admin_v2 import BigtableTableAdminClient from google.cloud.bigtable_admin_v2.types import table -from google.cloud.bigtable.encryption_info import EncryptionInfo -from google.cloud.bigtable.policy import Policy +from .encryption_info import EncryptionInfo +from .policy import Policy from google.cloud.exceptions import NotFound # type: ignore from google.protobuf import field_mask_pb2 diff --git a/google/cloud/bigtable/batcher.py b/google/cloud/bigtable/classic/batcher.py similarity index 100% rename from google/cloud/bigtable/batcher.py rename to google/cloud/bigtable/classic/batcher.py diff --git a/google/cloud/bigtable/client.py b/google/cloud/bigtable/classic/client.py similarity index 99% rename from google/cloud/bigtable/client.py rename to google/cloud/bigtable/classic/client.py index 0c89ea562..9ce57c405 100644 --- a/google/cloud/bigtable/client.py +++ b/google/cloud/bigtable/classic/client.py @@ -45,13 +45,13 @@ ) from google.cloud import bigtable -from google.cloud.bigtable.instance import Instance -from google.cloud.bigtable.cluster import Cluster +from .instance import Instance +from .cluster import Cluster from google.cloud.client import ClientWithProject # type: ignore from google.cloud.bigtable_admin_v2.types import instance -from google.cloud.bigtable.cluster import _CLUSTER_NAME_RE +from .cluster import _CLUSTER_NAME_RE from google.cloud.environment_vars import BIGTABLE_EMULATOR # type: ignore diff --git a/google/cloud/bigtable/cluster.py b/google/cloud/bigtable/classic/cluster.py similarity index 100% rename from google/cloud/bigtable/cluster.py rename to google/cloud/bigtable/classic/cluster.py diff --git a/google/cloud/bigtable/column_family.py b/google/cloud/bigtable/classic/column_family.py similarity index 100% rename from google/cloud/bigtable/column_family.py rename to google/cloud/bigtable/classic/column_family.py diff --git a/google/cloud/bigtable/encryption_info.py b/google/cloud/bigtable/classic/encryption_info.py similarity index 97% rename from google/cloud/bigtable/encryption_info.py rename to google/cloud/bigtable/classic/encryption_info.py index 1757297bc..b0fd05cfa 100644 --- a/google/cloud/bigtable/encryption_info.py +++ b/google/cloud/bigtable/classic/encryption_info.py @@ -14,7 +14,7 @@ """Class for encryption info for tables and backups.""" -from google.cloud.bigtable.error import Status +from .error import Status class EncryptionInfo: diff --git a/google/cloud/bigtable/enums.py b/google/cloud/bigtable/classic/enums.py similarity index 100% rename from google/cloud/bigtable/enums.py rename to google/cloud/bigtable/classic/enums.py diff --git a/google/cloud/bigtable/error.py b/google/cloud/bigtable/classic/error.py similarity index 100% rename from google/cloud/bigtable/error.py rename to google/cloud/bigtable/classic/error.py diff --git a/google/cloud/bigtable/helpers.py b/google/cloud/bigtable/classic/helpers.py similarity index 100% rename from google/cloud/bigtable/helpers.py rename to google/cloud/bigtable/classic/helpers.py diff --git a/google/cloud/bigtable/instance.py b/google/cloud/bigtable/classic/instance.py similarity index 99% rename from google/cloud/bigtable/instance.py rename to google/cloud/bigtable/classic/instance.py index 23fb1c95d..bbba39f6a 100644 --- a/google/cloud/bigtable/instance.py +++ b/google/cloud/bigtable/classic/instance.py @@ -16,9 +16,9 @@ import re -from google.cloud.bigtable.app_profile import AppProfile -from google.cloud.bigtable.cluster import Cluster -from google.cloud.bigtable.table import Table +from .app_profile import AppProfile +from .cluster import Cluster +from .table import Table from google.protobuf import field_mask_pb2 @@ -28,7 +28,7 @@ from google.api_core.exceptions import NotFound -from google.cloud.bigtable.policy import Policy +from .policy import Policy import warnings diff --git a/google/cloud/bigtable/policy.py b/google/cloud/bigtable/classic/policy.py similarity index 100% rename from google/cloud/bigtable/policy.py rename to google/cloud/bigtable/classic/policy.py diff --git a/google/cloud/bigtable/row.py b/google/cloud/bigtable/classic/row.py similarity index 100% rename from google/cloud/bigtable/row.py rename to google/cloud/bigtable/classic/row.py diff --git a/google/cloud/bigtable/row_data.py b/google/cloud/bigtable/classic/row_data.py similarity index 99% rename from google/cloud/bigtable/row_data.py rename to google/cloud/bigtable/classic/row_data.py index e11379108..bb8bcfac9 100644 --- a/google/cloud/bigtable/row_data.py +++ b/google/cloud/bigtable/classic/row_data.py @@ -23,10 +23,10 @@ from google.api_core import retry from google.cloud._helpers import _to_bytes # type: ignore -from google.cloud.bigtable.row_merger import _RowMerger, _State +from .row_merger import _RowMerger, _State from google.cloud.bigtable_v2.types import bigtable as data_messages_v2_pb2 from google.cloud.bigtable_v2.types import data as data_v2_pb2 -from google.cloud.bigtable.row import Cell, InvalidChunk, PartialRowData +from .row import Cell, InvalidChunk, PartialRowData # Some classes need to be re-exported here to keep backwards diff --git a/google/cloud/bigtable/row_filters.py b/google/cloud/bigtable/classic/row_filters.py similarity index 100% rename from google/cloud/bigtable/row_filters.py rename to google/cloud/bigtable/classic/row_filters.py diff --git a/google/cloud/bigtable/row_merger.py b/google/cloud/bigtable/classic/row_merger.py similarity index 99% rename from google/cloud/bigtable/row_merger.py rename to google/cloud/bigtable/classic/row_merger.py index 515b91df7..c8206c642 100644 --- a/google/cloud/bigtable/row_merger.py +++ b/google/cloud/bigtable/classic/row_merger.py @@ -1,6 +1,6 @@ from enum import Enum from collections import OrderedDict -from google.cloud.bigtable.row import Cell, PartialRowData, InvalidChunk +from .row import Cell, PartialRowData, InvalidChunk _MISSING_COLUMN_FAMILY = "Column family {} is not among the cells stored in this row." _MISSING_COLUMN = ( diff --git a/google/cloud/bigtable/row_set.py b/google/cloud/bigtable/classic/row_set.py similarity index 100% rename from google/cloud/bigtable/row_set.py rename to google/cloud/bigtable/classic/row_set.py diff --git a/google/cloud/bigtable/table.py b/google/cloud/bigtable/classic/table.py similarity index 98% rename from google/cloud/bigtable/table.py rename to google/cloud/bigtable/classic/table.py index 7429bd36f..5cea14e1b 100644 --- a/google/cloud/bigtable/table.py +++ b/google/cloud/bigtable/classic/table.py @@ -28,24 +28,24 @@ from google.api_core.retry import if_exception_type from google.api_core.retry import Retry from google.cloud._helpers import _to_bytes # type: ignore -from google.cloud.bigtable.backup import Backup -from google.cloud.bigtable.column_family import _gc_rule_from_pb -from google.cloud.bigtable.column_family import ColumnFamily -from google.cloud.bigtable.batcher import MutationsBatcher -from google.cloud.bigtable.batcher import FLUSH_COUNT, MAX_MUTATION_SIZE -from google.cloud.bigtable.encryption_info import EncryptionInfo -from google.cloud.bigtable.policy import Policy -from google.cloud.bigtable.row import AppendRow -from google.cloud.bigtable.row import ConditionalRow -from google.cloud.bigtable.row import DirectRow -from google.cloud.bigtable.row_data import ( +from .backup import Backup +from .column_family import _gc_rule_from_pb +from .column_family import ColumnFamily +from .batcher import MutationsBatcher +from .batcher import FLUSH_COUNT, MAX_MUTATION_SIZE +from .encryption_info import EncryptionInfo +from .policy import Policy +from .row import AppendRow +from .row import ConditionalRow +from .row import DirectRow +from .row_data import ( PartialRowsData, _retriable_internal_server_error, ) -from google.cloud.bigtable.row_data import DEFAULT_RETRY_READ_ROWS -from google.cloud.bigtable.row_set import RowSet -from google.cloud.bigtable.row_set import RowRange -from google.cloud.bigtable import enums +from .row_data import DEFAULT_RETRY_READ_ROWS +from .row_set import RowSet +from .row_set import RowRange +from . import enums from google.cloud.bigtable_v2.types import bigtable as data_messages_v2_pb2 from google.cloud.bigtable_admin_v2 import BigtableTableAdminClient from google.cloud.bigtable_admin_v2.types import table as admin_messages_v2_pb2 From 0a5a4160249c5f75976766bacd61c8fd2be8e16c Mon Sep 17 00:00:00 2001 From: Daniel Sanche Date: Fri, 15 Aug 2025 15:40:57 -0700 Subject: [PATCH 3/5] moved admin client to new directory --- google/cloud/bigtable/admin/__init__.py | 512 ++++++------------ .../admin}/gapic_metadata.json | 0 .../admin}/gapic_version.py | 0 google/cloud/bigtable/admin/py.typed | 2 + .../admin}/services/__init__.py | 0 .../bigtable_instance_admin/__init__.py | 0 .../bigtable_instance_admin/async_client.py | 136 ++--- .../bigtable_instance_admin/client.py | 136 ++--- .../bigtable_instance_admin/pagers.py | 68 +-- .../transports/README.rst | 0 .../transports/__init__.py | 0 .../transports/base.py | 6 +- .../transports/grpc.py | 4 +- .../transports/grpc_asyncio.py | 4 +- .../transports/rest.py | 4 +- .../transports/rest_base.py | 4 +- .../services/bigtable_table_admin/__init__.py | 0 .../bigtable_table_admin/async_client.py | 124 ++--- .../services/bigtable_table_admin/client.py | 124 ++--- .../services/bigtable_table_admin/pagers.py | 68 +-- .../transports/README.rst | 0 .../transports/__init__.py | 0 .../bigtable_table_admin/transports/base.py | 8 +- .../bigtable_table_admin/transports/grpc.py | 6 +- .../transports/grpc_asyncio.py | 6 +- .../bigtable_table_admin/transports/rest.py | 6 +- .../transports/rest_base.py | 6 +- .../admin}/types/__init__.py | 0 .../admin}/types/bigtable_instance_admin.py | 58 +- .../admin}/types/bigtable_table_admin.py | 64 +-- .../admin}/types/common.py | 0 .../admin}/types/instance.py | 38 +- .../admin}/types/table.py | 52 +- .../admin}/types/types.py | 76 +-- google/cloud/bigtable_admin_v2/__init__.py | 264 ++------- 35 files changed, 711 insertions(+), 1065 deletions(-) rename google/cloud/{bigtable_admin_v2 => bigtable/admin}/gapic_metadata.json (100%) rename google/cloud/{bigtable_admin_v2 => bigtable/admin}/gapic_version.py (100%) create mode 100644 google/cloud/bigtable/admin/py.typed rename google/cloud/{bigtable_admin_v2 => bigtable/admin}/services/__init__.py (100%) rename google/cloud/{bigtable_admin_v2 => bigtable/admin}/services/bigtable_instance_admin/__init__.py (100%) rename google/cloud/{bigtable_admin_v2 => bigtable/admin}/services/bigtable_instance_admin/async_client.py (95%) rename google/cloud/{bigtable_admin_v2 => bigtable/admin}/services/bigtable_instance_admin/client.py (96%) rename google/cloud/{bigtable_admin_v2 => bigtable/admin}/services/bigtable_instance_admin/pagers.py (89%) rename google/cloud/{bigtable_admin_v2 => bigtable/admin}/services/bigtable_instance_admin/transports/README.rst (100%) rename google/cloud/{bigtable_admin_v2 => bigtable/admin}/services/bigtable_instance_admin/transports/__init__.py (100%) rename google/cloud/{bigtable_admin_v2 => bigtable/admin}/services/bigtable_instance_admin/transports/base.py (99%) rename google/cloud/{bigtable_admin_v2 => bigtable/admin}/services/bigtable_instance_admin/transports/grpc.py (99%) rename google/cloud/{bigtable_admin_v2 => bigtable/admin}/services/bigtable_instance_admin/transports/grpc_asyncio.py (99%) rename google/cloud/{bigtable_admin_v2 => bigtable/admin}/services/bigtable_instance_admin/transports/rest.py (99%) rename google/cloud/{bigtable_admin_v2 => bigtable/admin}/services/bigtable_instance_admin/transports/rest_base.py (99%) rename google/cloud/{bigtable_admin_v2 => bigtable/admin}/services/bigtable_table_admin/__init__.py (100%) rename google/cloud/{bigtable_admin_v2 => bigtable/admin}/services/bigtable_table_admin/async_client.py (96%) rename google/cloud/{bigtable_admin_v2 => bigtable/admin}/services/bigtable_table_admin/client.py (96%) rename google/cloud/{bigtable_admin_v2 => bigtable/admin}/services/bigtable_table_admin/pagers.py (89%) rename google/cloud/{bigtable_admin_v2 => bigtable/admin}/services/bigtable_table_admin/transports/README.rst (100%) rename google/cloud/{bigtable_admin_v2 => bigtable/admin}/services/bigtable_table_admin/transports/__init__.py (100%) rename google/cloud/{bigtable_admin_v2 => bigtable/admin}/services/bigtable_table_admin/transports/base.py (98%) rename google/cloud/{bigtable_admin_v2 => bigtable/admin}/services/bigtable_table_admin/transports/grpc.py (99%) rename google/cloud/{bigtable_admin_v2 => bigtable/admin}/services/bigtable_table_admin/transports/grpc_asyncio.py (99%) rename google/cloud/{bigtable_admin_v2 => bigtable/admin}/services/bigtable_table_admin/transports/rest.py (99%) rename google/cloud/{bigtable_admin_v2 => bigtable/admin}/services/bigtable_table_admin/transports/rest_base.py (99%) rename google/cloud/{bigtable_admin_v2 => bigtable/admin}/types/__init__.py (100%) rename google/cloud/{bigtable_admin_v2 => bigtable/admin}/types/bigtable_instance_admin.py (94%) rename google/cloud/{bigtable_admin_v2 => bigtable/admin}/types/bigtable_table_admin.py (95%) rename google/cloud/{bigtable_admin_v2 => bigtable/admin}/types/common.py (100%) rename google/cloud/{bigtable_admin_v2 => bigtable/admin}/types/instance.py (94%) rename google/cloud/{bigtable_admin_v2 => bigtable/admin}/types/table.py (95%) rename google/cloud/{bigtable_admin_v2 => bigtable/admin}/types/types.py (88%) diff --git a/google/cloud/bigtable/admin/__init__.py b/google/cloud/bigtable/admin/__init__.py index c8f2a4482..3ca91beda 100644 --- a/google/cloud/bigtable/admin/__init__.py +++ b/google/cloud/bigtable/admin/__init__.py @@ -13,292 +13,149 @@ # See the License for the specific language governing permissions and # limitations under the License. # -from google.cloud.bigtable_admin import gapic_version as package_version +from google.cloud.bigtable.admin import gapic_version as package_version __version__ = package_version.__version__ -from google.cloud.bigtable_admin_v2.services.bigtable_instance_admin.client import ( - BigtableInstanceAdminClient, -) -from google.cloud.bigtable_admin_v2.services.bigtable_instance_admin.async_client import ( - BigtableInstanceAdminAsyncClient, -) -from google.cloud.bigtable_admin_v2.services.bigtable_table_admin.client import ( - BigtableTableAdminClient, -) -from google.cloud.bigtable_admin_v2.services.bigtable_table_admin.async_client import ( - BigtableTableAdminAsyncClient, -) +from .services.bigtable_instance_admin import BigtableInstanceAdminClient +from .services.bigtable_instance_admin import BigtableInstanceAdminAsyncClient +from .services.bigtable_table_admin import BigtableTableAdminClient +from .services.bigtable_table_admin import BigtableTableAdminAsyncClient -from google.cloud.bigtable_admin_v2.types.bigtable_instance_admin import ( - CreateAppProfileRequest, -) -from google.cloud.bigtable_admin_v2.types.bigtable_instance_admin import ( - CreateClusterMetadata, -) -from google.cloud.bigtable_admin_v2.types.bigtable_instance_admin import ( - CreateClusterRequest, -) -from google.cloud.bigtable_admin_v2.types.bigtable_instance_admin import ( - CreateInstanceMetadata, -) -from google.cloud.bigtable_admin_v2.types.bigtable_instance_admin import ( - CreateInstanceRequest, -) -from google.cloud.bigtable_admin_v2.types.bigtable_instance_admin import ( - CreateLogicalViewMetadata, -) -from google.cloud.bigtable_admin_v2.types.bigtable_instance_admin import ( - CreateLogicalViewRequest, -) -from google.cloud.bigtable_admin_v2.types.bigtable_instance_admin import ( - CreateMaterializedViewMetadata, -) -from google.cloud.bigtable_admin_v2.types.bigtable_instance_admin import ( - CreateMaterializedViewRequest, -) -from google.cloud.bigtable_admin_v2.types.bigtable_instance_admin import ( - DeleteAppProfileRequest, -) -from google.cloud.bigtable_admin_v2.types.bigtable_instance_admin import ( - DeleteClusterRequest, -) -from google.cloud.bigtable_admin_v2.types.bigtable_instance_admin import ( - DeleteInstanceRequest, -) -from google.cloud.bigtable_admin_v2.types.bigtable_instance_admin import ( - DeleteLogicalViewRequest, -) -from google.cloud.bigtable_admin_v2.types.bigtable_instance_admin import ( - DeleteMaterializedViewRequest, -) -from google.cloud.bigtable_admin_v2.types.bigtable_instance_admin import ( - GetAppProfileRequest, -) -from google.cloud.bigtable_admin_v2.types.bigtable_instance_admin import ( - GetClusterRequest, -) -from google.cloud.bigtable_admin_v2.types.bigtable_instance_admin import ( - GetInstanceRequest, -) -from google.cloud.bigtable_admin_v2.types.bigtable_instance_admin import ( - GetLogicalViewRequest, -) -from google.cloud.bigtable_admin_v2.types.bigtable_instance_admin import ( - GetMaterializedViewRequest, -) -from google.cloud.bigtable_admin_v2.types.bigtable_instance_admin import ( - ListAppProfilesRequest, -) -from google.cloud.bigtable_admin_v2.types.bigtable_instance_admin import ( - ListAppProfilesResponse, -) -from google.cloud.bigtable_admin_v2.types.bigtable_instance_admin import ( - ListClustersRequest, -) -from google.cloud.bigtable_admin_v2.types.bigtable_instance_admin import ( - ListClustersResponse, -) -from google.cloud.bigtable_admin_v2.types.bigtable_instance_admin import ( - ListHotTabletsRequest, -) -from google.cloud.bigtable_admin_v2.types.bigtable_instance_admin import ( - ListHotTabletsResponse, -) -from google.cloud.bigtable_admin_v2.types.bigtable_instance_admin import ( - ListInstancesRequest, -) -from google.cloud.bigtable_admin_v2.types.bigtable_instance_admin import ( - ListInstancesResponse, -) -from google.cloud.bigtable_admin_v2.types.bigtable_instance_admin import ( - ListLogicalViewsRequest, -) -from google.cloud.bigtable_admin_v2.types.bigtable_instance_admin import ( - ListLogicalViewsResponse, -) -from google.cloud.bigtable_admin_v2.types.bigtable_instance_admin import ( - ListMaterializedViewsRequest, -) -from google.cloud.bigtable_admin_v2.types.bigtable_instance_admin import ( - ListMaterializedViewsResponse, -) -from google.cloud.bigtable_admin_v2.types.bigtable_instance_admin import ( - PartialUpdateClusterMetadata, -) -from google.cloud.bigtable_admin_v2.types.bigtable_instance_admin import ( - PartialUpdateClusterRequest, -) -from google.cloud.bigtable_admin_v2.types.bigtable_instance_admin import ( - PartialUpdateInstanceRequest, -) -from google.cloud.bigtable_admin_v2.types.bigtable_instance_admin import ( - UpdateAppProfileMetadata, -) -from google.cloud.bigtable_admin_v2.types.bigtable_instance_admin import ( - UpdateAppProfileRequest, -) -from google.cloud.bigtable_admin_v2.types.bigtable_instance_admin import ( - UpdateClusterMetadata, -) -from google.cloud.bigtable_admin_v2.types.bigtable_instance_admin import ( - UpdateInstanceMetadata, -) -from google.cloud.bigtable_admin_v2.types.bigtable_instance_admin import ( - UpdateLogicalViewMetadata, -) -from google.cloud.bigtable_admin_v2.types.bigtable_instance_admin import ( - UpdateLogicalViewRequest, -) -from google.cloud.bigtable_admin_v2.types.bigtable_instance_admin import ( - UpdateMaterializedViewMetadata, -) -from google.cloud.bigtable_admin_v2.types.bigtable_instance_admin import ( - UpdateMaterializedViewRequest, -) -from google.cloud.bigtable_admin_v2.types.bigtable_table_admin import ( - CheckConsistencyRequest, -) -from google.cloud.bigtable_admin_v2.types.bigtable_table_admin import ( - CheckConsistencyResponse, -) -from google.cloud.bigtable_admin_v2.types.bigtable_table_admin import CopyBackupMetadata -from google.cloud.bigtable_admin_v2.types.bigtable_table_admin import CopyBackupRequest -from google.cloud.bigtable_admin_v2.types.bigtable_table_admin import ( - CreateAuthorizedViewMetadata, -) -from google.cloud.bigtable_admin_v2.types.bigtable_table_admin import ( - CreateAuthorizedViewRequest, -) -from google.cloud.bigtable_admin_v2.types.bigtable_table_admin import ( - CreateBackupMetadata, -) -from google.cloud.bigtable_admin_v2.types.bigtable_table_admin import ( - CreateBackupRequest, -) -from google.cloud.bigtable_admin_v2.types.bigtable_table_admin import ( - CreateTableFromSnapshotMetadata, -) -from google.cloud.bigtable_admin_v2.types.bigtable_table_admin import ( - CreateTableFromSnapshotRequest, -) -from google.cloud.bigtable_admin_v2.types.bigtable_table_admin import CreateTableRequest -from google.cloud.bigtable_admin_v2.types.bigtable_table_admin import ( - DataBoostReadLocalWrites, -) -from google.cloud.bigtable_admin_v2.types.bigtable_table_admin import ( - DeleteAuthorizedViewRequest, -) -from google.cloud.bigtable_admin_v2.types.bigtable_table_admin import ( - DeleteBackupRequest, -) -from google.cloud.bigtable_admin_v2.types.bigtable_table_admin import ( - DeleteSnapshotRequest, -) -from google.cloud.bigtable_admin_v2.types.bigtable_table_admin import DeleteTableRequest -from google.cloud.bigtable_admin_v2.types.bigtable_table_admin import ( - DropRowRangeRequest, -) -from google.cloud.bigtable_admin_v2.types.bigtable_table_admin import ( - GenerateConsistencyTokenRequest, -) -from google.cloud.bigtable_admin_v2.types.bigtable_table_admin import ( - GenerateConsistencyTokenResponse, -) -from google.cloud.bigtable_admin_v2.types.bigtable_table_admin import ( - GetAuthorizedViewRequest, -) -from google.cloud.bigtable_admin_v2.types.bigtable_table_admin import GetBackupRequest -from google.cloud.bigtable_admin_v2.types.bigtable_table_admin import GetSnapshotRequest -from google.cloud.bigtable_admin_v2.types.bigtable_table_admin import GetTableRequest -from google.cloud.bigtable_admin_v2.types.bigtable_table_admin import ( - ListAuthorizedViewsRequest, -) -from google.cloud.bigtable_admin_v2.types.bigtable_table_admin import ( - ListAuthorizedViewsResponse, -) -from google.cloud.bigtable_admin_v2.types.bigtable_table_admin import ListBackupsRequest -from google.cloud.bigtable_admin_v2.types.bigtable_table_admin import ( - ListBackupsResponse, -) -from google.cloud.bigtable_admin_v2.types.bigtable_table_admin import ( - ListSnapshotsRequest, -) -from google.cloud.bigtable_admin_v2.types.bigtable_table_admin import ( - ListSnapshotsResponse, -) -from google.cloud.bigtable_admin_v2.types.bigtable_table_admin import ListTablesRequest -from google.cloud.bigtable_admin_v2.types.bigtable_table_admin import ListTablesResponse -from google.cloud.bigtable_admin_v2.types.bigtable_table_admin import ( - ModifyColumnFamiliesRequest, -) -from google.cloud.bigtable_admin_v2.types.bigtable_table_admin import ( - OptimizeRestoredTableMetadata, -) -from google.cloud.bigtable_admin_v2.types.bigtable_table_admin import ( - RestoreTableMetadata, -) -from google.cloud.bigtable_admin_v2.types.bigtable_table_admin import ( - RestoreTableRequest, -) -from google.cloud.bigtable_admin_v2.types.bigtable_table_admin import ( - SnapshotTableMetadata, -) -from google.cloud.bigtable_admin_v2.types.bigtable_table_admin import ( - SnapshotTableRequest, -) -from google.cloud.bigtable_admin_v2.types.bigtable_table_admin import ( - StandardReadRemoteWrites, -) -from google.cloud.bigtable_admin_v2.types.bigtable_table_admin import ( - UndeleteTableMetadata, -) -from google.cloud.bigtable_admin_v2.types.bigtable_table_admin import ( - UndeleteTableRequest, -) -from google.cloud.bigtable_admin_v2.types.bigtable_table_admin import ( - UpdateAuthorizedViewMetadata, -) -from google.cloud.bigtable_admin_v2.types.bigtable_table_admin import ( - UpdateAuthorizedViewRequest, -) -from google.cloud.bigtable_admin_v2.types.bigtable_table_admin import ( - UpdateBackupRequest, -) -from google.cloud.bigtable_admin_v2.types.bigtable_table_admin import ( - UpdateTableMetadata, -) -from google.cloud.bigtable_admin_v2.types.bigtable_table_admin import UpdateTableRequest -from google.cloud.bigtable_admin_v2.types.common import OperationProgress -from google.cloud.bigtable_admin_v2.types.common import StorageType -from google.cloud.bigtable_admin_v2.types.instance import AppProfile -from google.cloud.bigtable_admin_v2.types.instance import AutoscalingLimits -from google.cloud.bigtable_admin_v2.types.instance import AutoscalingTargets -from google.cloud.bigtable_admin_v2.types.instance import Cluster -from google.cloud.bigtable_admin_v2.types.instance import HotTablet -from google.cloud.bigtable_admin_v2.types.instance import Instance -from google.cloud.bigtable_admin_v2.types.instance import LogicalView -from google.cloud.bigtable_admin_v2.types.instance import MaterializedView -from google.cloud.bigtable_admin_v2.types.table import AuthorizedView -from google.cloud.bigtable_admin_v2.types.table import Backup -from google.cloud.bigtable_admin_v2.types.table import BackupInfo -from google.cloud.bigtable_admin_v2.types.table import ChangeStreamConfig -from google.cloud.bigtable_admin_v2.types.table import ColumnFamily -from google.cloud.bigtable_admin_v2.types.table import EncryptionInfo -from google.cloud.bigtable_admin_v2.types.table import GcRule -from google.cloud.bigtable_admin_v2.types.table import RestoreInfo -from google.cloud.bigtable_admin_v2.types.table import Snapshot -from google.cloud.bigtable_admin_v2.types.table import Table -from google.cloud.bigtable_admin_v2.types.table import RestoreSourceType -from google.cloud.bigtable_admin_v2.types.types import Type +from .types.bigtable_instance_admin import CreateAppProfileRequest +from .types.bigtable_instance_admin import CreateClusterMetadata +from .types.bigtable_instance_admin import CreateClusterRequest +from .types.bigtable_instance_admin import CreateInstanceMetadata +from .types.bigtable_instance_admin import CreateInstanceRequest +from .types.bigtable_instance_admin import CreateLogicalViewMetadata +from .types.bigtable_instance_admin import CreateLogicalViewRequest +from .types.bigtable_instance_admin import CreateMaterializedViewMetadata +from .types.bigtable_instance_admin import CreateMaterializedViewRequest +from .types.bigtable_instance_admin import DeleteAppProfileRequest +from .types.bigtable_instance_admin import DeleteClusterRequest +from .types.bigtable_instance_admin import DeleteInstanceRequest +from .types.bigtable_instance_admin import DeleteLogicalViewRequest +from .types.bigtable_instance_admin import DeleteMaterializedViewRequest +from .types.bigtable_instance_admin import GetAppProfileRequest +from .types.bigtable_instance_admin import GetClusterRequest +from .types.bigtable_instance_admin import GetInstanceRequest +from .types.bigtable_instance_admin import GetLogicalViewRequest +from .types.bigtable_instance_admin import GetMaterializedViewRequest +from .types.bigtable_instance_admin import ListAppProfilesRequest +from .types.bigtable_instance_admin import ListAppProfilesResponse +from .types.bigtable_instance_admin import ListClustersRequest +from .types.bigtable_instance_admin import ListClustersResponse +from .types.bigtable_instance_admin import ListHotTabletsRequest +from .types.bigtable_instance_admin import ListHotTabletsResponse +from .types.bigtable_instance_admin import ListInstancesRequest +from .types.bigtable_instance_admin import ListInstancesResponse +from .types.bigtable_instance_admin import ListLogicalViewsRequest +from .types.bigtable_instance_admin import ListLogicalViewsResponse +from .types.bigtable_instance_admin import ListMaterializedViewsRequest +from .types.bigtable_instance_admin import ListMaterializedViewsResponse +from .types.bigtable_instance_admin import PartialUpdateClusterMetadata +from .types.bigtable_instance_admin import PartialUpdateClusterRequest +from .types.bigtable_instance_admin import PartialUpdateInstanceRequest +from .types.bigtable_instance_admin import UpdateAppProfileMetadata +from .types.bigtable_instance_admin import UpdateAppProfileRequest +from .types.bigtable_instance_admin import UpdateClusterMetadata +from .types.bigtable_instance_admin import UpdateInstanceMetadata +from .types.bigtable_instance_admin import UpdateLogicalViewMetadata +from .types.bigtable_instance_admin import UpdateLogicalViewRequest +from .types.bigtable_instance_admin import UpdateMaterializedViewMetadata +from .types.bigtable_instance_admin import UpdateMaterializedViewRequest +from .types.bigtable_table_admin import CheckConsistencyRequest +from .types.bigtable_table_admin import CheckConsistencyResponse +from .types.bigtable_table_admin import CopyBackupMetadata +from .types.bigtable_table_admin import CopyBackupRequest +from .types.bigtable_table_admin import CreateAuthorizedViewMetadata +from .types.bigtable_table_admin import CreateAuthorizedViewRequest +from .types.bigtable_table_admin import CreateBackupMetadata +from .types.bigtable_table_admin import CreateBackupRequest +from .types.bigtable_table_admin import CreateTableFromSnapshotMetadata +from .types.bigtable_table_admin import CreateTableFromSnapshotRequest +from .types.bigtable_table_admin import CreateTableRequest +from .types.bigtable_table_admin import DataBoostReadLocalWrites +from .types.bigtable_table_admin import DeleteAuthorizedViewRequest +from .types.bigtable_table_admin import DeleteBackupRequest +from .types.bigtable_table_admin import DeleteSnapshotRequest +from .types.bigtable_table_admin import DeleteTableRequest +from .types.bigtable_table_admin import DropRowRangeRequest +from .types.bigtable_table_admin import GenerateConsistencyTokenRequest +from .types.bigtable_table_admin import GenerateConsistencyTokenResponse +from .types.bigtable_table_admin import GetAuthorizedViewRequest +from .types.bigtable_table_admin import GetBackupRequest +from .types.bigtable_table_admin import GetSnapshotRequest +from .types.bigtable_table_admin import GetTableRequest +from .types.bigtable_table_admin import ListAuthorizedViewsRequest +from .types.bigtable_table_admin import ListAuthorizedViewsResponse +from .types.bigtable_table_admin import ListBackupsRequest +from .types.bigtable_table_admin import ListBackupsResponse +from .types.bigtable_table_admin import ListSnapshotsRequest +from .types.bigtable_table_admin import ListSnapshotsResponse +from .types.bigtable_table_admin import ListTablesRequest +from .types.bigtable_table_admin import ListTablesResponse +from .types.bigtable_table_admin import ModifyColumnFamiliesRequest +from .types.bigtable_table_admin import OptimizeRestoredTableMetadata +from .types.bigtable_table_admin import RestoreTableMetadata +from .types.bigtable_table_admin import RestoreTableRequest +from .types.bigtable_table_admin import SnapshotTableMetadata +from .types.bigtable_table_admin import SnapshotTableRequest +from .types.bigtable_table_admin import StandardReadRemoteWrites +from .types.bigtable_table_admin import UndeleteTableMetadata +from .types.bigtable_table_admin import UndeleteTableRequest +from .types.bigtable_table_admin import UpdateAuthorizedViewMetadata +from .types.bigtable_table_admin import UpdateAuthorizedViewRequest +from .types.bigtable_table_admin import UpdateBackupRequest +from .types.bigtable_table_admin import UpdateTableMetadata +from .types.bigtable_table_admin import UpdateTableRequest +from .types.common import OperationProgress +from .types.common import StorageType +from .types.instance import AppProfile +from .types.instance import AutoscalingLimits +from .types.instance import AutoscalingTargets +from .types.instance import Cluster +from .types.instance import HotTablet +from .types.instance import Instance +from .types.instance import LogicalView +from .types.instance import MaterializedView +from .types.table import AuthorizedView +from .types.table import Backup +from .types.table import BackupInfo +from .types.table import ChangeStreamConfig +from .types.table import ColumnFamily +from .types.table import EncryptionInfo +from .types.table import GcRule +from .types.table import RestoreInfo +from .types.table import Snapshot +from .types.table import Table +from .types.table import RestoreSourceType +from .types.types import Type __all__ = ( - "BigtableInstanceAdminClient", "BigtableInstanceAdminAsyncClient", - "BigtableTableAdminClient", "BigtableTableAdminAsyncClient", + "AppProfile", + "AuthorizedView", + "AutoscalingLimits", + "AutoscalingTargets", + "Backup", + "BackupInfo", + "BigtableInstanceAdminClient", + "BigtableTableAdminClient", + "ChangeStreamConfig", + "CheckConsistencyRequest", + "CheckConsistencyResponse", + "Cluster", + "ColumnFamily", + "CopyBackupMetadata", + "CopyBackupRequest", "CreateAppProfileRequest", + "CreateAuthorizedViewMetadata", + "CreateAuthorizedViewRequest", + "CreateBackupMetadata", + "CreateBackupRequest", "CreateClusterMetadata", "CreateClusterRequest", "CreateInstanceMetadata", @@ -307,18 +164,41 @@ "CreateLogicalViewRequest", "CreateMaterializedViewMetadata", "CreateMaterializedViewRequest", + "CreateTableFromSnapshotMetadata", + "CreateTableFromSnapshotRequest", + "CreateTableRequest", + "DataBoostReadLocalWrites", "DeleteAppProfileRequest", + "DeleteAuthorizedViewRequest", + "DeleteBackupRequest", "DeleteClusterRequest", "DeleteInstanceRequest", "DeleteLogicalViewRequest", "DeleteMaterializedViewRequest", + "DeleteSnapshotRequest", + "DeleteTableRequest", + "DropRowRangeRequest", + "EncryptionInfo", + "GcRule", + "GenerateConsistencyTokenRequest", + "GenerateConsistencyTokenResponse", "GetAppProfileRequest", + "GetAuthorizedViewRequest", + "GetBackupRequest", "GetClusterRequest", "GetInstanceRequest", "GetLogicalViewRequest", "GetMaterializedViewRequest", + "GetSnapshotRequest", + "GetTableRequest", + "HotTablet", + "Instance", "ListAppProfilesRequest", "ListAppProfilesResponse", + "ListAuthorizedViewsRequest", + "ListAuthorizedViewsResponse", + "ListBackupsRequest", + "ListBackupsResponse", "ListClustersRequest", "ListClustersResponse", "ListHotTabletsRequest", @@ -329,82 +209,42 @@ "ListLogicalViewsResponse", "ListMaterializedViewsRequest", "ListMaterializedViewsResponse", - "PartialUpdateClusterMetadata", - "PartialUpdateClusterRequest", - "PartialUpdateInstanceRequest", - "UpdateAppProfileMetadata", - "UpdateAppProfileRequest", - "UpdateClusterMetadata", - "UpdateInstanceMetadata", - "UpdateLogicalViewMetadata", - "UpdateLogicalViewRequest", - "UpdateMaterializedViewMetadata", - "UpdateMaterializedViewRequest", - "CheckConsistencyRequest", - "CheckConsistencyResponse", - "CopyBackupMetadata", - "CopyBackupRequest", - "CreateAuthorizedViewMetadata", - "CreateAuthorizedViewRequest", - "CreateBackupMetadata", - "CreateBackupRequest", - "CreateTableFromSnapshotMetadata", - "CreateTableFromSnapshotRequest", - "CreateTableRequest", - "DataBoostReadLocalWrites", - "DeleteAuthorizedViewRequest", - "DeleteBackupRequest", - "DeleteSnapshotRequest", - "DeleteTableRequest", - "DropRowRangeRequest", - "GenerateConsistencyTokenRequest", - "GenerateConsistencyTokenResponse", - "GetAuthorizedViewRequest", - "GetBackupRequest", - "GetSnapshotRequest", - "GetTableRequest", - "ListAuthorizedViewsRequest", - "ListAuthorizedViewsResponse", - "ListBackupsRequest", - "ListBackupsResponse", "ListSnapshotsRequest", "ListSnapshotsResponse", "ListTablesRequest", "ListTablesResponse", + "LogicalView", + "MaterializedView", "ModifyColumnFamiliesRequest", + "OperationProgress", "OptimizeRestoredTableMetadata", + "PartialUpdateClusterMetadata", + "PartialUpdateClusterRequest", + "PartialUpdateInstanceRequest", + "RestoreInfo", + "RestoreSourceType", "RestoreTableMetadata", "RestoreTableRequest", + "Snapshot", "SnapshotTableMetadata", "SnapshotTableRequest", "StandardReadRemoteWrites", + "StorageType", + "Table", + "Type", "UndeleteTableMetadata", "UndeleteTableRequest", + "UpdateAppProfileMetadata", + "UpdateAppProfileRequest", "UpdateAuthorizedViewMetadata", "UpdateAuthorizedViewRequest", "UpdateBackupRequest", + "UpdateClusterMetadata", + "UpdateInstanceMetadata", + "UpdateLogicalViewMetadata", + "UpdateLogicalViewRequest", + "UpdateMaterializedViewMetadata", + "UpdateMaterializedViewRequest", "UpdateTableMetadata", "UpdateTableRequest", - "OperationProgress", - "StorageType", - "AppProfile", - "AutoscalingLimits", - "AutoscalingTargets", - "Cluster", - "HotTablet", - "Instance", - "LogicalView", - "MaterializedView", - "AuthorizedView", - "Backup", - "BackupInfo", - "ChangeStreamConfig", - "ColumnFamily", - "EncryptionInfo", - "GcRule", - "RestoreInfo", - "Snapshot", - "Table", - "RestoreSourceType", - "Type", ) diff --git a/google/cloud/bigtable_admin_v2/gapic_metadata.json b/google/cloud/bigtable/admin/gapic_metadata.json similarity index 100% rename from google/cloud/bigtable_admin_v2/gapic_metadata.json rename to google/cloud/bigtable/admin/gapic_metadata.json diff --git a/google/cloud/bigtable_admin_v2/gapic_version.py b/google/cloud/bigtable/admin/gapic_version.py similarity index 100% rename from google/cloud/bigtable_admin_v2/gapic_version.py rename to google/cloud/bigtable/admin/gapic_version.py diff --git a/google/cloud/bigtable/admin/py.typed b/google/cloud/bigtable/admin/py.typed new file mode 100644 index 000000000..bc26f2069 --- /dev/null +++ b/google/cloud/bigtable/admin/py.typed @@ -0,0 +1,2 @@ +# Marker file for PEP 561. +# The google-cloud-bigtable-admin package uses inline types. diff --git a/google/cloud/bigtable_admin_v2/services/__init__.py b/google/cloud/bigtable/admin/services/__init__.py similarity index 100% rename from google/cloud/bigtable_admin_v2/services/__init__.py rename to google/cloud/bigtable/admin/services/__init__.py diff --git a/google/cloud/bigtable_admin_v2/services/bigtable_instance_admin/__init__.py b/google/cloud/bigtable/admin/services/bigtable_instance_admin/__init__.py similarity index 100% rename from google/cloud/bigtable_admin_v2/services/bigtable_instance_admin/__init__.py rename to google/cloud/bigtable/admin/services/bigtable_instance_admin/__init__.py diff --git a/google/cloud/bigtable_admin_v2/services/bigtable_instance_admin/async_client.py b/google/cloud/bigtable/admin/services/bigtable_instance_admin/async_client.py similarity index 95% rename from google/cloud/bigtable_admin_v2/services/bigtable_instance_admin/async_client.py rename to google/cloud/bigtable/admin/services/bigtable_instance_admin/async_client.py index b150b7123..79f77eb68 100644 --- a/google/cloud/bigtable_admin_v2/services/bigtable_instance_admin/async_client.py +++ b/google/cloud/bigtable/admin/services/bigtable_instance_admin/async_client.py @@ -29,7 +29,7 @@ Union, ) -from google.cloud.bigtable_admin_v2 import gapic_version as package_version +from google.cloud.bigtable.admin import gapic_version as package_version from google.api_core.client_options import ClientOptions from google.api_core import exceptions as core_exceptions @@ -47,11 +47,11 @@ from google.api_core import operation # type: ignore from google.api_core import operation_async # type: ignore -from google.cloud.bigtable_admin_v2.services.bigtable_instance_admin import pagers -from google.cloud.bigtable_admin_v2.types import bigtable_instance_admin -from google.cloud.bigtable_admin_v2.types import common -from google.cloud.bigtable_admin_v2.types import instance -from google.cloud.bigtable_admin_v2.types import instance as gba_instance +from google.cloud.bigtable.admin.services.bigtable_instance_admin import pagers +from google.cloud.bigtable.admin.types import bigtable_instance_admin +from google.cloud.bigtable.admin.types import common +from google.cloud.bigtable.admin.types import instance +from google.cloud.bigtable.admin.types import instance as gba_instance from google.iam.v1 import iam_policy_pb2 # type: ignore from google.iam.v1 import policy_pb2 # type: ignore from google.protobuf import field_mask_pb2 # type: ignore @@ -355,7 +355,7 @@ async def create_instance( non-empty, then autoscaling is enabled. Args: - request (Optional[Union[google.cloud.bigtable_admin_v2.types.CreateInstanceRequest, dict]]): + request (Optional[Union[google.cloud.bigtable.admin.types.CreateInstanceRequest, dict]]): The request object. Request message for BigtableInstanceAdmin.CreateInstance. parent (:class:`str`): @@ -374,14 +374,14 @@ async def create_instance( This corresponds to the ``instance_id`` field on the ``request`` instance; if ``request`` is provided, this should not be set. - instance (:class:`google.cloud.bigtable_admin_v2.types.Instance`): + instance (:class:`google.cloud.bigtable.admin.types.Instance`): Required. The instance to create. Fields marked ``OutputOnly`` must be left blank. This corresponds to the ``instance`` field on the ``request`` instance; if ``request`` is provided, this should not be set. - clusters (:class:`MutableMapping[str, google.cloud.bigtable_admin_v2.types.Cluster]`): + clusters (:class:`MutableMapping[str, google.cloud.bigtable.admin.types.Cluster]`): Required. The clusters to be created within the instance, mapped by desired cluster ID, e.g., just ``mycluster`` rather than @@ -403,7 +403,7 @@ async def create_instance( google.api_core.operation_async.AsyncOperation: An object representing a long-running operation. - The result type for the operation will be :class:`google.cloud.bigtable_admin_v2.types.Instance` A collection of Bigtable [Tables][google.bigtable.admin.v2.Table] and + The result type for the operation will be :class:`google.cloud.bigtable.admin.types.Instance` A collection of Bigtable [Tables][google.bigtable.admin.v2.Table] and the resources that serve them. All tables in an instance are served from all [Clusters][google.bigtable.admin.v2.Cluster] in the @@ -488,7 +488,7 @@ async def get_instance( r"""Gets information about an instance. Args: - request (Optional[Union[google.cloud.bigtable_admin_v2.types.GetInstanceRequest, dict]]): + request (Optional[Union[google.cloud.bigtable.admin.types.GetInstanceRequest, dict]]): The request object. Request message for BigtableInstanceAdmin.GetInstance. name (:class:`str`): @@ -508,7 +508,7 @@ async def get_instance( be of type `bytes`. Returns: - google.cloud.bigtable_admin_v2.types.Instance: + google.cloud.bigtable.admin.types.Instance: A collection of Bigtable [Tables][google.bigtable.admin.v2.Table] and the resources that serve them. All tables in an instance are served from all @@ -579,7 +579,7 @@ async def list_instances( r"""Lists information about instances in a project. Args: - request (Optional[Union[google.cloud.bigtable_admin_v2.types.ListInstancesRequest, dict]]): + request (Optional[Union[google.cloud.bigtable.admin.types.ListInstancesRequest, dict]]): The request object. Request message for BigtableInstanceAdmin.ListInstances. parent (:class:`str`): @@ -599,7 +599,7 @@ async def list_instances( be of type `bytes`. Returns: - google.cloud.bigtable_admin_v2.types.ListInstancesResponse: + google.cloud.bigtable.admin.types.ListInstancesResponse: Response message for BigtableInstanceAdmin.ListInstances. @@ -667,7 +667,7 @@ async def update_instance( PartialUpdateInstance. Args: - request (Optional[Union[google.cloud.bigtable_admin_v2.types.Instance, dict]]): + request (Optional[Union[google.cloud.bigtable.admin.types.Instance, dict]]): The request object. A collection of Bigtable [Tables][google.bigtable.admin.v2.Table] and the resources that serve them. All tables in an instance are @@ -683,7 +683,7 @@ async def update_instance( be of type `bytes`. Returns: - google.cloud.bigtable_admin_v2.types.Instance: + google.cloud.bigtable.admin.types.Instance: A collection of Bigtable [Tables][google.bigtable.admin.v2.Table] and the resources that serve them. All tables in an instance are served from all @@ -740,10 +740,10 @@ async def partial_update_instance( preferred way to update an Instance. Args: - request (Optional[Union[google.cloud.bigtable_admin_v2.types.PartialUpdateInstanceRequest, dict]]): + request (Optional[Union[google.cloud.bigtable.admin.types.PartialUpdateInstanceRequest, dict]]): The request object. Request message for BigtableInstanceAdmin.PartialUpdateInstance. - instance (:class:`google.cloud.bigtable_admin_v2.types.Instance`): + instance (:class:`google.cloud.bigtable.admin.types.Instance`): Required. The Instance which will (partially) replace the current value. @@ -770,7 +770,7 @@ async def partial_update_instance( google.api_core.operation_async.AsyncOperation: An object representing a long-running operation. - The result type for the operation will be :class:`google.cloud.bigtable_admin_v2.types.Instance` A collection of Bigtable [Tables][google.bigtable.admin.v2.Table] and + The result type for the operation will be :class:`google.cloud.bigtable.admin.types.Instance` A collection of Bigtable [Tables][google.bigtable.admin.v2.Table] and the resources that serve them. All tables in an instance are served from all [Clusters][google.bigtable.admin.v2.Cluster] in the @@ -854,7 +854,7 @@ async def delete_instance( r"""Delete an instance from a project. Args: - request (Optional[Union[google.cloud.bigtable_admin_v2.types.DeleteInstanceRequest, dict]]): + request (Optional[Union[google.cloud.bigtable.admin.types.DeleteInstanceRequest, dict]]): The request object. Request message for BigtableInstanceAdmin.DeleteInstance. name (:class:`str`): @@ -941,7 +941,7 @@ async def create_cluster( non-empty, then autoscaling is enabled. Args: - request (Optional[Union[google.cloud.bigtable_admin_v2.types.CreateClusterRequest, dict]]): + request (Optional[Union[google.cloud.bigtable.admin.types.CreateClusterRequest, dict]]): The request object. Request message for BigtableInstanceAdmin.CreateCluster. parent (:class:`str`): @@ -961,7 +961,7 @@ async def create_cluster( This corresponds to the ``cluster_id`` field on the ``request`` instance; if ``request`` is provided, this should not be set. - cluster (:class:`google.cloud.bigtable_admin_v2.types.Cluster`): + cluster (:class:`google.cloud.bigtable.admin.types.Cluster`): Required. The cluster to be created. Fields marked ``OutputOnly`` must be left blank. @@ -980,7 +980,7 @@ async def create_cluster( google.api_core.operation_async.AsyncOperation: An object representing a long-running operation. - The result type for the operation will be :class:`google.cloud.bigtable_admin_v2.types.Cluster` A resizable group of nodes in a particular cloud location, capable + The result type for the operation will be :class:`google.cloud.bigtable.admin.types.Cluster` A resizable group of nodes in a particular cloud location, capable of serving all [Tables][google.bigtable.admin.v2.Table] in the parent [Instance][google.bigtable.admin.v2.Instance]. @@ -1061,7 +1061,7 @@ async def get_cluster( r"""Gets information about a cluster. Args: - request (Optional[Union[google.cloud.bigtable_admin_v2.types.GetClusterRequest, dict]]): + request (Optional[Union[google.cloud.bigtable.admin.types.GetClusterRequest, dict]]): The request object. Request message for BigtableInstanceAdmin.GetCluster. name (:class:`str`): @@ -1081,7 +1081,7 @@ async def get_cluster( be of type `bytes`. Returns: - google.cloud.bigtable_admin_v2.types.Cluster: + google.cloud.bigtable.admin.types.Cluster: A resizable group of nodes in a particular cloud location, capable of serving all [Tables][google.bigtable.admin.v2.Table] in the @@ -1151,7 +1151,7 @@ async def list_clusters( r"""Lists information about clusters in an instance. Args: - request (Optional[Union[google.cloud.bigtable_admin_v2.types.ListClustersRequest, dict]]): + request (Optional[Union[google.cloud.bigtable.admin.types.ListClustersRequest, dict]]): The request object. Request message for BigtableInstanceAdmin.ListClusters. parent (:class:`str`): @@ -1173,7 +1173,7 @@ async def list_clusters( be of type `bytes`. Returns: - google.cloud.bigtable_admin_v2.types.ListClustersResponse: + google.cloud.bigtable.admin.types.ListClustersResponse: Response message for BigtableInstanceAdmin.ListClusters. @@ -1242,7 +1242,7 @@ async def update_cluster( it, you must use PartialUpdateCluster. Args: - request (Optional[Union[google.cloud.bigtable_admin_v2.types.Cluster, dict]]): + request (Optional[Union[google.cloud.bigtable.admin.types.Cluster, dict]]): The request object. A resizable group of nodes in a particular cloud location, capable of serving all [Tables][google.bigtable.admin.v2.Table] in the parent @@ -1259,7 +1259,7 @@ async def update_cluster( google.api_core.operation_async.AsyncOperation: An object representing a long-running operation. - The result type for the operation will be :class:`google.cloud.bigtable_admin_v2.types.Cluster` A resizable group of nodes in a particular cloud location, capable + The result type for the operation will be :class:`google.cloud.bigtable.admin.types.Cluster` A resizable group of nodes in a particular cloud location, capable of serving all [Tables][google.bigtable.admin.v2.Table] in the parent [Instance][google.bigtable.admin.v2.Instance]. @@ -1333,10 +1333,10 @@ async def partial_update_cluster( serve_node count via the update_mask. Args: - request (Optional[Union[google.cloud.bigtable_admin_v2.types.PartialUpdateClusterRequest, dict]]): + request (Optional[Union[google.cloud.bigtable.admin.types.PartialUpdateClusterRequest, dict]]): The request object. Request message for BigtableInstanceAdmin.PartialUpdateCluster. - cluster (:class:`google.cloud.bigtable_admin_v2.types.Cluster`): + cluster (:class:`google.cloud.bigtable.admin.types.Cluster`): Required. The Cluster which contains the partial updates to be applied, subject to the update_mask. @@ -1362,7 +1362,7 @@ async def partial_update_cluster( google.api_core.operation_async.AsyncOperation: An object representing a long-running operation. - The result type for the operation will be :class:`google.cloud.bigtable_admin_v2.types.Cluster` A resizable group of nodes in a particular cloud location, capable + The result type for the operation will be :class:`google.cloud.bigtable.admin.types.Cluster` A resizable group of nodes in a particular cloud location, capable of serving all [Tables][google.bigtable.admin.v2.Table] in the parent [Instance][google.bigtable.admin.v2.Instance]. @@ -1443,7 +1443,7 @@ async def delete_cluster( r"""Deletes a cluster from an instance. Args: - request (Optional[Union[google.cloud.bigtable_admin_v2.types.DeleteClusterRequest, dict]]): + request (Optional[Union[google.cloud.bigtable.admin.types.DeleteClusterRequest, dict]]): The request object. Request message for BigtableInstanceAdmin.DeleteCluster. name (:class:`str`): @@ -1524,7 +1524,7 @@ async def create_app_profile( r"""Creates an app profile within an instance. Args: - request (Optional[Union[google.cloud.bigtable_admin_v2.types.CreateAppProfileRequest, dict]]): + request (Optional[Union[google.cloud.bigtable.admin.types.CreateAppProfileRequest, dict]]): The request object. Request message for BigtableInstanceAdmin.CreateAppProfile. parent (:class:`str`): @@ -1544,7 +1544,7 @@ async def create_app_profile( This corresponds to the ``app_profile_id`` field on the ``request`` instance; if ``request`` is provided, this should not be set. - app_profile (:class:`google.cloud.bigtable_admin_v2.types.AppProfile`): + app_profile (:class:`google.cloud.bigtable.admin.types.AppProfile`): Required. The app profile to be created. Fields marked ``OutputOnly`` will be ignored. @@ -1560,7 +1560,7 @@ async def create_app_profile( be of type `bytes`. Returns: - google.cloud.bigtable_admin_v2.types.AppProfile: + google.cloud.bigtable.admin.types.AppProfile: A configuration object describing how Cloud Bigtable should treat traffic from a particular end user application. @@ -1633,7 +1633,7 @@ async def get_app_profile( r"""Gets information about an app profile. Args: - request (Optional[Union[google.cloud.bigtable_admin_v2.types.GetAppProfileRequest, dict]]): + request (Optional[Union[google.cloud.bigtable.admin.types.GetAppProfileRequest, dict]]): The request object. Request message for BigtableInstanceAdmin.GetAppProfile. name (:class:`str`): @@ -1653,7 +1653,7 @@ async def get_app_profile( be of type `bytes`. Returns: - google.cloud.bigtable_admin_v2.types.AppProfile: + google.cloud.bigtable.admin.types.AppProfile: A configuration object describing how Cloud Bigtable should treat traffic from a particular end user application. @@ -1722,7 +1722,7 @@ async def list_app_profiles( r"""Lists information about app profiles in an instance. Args: - request (Optional[Union[google.cloud.bigtable_admin_v2.types.ListAppProfilesRequest, dict]]): + request (Optional[Union[google.cloud.bigtable.admin.types.ListAppProfilesRequest, dict]]): The request object. Request message for BigtableInstanceAdmin.ListAppProfiles. parent (:class:`str`): @@ -1745,7 +1745,7 @@ async def list_app_profiles( be of type `bytes`. Returns: - google.cloud.bigtable_admin_v2.services.bigtable_instance_admin.pagers.ListAppProfilesAsyncPager: + google.cloud.bigtable.admin.services.bigtable_instance_admin.pagers.ListAppProfilesAsyncPager: Response message for BigtableInstanceAdmin.ListAppProfiles. Iterating over this object will yield @@ -1828,10 +1828,10 @@ async def update_app_profile( r"""Updates an app profile within an instance. Args: - request (Optional[Union[google.cloud.bigtable_admin_v2.types.UpdateAppProfileRequest, dict]]): + request (Optional[Union[google.cloud.bigtable.admin.types.UpdateAppProfileRequest, dict]]): The request object. Request message for BigtableInstanceAdmin.UpdateAppProfile. - app_profile (:class:`google.cloud.bigtable_admin_v2.types.AppProfile`): + app_profile (:class:`google.cloud.bigtable.admin.types.AppProfile`): Required. The app profile which will (partially) replace the current value. @@ -1858,7 +1858,7 @@ async def update_app_profile( google.api_core.operation_async.AsyncOperation: An object representing a long-running operation. - The result type for the operation will be :class:`google.cloud.bigtable_admin_v2.types.AppProfile` A configuration object describing how Cloud Bigtable should treat traffic + The result type for the operation will be :class:`google.cloud.bigtable.admin.types.AppProfile` A configuration object describing how Cloud Bigtable should treat traffic from a particular end user application. """ @@ -1938,7 +1938,7 @@ async def delete_app_profile( r"""Deletes an app profile from an instance. Args: - request (Optional[Union[google.cloud.bigtable_admin_v2.types.DeleteAppProfileRequest, dict]]): + request (Optional[Union[google.cloud.bigtable.admin.types.DeleteAppProfileRequest, dict]]): The request object. Request message for BigtableInstanceAdmin.DeleteAppProfile. name (:class:`str`): @@ -2346,7 +2346,7 @@ async def list_hot_tablets( provided. Hot tablets are ordered based on CPU usage. Args: - request (Optional[Union[google.cloud.bigtable_admin_v2.types.ListHotTabletsRequest, dict]]): + request (Optional[Union[google.cloud.bigtable.admin.types.ListHotTabletsRequest, dict]]): The request object. Request message for BigtableInstanceAdmin.ListHotTablets. parent (:class:`str`): @@ -2366,7 +2366,7 @@ async def list_hot_tablets( be of type `bytes`. Returns: - google.cloud.bigtable_admin_v2.services.bigtable_instance_admin.pagers.ListHotTabletsAsyncPager: + google.cloud.bigtable.admin.services.bigtable_instance_admin.pagers.ListHotTabletsAsyncPager: Response message for BigtableInstanceAdmin.ListHotTablets. Iterating over this object will yield @@ -2450,7 +2450,7 @@ async def create_logical_view( r"""Creates a logical view within an instance. Args: - request (Optional[Union[google.cloud.bigtable_admin_v2.types.CreateLogicalViewRequest, dict]]): + request (Optional[Union[google.cloud.bigtable.admin.types.CreateLogicalViewRequest, dict]]): The request object. Request message for BigtableInstanceAdmin.CreateLogicalView. parent (:class:`str`): @@ -2461,7 +2461,7 @@ async def create_logical_view( This corresponds to the ``parent`` field on the ``request`` instance; if ``request`` is provided, this should not be set. - logical_view (:class:`google.cloud.bigtable_admin_v2.types.LogicalView`): + logical_view (:class:`google.cloud.bigtable.admin.types.LogicalView`): Required. The logical view to create. This corresponds to the ``logical_view`` field on the ``request`` instance; if ``request`` is provided, this @@ -2488,7 +2488,7 @@ async def create_logical_view( An object representing a long-running operation. The result type for the operation will be - :class:`google.cloud.bigtable_admin_v2.types.LogicalView` + :class:`google.cloud.bigtable.admin.types.LogicalView` A SQL logical view object that can be referenced in SQL queries. @@ -2568,7 +2568,7 @@ async def get_logical_view( r"""Gets information about a logical view. Args: - request (Optional[Union[google.cloud.bigtable_admin_v2.types.GetLogicalViewRequest, dict]]): + request (Optional[Union[google.cloud.bigtable.admin.types.GetLogicalViewRequest, dict]]): The request object. Request message for BigtableInstanceAdmin.GetLogicalView. name (:class:`str`): @@ -2588,7 +2588,7 @@ async def get_logical_view( be of type `bytes`. Returns: - google.cloud.bigtable_admin_v2.types.LogicalView: + google.cloud.bigtable.admin.types.LogicalView: A SQL logical view object that can be referenced in SQL queries. @@ -2656,7 +2656,7 @@ async def list_logical_views( r"""Lists information about logical views in an instance. Args: - request (Optional[Union[google.cloud.bigtable_admin_v2.types.ListLogicalViewsRequest, dict]]): + request (Optional[Union[google.cloud.bigtable.admin.types.ListLogicalViewsRequest, dict]]): The request object. Request message for BigtableInstanceAdmin.ListLogicalViews. parent (:class:`str`): @@ -2676,7 +2676,7 @@ async def list_logical_views( be of type `bytes`. Returns: - google.cloud.bigtable_admin_v2.services.bigtable_instance_admin.pagers.ListLogicalViewsAsyncPager: + google.cloud.bigtable.admin.services.bigtable_instance_admin.pagers.ListLogicalViewsAsyncPager: Response message for BigtableInstanceAdmin.ListLogicalViews. Iterating over this object will yield @@ -2759,10 +2759,10 @@ async def update_logical_view( r"""Updates a logical view within an instance. Args: - request (Optional[Union[google.cloud.bigtable_admin_v2.types.UpdateLogicalViewRequest, dict]]): + request (Optional[Union[google.cloud.bigtable.admin.types.UpdateLogicalViewRequest, dict]]): The request object. Request message for BigtableInstanceAdmin.UpdateLogicalView. - logical_view (:class:`google.cloud.bigtable_admin_v2.types.LogicalView`): + logical_view (:class:`google.cloud.bigtable.admin.types.LogicalView`): Required. The logical view to update. The logical view's ``name`` field is used to identify @@ -2792,7 +2792,7 @@ async def update_logical_view( An object representing a long-running operation. The result type for the operation will be - :class:`google.cloud.bigtable_admin_v2.types.LogicalView` + :class:`google.cloud.bigtable.admin.types.LogicalView` A SQL logical view object that can be referenced in SQL queries. @@ -2872,7 +2872,7 @@ async def delete_logical_view( r"""Deletes a logical view from an instance. Args: - request (Optional[Union[google.cloud.bigtable_admin_v2.types.DeleteLogicalViewRequest, dict]]): + request (Optional[Union[google.cloud.bigtable.admin.types.DeleteLogicalViewRequest, dict]]): The request object. Request message for BigtableInstanceAdmin.DeleteLogicalView. name (:class:`str`): @@ -2953,7 +2953,7 @@ async def create_materialized_view( r"""Creates a materialized view within an instance. Args: - request (Optional[Union[google.cloud.bigtable_admin_v2.types.CreateMaterializedViewRequest, dict]]): + request (Optional[Union[google.cloud.bigtable.admin.types.CreateMaterializedViewRequest, dict]]): The request object. Request message for BigtableInstanceAdmin.CreateMaterializedView. parent (:class:`str`): @@ -2964,7 +2964,7 @@ async def create_materialized_view( This corresponds to the ``parent`` field on the ``request`` instance; if ``request`` is provided, this should not be set. - materialized_view (:class:`google.cloud.bigtable_admin_v2.types.MaterializedView`): + materialized_view (:class:`google.cloud.bigtable.admin.types.MaterializedView`): Required. The materialized view to create. @@ -2993,7 +2993,7 @@ async def create_materialized_view( An object representing a long-running operation. The result type for the operation will be - :class:`google.cloud.bigtable_admin_v2.types.MaterializedView` + :class:`google.cloud.bigtable.admin.types.MaterializedView` A materialized view object that can be referenced in SQL queries. @@ -3075,7 +3075,7 @@ async def get_materialized_view( r"""Gets information about a materialized view. Args: - request (Optional[Union[google.cloud.bigtable_admin_v2.types.GetMaterializedViewRequest, dict]]): + request (Optional[Union[google.cloud.bigtable.admin.types.GetMaterializedViewRequest, dict]]): The request object. Request message for BigtableInstanceAdmin.GetMaterializedView. name (:class:`str`): @@ -3095,7 +3095,7 @@ async def get_materialized_view( be of type `bytes`. Returns: - google.cloud.bigtable_admin_v2.types.MaterializedView: + google.cloud.bigtable.admin.types.MaterializedView: A materialized view object that can be referenced in SQL queries. @@ -3164,7 +3164,7 @@ async def list_materialized_views( instance. Args: - request (Optional[Union[google.cloud.bigtable_admin_v2.types.ListMaterializedViewsRequest, dict]]): + request (Optional[Union[google.cloud.bigtable.admin.types.ListMaterializedViewsRequest, dict]]): The request object. Request message for BigtableInstanceAdmin.ListMaterializedViews. parent (:class:`str`): @@ -3184,7 +3184,7 @@ async def list_materialized_views( be of type `bytes`. Returns: - google.cloud.bigtable_admin_v2.services.bigtable_instance_admin.pagers.ListMaterializedViewsAsyncPager: + google.cloud.bigtable.admin.services.bigtable_instance_admin.pagers.ListMaterializedViewsAsyncPager: Response message for BigtableInstanceAdmin.ListMaterializedViews. Iterating over this object will yield @@ -3269,10 +3269,10 @@ async def update_materialized_view( r"""Updates a materialized view within an instance. Args: - request (Optional[Union[google.cloud.bigtable_admin_v2.types.UpdateMaterializedViewRequest, dict]]): + request (Optional[Union[google.cloud.bigtable.admin.types.UpdateMaterializedViewRequest, dict]]): The request object. Request message for BigtableInstanceAdmin.UpdateMaterializedView. - materialized_view (:class:`google.cloud.bigtable_admin_v2.types.MaterializedView`): + materialized_view (:class:`google.cloud.bigtable.admin.types.MaterializedView`): Required. The materialized view to update. The materialized view's ``name`` field is used to @@ -3302,7 +3302,7 @@ async def update_materialized_view( An object representing a long-running operation. The result type for the operation will be - :class:`google.cloud.bigtable_admin_v2.types.MaterializedView` + :class:`google.cloud.bigtable.admin.types.MaterializedView` A materialized view object that can be referenced in SQL queries. @@ -3384,7 +3384,7 @@ async def delete_materialized_view( r"""Deletes a materialized view from an instance. Args: - request (Optional[Union[google.cloud.bigtable_admin_v2.types.DeleteMaterializedViewRequest, dict]]): + request (Optional[Union[google.cloud.bigtable.admin.types.DeleteMaterializedViewRequest, dict]]): The request object. Request message for BigtableInstanceAdmin.DeleteMaterializedView. name (:class:`str`): diff --git a/google/cloud/bigtable_admin_v2/services/bigtable_instance_admin/client.py b/google/cloud/bigtable/admin/services/bigtable_instance_admin/client.py similarity index 96% rename from google/cloud/bigtable_admin_v2/services/bigtable_instance_admin/client.py rename to google/cloud/bigtable/admin/services/bigtable_instance_admin/client.py index accaa1e03..7a3368c94 100644 --- a/google/cloud/bigtable_admin_v2/services/bigtable_instance_admin/client.py +++ b/google/cloud/bigtable/admin/services/bigtable_instance_admin/client.py @@ -34,7 +34,7 @@ ) import warnings -from google.cloud.bigtable_admin_v2 import gapic_version as package_version +from google.cloud.bigtable.admin import gapic_version as package_version from google.api_core import client_options as client_options_lib from google.api_core import exceptions as core_exceptions @@ -63,11 +63,11 @@ from google.api_core import operation # type: ignore from google.api_core import operation_async # type: ignore -from google.cloud.bigtable_admin_v2.services.bigtable_instance_admin import pagers -from google.cloud.bigtable_admin_v2.types import bigtable_instance_admin -from google.cloud.bigtable_admin_v2.types import common -from google.cloud.bigtable_admin_v2.types import instance -from google.cloud.bigtable_admin_v2.types import instance as gba_instance +from google.cloud.bigtable.admin.services.bigtable_instance_admin import pagers +from google.cloud.bigtable.admin.types import bigtable_instance_admin +from google.cloud.bigtable.admin.types import common +from google.cloud.bigtable.admin.types import instance +from google.cloud.bigtable.admin.types import instance as gba_instance from google.iam.v1 import iam_policy_pb2 # type: ignore from google.iam.v1 import policy_pb2 # type: ignore from google.protobuf import field_mask_pb2 # type: ignore @@ -907,7 +907,7 @@ def create_instance( non-empty, then autoscaling is enabled. Args: - request (Union[google.cloud.bigtable_admin_v2.types.CreateInstanceRequest, dict]): + request (Union[google.cloud.bigtable.admin.types.CreateInstanceRequest, dict]): The request object. Request message for BigtableInstanceAdmin.CreateInstance. parent (str): @@ -926,14 +926,14 @@ def create_instance( This corresponds to the ``instance_id`` field on the ``request`` instance; if ``request`` is provided, this should not be set. - instance (google.cloud.bigtable_admin_v2.types.Instance): + instance (google.cloud.bigtable.admin.types.Instance): Required. The instance to create. Fields marked ``OutputOnly`` must be left blank. This corresponds to the ``instance`` field on the ``request`` instance; if ``request`` is provided, this should not be set. - clusters (MutableMapping[str, google.cloud.bigtable_admin_v2.types.Cluster]): + clusters (MutableMapping[str, google.cloud.bigtable.admin.types.Cluster]): Required. The clusters to be created within the instance, mapped by desired cluster ID, e.g., just ``mycluster`` rather than @@ -955,7 +955,7 @@ def create_instance( google.api_core.operation.Operation: An object representing a long-running operation. - The result type for the operation will be :class:`google.cloud.bigtable_admin_v2.types.Instance` A collection of Bigtable [Tables][google.bigtable.admin.v2.Table] and + The result type for the operation will be :class:`google.cloud.bigtable.admin.types.Instance` A collection of Bigtable [Tables][google.bigtable.admin.v2.Table] and the resources that serve them. All tables in an instance are served from all [Clusters][google.bigtable.admin.v2.Cluster] in the @@ -1036,7 +1036,7 @@ def get_instance( r"""Gets information about an instance. Args: - request (Union[google.cloud.bigtable_admin_v2.types.GetInstanceRequest, dict]): + request (Union[google.cloud.bigtable.admin.types.GetInstanceRequest, dict]): The request object. Request message for BigtableInstanceAdmin.GetInstance. name (str): @@ -1056,7 +1056,7 @@ def get_instance( be of type `bytes`. Returns: - google.cloud.bigtable_admin_v2.types.Instance: + google.cloud.bigtable.admin.types.Instance: A collection of Bigtable [Tables][google.bigtable.admin.v2.Table] and the resources that serve them. All tables in an instance are served from all @@ -1124,7 +1124,7 @@ def list_instances( r"""Lists information about instances in a project. Args: - request (Union[google.cloud.bigtable_admin_v2.types.ListInstancesRequest, dict]): + request (Union[google.cloud.bigtable.admin.types.ListInstancesRequest, dict]): The request object. Request message for BigtableInstanceAdmin.ListInstances. parent (str): @@ -1144,7 +1144,7 @@ def list_instances( be of type `bytes`. Returns: - google.cloud.bigtable_admin_v2.types.ListInstancesResponse: + google.cloud.bigtable.admin.types.ListInstancesResponse: Response message for BigtableInstanceAdmin.ListInstances. @@ -1209,7 +1209,7 @@ def update_instance( PartialUpdateInstance. Args: - request (Union[google.cloud.bigtable_admin_v2.types.Instance, dict]): + request (Union[google.cloud.bigtable.admin.types.Instance, dict]): The request object. A collection of Bigtable [Tables][google.bigtable.admin.v2.Table] and the resources that serve them. All tables in an instance are @@ -1225,7 +1225,7 @@ def update_instance( be of type `bytes`. Returns: - google.cloud.bigtable_admin_v2.types.Instance: + google.cloud.bigtable.admin.types.Instance: A collection of Bigtable [Tables][google.bigtable.admin.v2.Table] and the resources that serve them. All tables in an instance are served from all @@ -1280,10 +1280,10 @@ def partial_update_instance( preferred way to update an Instance. Args: - request (Union[google.cloud.bigtable_admin_v2.types.PartialUpdateInstanceRequest, dict]): + request (Union[google.cloud.bigtable.admin.types.PartialUpdateInstanceRequest, dict]): The request object. Request message for BigtableInstanceAdmin.PartialUpdateInstance. - instance (google.cloud.bigtable_admin_v2.types.Instance): + instance (google.cloud.bigtable.admin.types.Instance): Required. The Instance which will (partially) replace the current value. @@ -1310,7 +1310,7 @@ def partial_update_instance( google.api_core.operation.Operation: An object representing a long-running operation. - The result type for the operation will be :class:`google.cloud.bigtable_admin_v2.types.Instance` A collection of Bigtable [Tables][google.bigtable.admin.v2.Table] and + The result type for the operation will be :class:`google.cloud.bigtable.admin.types.Instance` A collection of Bigtable [Tables][google.bigtable.admin.v2.Table] and the resources that serve them. All tables in an instance are served from all [Clusters][google.bigtable.admin.v2.Cluster] in the @@ -1391,7 +1391,7 @@ def delete_instance( r"""Delete an instance from a project. Args: - request (Union[google.cloud.bigtable_admin_v2.types.DeleteInstanceRequest, dict]): + request (Union[google.cloud.bigtable.admin.types.DeleteInstanceRequest, dict]): The request object. Request message for BigtableInstanceAdmin.DeleteInstance. name (str): @@ -1475,7 +1475,7 @@ def create_cluster( non-empty, then autoscaling is enabled. Args: - request (Union[google.cloud.bigtable_admin_v2.types.CreateClusterRequest, dict]): + request (Union[google.cloud.bigtable.admin.types.CreateClusterRequest, dict]): The request object. Request message for BigtableInstanceAdmin.CreateCluster. parent (str): @@ -1495,7 +1495,7 @@ def create_cluster( This corresponds to the ``cluster_id`` field on the ``request`` instance; if ``request`` is provided, this should not be set. - cluster (google.cloud.bigtable_admin_v2.types.Cluster): + cluster (google.cloud.bigtable.admin.types.Cluster): Required. The cluster to be created. Fields marked ``OutputOnly`` must be left blank. @@ -1514,7 +1514,7 @@ def create_cluster( google.api_core.operation.Operation: An object representing a long-running operation. - The result type for the operation will be :class:`google.cloud.bigtable_admin_v2.types.Cluster` A resizable group of nodes in a particular cloud location, capable + The result type for the operation will be :class:`google.cloud.bigtable.admin.types.Cluster` A resizable group of nodes in a particular cloud location, capable of serving all [Tables][google.bigtable.admin.v2.Table] in the parent [Instance][google.bigtable.admin.v2.Instance]. @@ -1592,7 +1592,7 @@ def get_cluster( r"""Gets information about a cluster. Args: - request (Union[google.cloud.bigtable_admin_v2.types.GetClusterRequest, dict]): + request (Union[google.cloud.bigtable.admin.types.GetClusterRequest, dict]): The request object. Request message for BigtableInstanceAdmin.GetCluster. name (str): @@ -1612,7 +1612,7 @@ def get_cluster( be of type `bytes`. Returns: - google.cloud.bigtable_admin_v2.types.Cluster: + google.cloud.bigtable.admin.types.Cluster: A resizable group of nodes in a particular cloud location, capable of serving all [Tables][google.bigtable.admin.v2.Table] in the @@ -1679,7 +1679,7 @@ def list_clusters( r"""Lists information about clusters in an instance. Args: - request (Union[google.cloud.bigtable_admin_v2.types.ListClustersRequest, dict]): + request (Union[google.cloud.bigtable.admin.types.ListClustersRequest, dict]): The request object. Request message for BigtableInstanceAdmin.ListClusters. parent (str): @@ -1701,7 +1701,7 @@ def list_clusters( be of type `bytes`. Returns: - google.cloud.bigtable_admin_v2.types.ListClustersResponse: + google.cloud.bigtable.admin.types.ListClustersResponse: Response message for BigtableInstanceAdmin.ListClusters. @@ -1767,7 +1767,7 @@ def update_cluster( it, you must use PartialUpdateCluster. Args: - request (Union[google.cloud.bigtable_admin_v2.types.Cluster, dict]): + request (Union[google.cloud.bigtable.admin.types.Cluster, dict]): The request object. A resizable group of nodes in a particular cloud location, capable of serving all [Tables][google.bigtable.admin.v2.Table] in the parent @@ -1784,7 +1784,7 @@ def update_cluster( google.api_core.operation.Operation: An object representing a long-running operation. - The result type for the operation will be :class:`google.cloud.bigtable_admin_v2.types.Cluster` A resizable group of nodes in a particular cloud location, capable + The result type for the operation will be :class:`google.cloud.bigtable.admin.types.Cluster` A resizable group of nodes in a particular cloud location, capable of serving all [Tables][google.bigtable.admin.v2.Table] in the parent [Instance][google.bigtable.admin.v2.Instance]. @@ -1856,10 +1856,10 @@ def partial_update_cluster( serve_node count via the update_mask. Args: - request (Union[google.cloud.bigtable_admin_v2.types.PartialUpdateClusterRequest, dict]): + request (Union[google.cloud.bigtable.admin.types.PartialUpdateClusterRequest, dict]): The request object. Request message for BigtableInstanceAdmin.PartialUpdateCluster. - cluster (google.cloud.bigtable_admin_v2.types.Cluster): + cluster (google.cloud.bigtable.admin.types.Cluster): Required. The Cluster which contains the partial updates to be applied, subject to the update_mask. @@ -1885,7 +1885,7 @@ def partial_update_cluster( google.api_core.operation.Operation: An object representing a long-running operation. - The result type for the operation will be :class:`google.cloud.bigtable_admin_v2.types.Cluster` A resizable group of nodes in a particular cloud location, capable + The result type for the operation will be :class:`google.cloud.bigtable.admin.types.Cluster` A resizable group of nodes in a particular cloud location, capable of serving all [Tables][google.bigtable.admin.v2.Table] in the parent [Instance][google.bigtable.admin.v2.Instance]. @@ -1963,7 +1963,7 @@ def delete_cluster( r"""Deletes a cluster from an instance. Args: - request (Union[google.cloud.bigtable_admin_v2.types.DeleteClusterRequest, dict]): + request (Union[google.cloud.bigtable.admin.types.DeleteClusterRequest, dict]): The request object. Request message for BigtableInstanceAdmin.DeleteCluster. name (str): @@ -2041,7 +2041,7 @@ def create_app_profile( r"""Creates an app profile within an instance. Args: - request (Union[google.cloud.bigtable_admin_v2.types.CreateAppProfileRequest, dict]): + request (Union[google.cloud.bigtable.admin.types.CreateAppProfileRequest, dict]): The request object. Request message for BigtableInstanceAdmin.CreateAppProfile. parent (str): @@ -2061,7 +2061,7 @@ def create_app_profile( This corresponds to the ``app_profile_id`` field on the ``request`` instance; if ``request`` is provided, this should not be set. - app_profile (google.cloud.bigtable_admin_v2.types.AppProfile): + app_profile (google.cloud.bigtable.admin.types.AppProfile): Required. The app profile to be created. Fields marked ``OutputOnly`` will be ignored. @@ -2077,7 +2077,7 @@ def create_app_profile( be of type `bytes`. Returns: - google.cloud.bigtable_admin_v2.types.AppProfile: + google.cloud.bigtable.admin.types.AppProfile: A configuration object describing how Cloud Bigtable should treat traffic from a particular end user application. @@ -2147,7 +2147,7 @@ def get_app_profile( r"""Gets information about an app profile. Args: - request (Union[google.cloud.bigtable_admin_v2.types.GetAppProfileRequest, dict]): + request (Union[google.cloud.bigtable.admin.types.GetAppProfileRequest, dict]): The request object. Request message for BigtableInstanceAdmin.GetAppProfile. name (str): @@ -2167,7 +2167,7 @@ def get_app_profile( be of type `bytes`. Returns: - google.cloud.bigtable_admin_v2.types.AppProfile: + google.cloud.bigtable.admin.types.AppProfile: A configuration object describing how Cloud Bigtable should treat traffic from a particular end user application. @@ -2233,7 +2233,7 @@ def list_app_profiles( r"""Lists information about app profiles in an instance. Args: - request (Union[google.cloud.bigtable_admin_v2.types.ListAppProfilesRequest, dict]): + request (Union[google.cloud.bigtable.admin.types.ListAppProfilesRequest, dict]): The request object. Request message for BigtableInstanceAdmin.ListAppProfiles. parent (str): @@ -2256,7 +2256,7 @@ def list_app_profiles( be of type `bytes`. Returns: - google.cloud.bigtable_admin_v2.services.bigtable_instance_admin.pagers.ListAppProfilesPager: + google.cloud.bigtable.admin.services.bigtable_instance_admin.pagers.ListAppProfilesPager: Response message for BigtableInstanceAdmin.ListAppProfiles. Iterating over this object will yield @@ -2336,10 +2336,10 @@ def update_app_profile( r"""Updates an app profile within an instance. Args: - request (Union[google.cloud.bigtable_admin_v2.types.UpdateAppProfileRequest, dict]): + request (Union[google.cloud.bigtable.admin.types.UpdateAppProfileRequest, dict]): The request object. Request message for BigtableInstanceAdmin.UpdateAppProfile. - app_profile (google.cloud.bigtable_admin_v2.types.AppProfile): + app_profile (google.cloud.bigtable.admin.types.AppProfile): Required. The app profile which will (partially) replace the current value. @@ -2366,7 +2366,7 @@ def update_app_profile( google.api_core.operation.Operation: An object representing a long-running operation. - The result type for the operation will be :class:`google.cloud.bigtable_admin_v2.types.AppProfile` A configuration object describing how Cloud Bigtable should treat traffic + The result type for the operation will be :class:`google.cloud.bigtable.admin.types.AppProfile` A configuration object describing how Cloud Bigtable should treat traffic from a particular end user application. """ @@ -2443,7 +2443,7 @@ def delete_app_profile( r"""Deletes an app profile from an instance. Args: - request (Union[google.cloud.bigtable_admin_v2.types.DeleteAppProfileRequest, dict]): + request (Union[google.cloud.bigtable.admin.types.DeleteAppProfileRequest, dict]): The request object. Request message for BigtableInstanceAdmin.DeleteAppProfile. name (str): @@ -2851,7 +2851,7 @@ def list_hot_tablets( provided. Hot tablets are ordered based on CPU usage. Args: - request (Union[google.cloud.bigtable_admin_v2.types.ListHotTabletsRequest, dict]): + request (Union[google.cloud.bigtable.admin.types.ListHotTabletsRequest, dict]): The request object. Request message for BigtableInstanceAdmin.ListHotTablets. parent (str): @@ -2871,7 +2871,7 @@ def list_hot_tablets( be of type `bytes`. Returns: - google.cloud.bigtable_admin_v2.services.bigtable_instance_admin.pagers.ListHotTabletsPager: + google.cloud.bigtable.admin.services.bigtable_instance_admin.pagers.ListHotTabletsPager: Response message for BigtableInstanceAdmin.ListHotTablets. Iterating over this object will yield @@ -2952,7 +2952,7 @@ def create_logical_view( r"""Creates a logical view within an instance. Args: - request (Union[google.cloud.bigtable_admin_v2.types.CreateLogicalViewRequest, dict]): + request (Union[google.cloud.bigtable.admin.types.CreateLogicalViewRequest, dict]): The request object. Request message for BigtableInstanceAdmin.CreateLogicalView. parent (str): @@ -2963,7 +2963,7 @@ def create_logical_view( This corresponds to the ``parent`` field on the ``request`` instance; if ``request`` is provided, this should not be set. - logical_view (google.cloud.bigtable_admin_v2.types.LogicalView): + logical_view (google.cloud.bigtable.admin.types.LogicalView): Required. The logical view to create. This corresponds to the ``logical_view`` field on the ``request`` instance; if ``request`` is provided, this @@ -2990,7 +2990,7 @@ def create_logical_view( An object representing a long-running operation. The result type for the operation will be - :class:`google.cloud.bigtable_admin_v2.types.LogicalView` + :class:`google.cloud.bigtable.admin.types.LogicalView` A SQL logical view object that can be referenced in SQL queries. @@ -3067,7 +3067,7 @@ def get_logical_view( r"""Gets information about a logical view. Args: - request (Union[google.cloud.bigtable_admin_v2.types.GetLogicalViewRequest, dict]): + request (Union[google.cloud.bigtable.admin.types.GetLogicalViewRequest, dict]): The request object. Request message for BigtableInstanceAdmin.GetLogicalView. name (str): @@ -3087,7 +3087,7 @@ def get_logical_view( be of type `bytes`. Returns: - google.cloud.bigtable_admin_v2.types.LogicalView: + google.cloud.bigtable.admin.types.LogicalView: A SQL logical view object that can be referenced in SQL queries. @@ -3152,7 +3152,7 @@ def list_logical_views( r"""Lists information about logical views in an instance. Args: - request (Union[google.cloud.bigtable_admin_v2.types.ListLogicalViewsRequest, dict]): + request (Union[google.cloud.bigtable.admin.types.ListLogicalViewsRequest, dict]): The request object. Request message for BigtableInstanceAdmin.ListLogicalViews. parent (str): @@ -3172,7 +3172,7 @@ def list_logical_views( be of type `bytes`. Returns: - google.cloud.bigtable_admin_v2.services.bigtable_instance_admin.pagers.ListLogicalViewsPager: + google.cloud.bigtable.admin.services.bigtable_instance_admin.pagers.ListLogicalViewsPager: Response message for BigtableInstanceAdmin.ListLogicalViews. Iterating over this object will yield @@ -3252,10 +3252,10 @@ def update_logical_view( r"""Updates a logical view within an instance. Args: - request (Union[google.cloud.bigtable_admin_v2.types.UpdateLogicalViewRequest, dict]): + request (Union[google.cloud.bigtable.admin.types.UpdateLogicalViewRequest, dict]): The request object. Request message for BigtableInstanceAdmin.UpdateLogicalView. - logical_view (google.cloud.bigtable_admin_v2.types.LogicalView): + logical_view (google.cloud.bigtable.admin.types.LogicalView): Required. The logical view to update. The logical view's ``name`` field is used to identify @@ -3285,7 +3285,7 @@ def update_logical_view( An object representing a long-running operation. The result type for the operation will be - :class:`google.cloud.bigtable_admin_v2.types.LogicalView` + :class:`google.cloud.bigtable.admin.types.LogicalView` A SQL logical view object that can be referenced in SQL queries. @@ -3362,7 +3362,7 @@ def delete_logical_view( r"""Deletes a logical view from an instance. Args: - request (Union[google.cloud.bigtable_admin_v2.types.DeleteLogicalViewRequest, dict]): + request (Union[google.cloud.bigtable.admin.types.DeleteLogicalViewRequest, dict]): The request object. Request message for BigtableInstanceAdmin.DeleteLogicalView. name (str): @@ -3440,7 +3440,7 @@ def create_materialized_view( r"""Creates a materialized view within an instance. Args: - request (Union[google.cloud.bigtable_admin_v2.types.CreateMaterializedViewRequest, dict]): + request (Union[google.cloud.bigtable.admin.types.CreateMaterializedViewRequest, dict]): The request object. Request message for BigtableInstanceAdmin.CreateMaterializedView. parent (str): @@ -3451,7 +3451,7 @@ def create_materialized_view( This corresponds to the ``parent`` field on the ``request`` instance; if ``request`` is provided, this should not be set. - materialized_view (google.cloud.bigtable_admin_v2.types.MaterializedView): + materialized_view (google.cloud.bigtable.admin.types.MaterializedView): Required. The materialized view to create. @@ -3480,7 +3480,7 @@ def create_materialized_view( An object representing a long-running operation. The result type for the operation will be - :class:`google.cloud.bigtable_admin_v2.types.MaterializedView` + :class:`google.cloud.bigtable.admin.types.MaterializedView` A materialized view object that can be referenced in SQL queries. @@ -3559,7 +3559,7 @@ def get_materialized_view( r"""Gets information about a materialized view. Args: - request (Union[google.cloud.bigtable_admin_v2.types.GetMaterializedViewRequest, dict]): + request (Union[google.cloud.bigtable.admin.types.GetMaterializedViewRequest, dict]): The request object. Request message for BigtableInstanceAdmin.GetMaterializedView. name (str): @@ -3579,7 +3579,7 @@ def get_materialized_view( be of type `bytes`. Returns: - google.cloud.bigtable_admin_v2.types.MaterializedView: + google.cloud.bigtable.admin.types.MaterializedView: A materialized view object that can be referenced in SQL queries. @@ -3645,7 +3645,7 @@ def list_materialized_views( instance. Args: - request (Union[google.cloud.bigtable_admin_v2.types.ListMaterializedViewsRequest, dict]): + request (Union[google.cloud.bigtable.admin.types.ListMaterializedViewsRequest, dict]): The request object. Request message for BigtableInstanceAdmin.ListMaterializedViews. parent (str): @@ -3665,7 +3665,7 @@ def list_materialized_views( be of type `bytes`. Returns: - google.cloud.bigtable_admin_v2.services.bigtable_instance_admin.pagers.ListMaterializedViewsPager: + google.cloud.bigtable.admin.services.bigtable_instance_admin.pagers.ListMaterializedViewsPager: Response message for BigtableInstanceAdmin.ListMaterializedViews. Iterating over this object will yield @@ -3747,10 +3747,10 @@ def update_materialized_view( r"""Updates a materialized view within an instance. Args: - request (Union[google.cloud.bigtable_admin_v2.types.UpdateMaterializedViewRequest, dict]): + request (Union[google.cloud.bigtable.admin.types.UpdateMaterializedViewRequest, dict]): The request object. Request message for BigtableInstanceAdmin.UpdateMaterializedView. - materialized_view (google.cloud.bigtable_admin_v2.types.MaterializedView): + materialized_view (google.cloud.bigtable.admin.types.MaterializedView): Required. The materialized view to update. The materialized view's ``name`` field is used to @@ -3780,7 +3780,7 @@ def update_materialized_view( An object representing a long-running operation. The result type for the operation will be - :class:`google.cloud.bigtable_admin_v2.types.MaterializedView` + :class:`google.cloud.bigtable.admin.types.MaterializedView` A materialized view object that can be referenced in SQL queries. @@ -3859,7 +3859,7 @@ def delete_materialized_view( r"""Deletes a materialized view from an instance. Args: - request (Union[google.cloud.bigtable_admin_v2.types.DeleteMaterializedViewRequest, dict]): + request (Union[google.cloud.bigtable.admin.types.DeleteMaterializedViewRequest, dict]): The request object. Request message for BigtableInstanceAdmin.DeleteMaterializedView. name (str): diff --git a/google/cloud/bigtable_admin_v2/services/bigtable_instance_admin/pagers.py b/google/cloud/bigtable/admin/services/bigtable_instance_admin/pagers.py similarity index 89% rename from google/cloud/bigtable_admin_v2/services/bigtable_instance_admin/pagers.py rename to google/cloud/bigtable/admin/services/bigtable_instance_admin/pagers.py index ce5b67b27..58efe9c51 100644 --- a/google/cloud/bigtable_admin_v2/services/bigtable_instance_admin/pagers.py +++ b/google/cloud/bigtable/admin/services/bigtable_instance_admin/pagers.py @@ -37,15 +37,15 @@ OptionalRetry = Union[retries.Retry, object, None] # type: ignore OptionalAsyncRetry = Union[retries_async.AsyncRetry, object, None] # type: ignore -from google.cloud.bigtable_admin_v2.types import bigtable_instance_admin -from google.cloud.bigtable_admin_v2.types import instance +from google.cloud.bigtable.admin.types import bigtable_instance_admin +from google.cloud.bigtable.admin.types import instance class ListAppProfilesPager: """A pager for iterating through ``list_app_profiles`` requests. This class thinly wraps an initial - :class:`google.cloud.bigtable_admin_v2.types.ListAppProfilesResponse` object, and + :class:`google.cloud.bigtable.admin.types.ListAppProfilesResponse` object, and provides an ``__iter__`` method to iterate through its ``app_profiles`` field. @@ -54,7 +54,7 @@ class ListAppProfilesPager: through the ``app_profiles`` field on the corresponding responses. - All the usual :class:`google.cloud.bigtable_admin_v2.types.ListAppProfilesResponse` + All the usual :class:`google.cloud.bigtable.admin.types.ListAppProfilesResponse` attributes are available on the pager. If multiple requests are made, only the most recent response is retained, and thus used for attribute lookup. """ @@ -74,9 +74,9 @@ def __init__( Args: method (Callable): The method that was originally called, and which instantiated this pager. - request (google.cloud.bigtable_admin_v2.types.ListAppProfilesRequest): + request (google.cloud.bigtable.admin.types.ListAppProfilesRequest): The initial request object. - response (google.cloud.bigtable_admin_v2.types.ListAppProfilesResponse): + response (google.cloud.bigtable.admin.types.ListAppProfilesResponse): The initial response object. retry (google.api_core.retry.Retry): Designation of what errors, if any, should be retried. @@ -121,7 +121,7 @@ class ListAppProfilesAsyncPager: """A pager for iterating through ``list_app_profiles`` requests. This class thinly wraps an initial - :class:`google.cloud.bigtable_admin_v2.types.ListAppProfilesResponse` object, and + :class:`google.cloud.bigtable.admin.types.ListAppProfilesResponse` object, and provides an ``__aiter__`` method to iterate through its ``app_profiles`` field. @@ -130,7 +130,7 @@ class ListAppProfilesAsyncPager: through the ``app_profiles`` field on the corresponding responses. - All the usual :class:`google.cloud.bigtable_admin_v2.types.ListAppProfilesResponse` + All the usual :class:`google.cloud.bigtable.admin.types.ListAppProfilesResponse` attributes are available on the pager. If multiple requests are made, only the most recent response is retained, and thus used for attribute lookup. """ @@ -152,9 +152,9 @@ def __init__( Args: method (Callable): The method that was originally called, and which instantiated this pager. - request (google.cloud.bigtable_admin_v2.types.ListAppProfilesRequest): + request (google.cloud.bigtable.admin.types.ListAppProfilesRequest): The initial request object. - response (google.cloud.bigtable_admin_v2.types.ListAppProfilesResponse): + response (google.cloud.bigtable.admin.types.ListAppProfilesResponse): The initial response object. retry (google.api_core.retry.AsyncRetry): Designation of what errors, if any, should be retried. @@ -205,7 +205,7 @@ class ListHotTabletsPager: """A pager for iterating through ``list_hot_tablets`` requests. This class thinly wraps an initial - :class:`google.cloud.bigtable_admin_v2.types.ListHotTabletsResponse` object, and + :class:`google.cloud.bigtable.admin.types.ListHotTabletsResponse` object, and provides an ``__iter__`` method to iterate through its ``hot_tablets`` field. @@ -214,7 +214,7 @@ class ListHotTabletsPager: through the ``hot_tablets`` field on the corresponding responses. - All the usual :class:`google.cloud.bigtable_admin_v2.types.ListHotTabletsResponse` + All the usual :class:`google.cloud.bigtable.admin.types.ListHotTabletsResponse` attributes are available on the pager. If multiple requests are made, only the most recent response is retained, and thus used for attribute lookup. """ @@ -234,9 +234,9 @@ def __init__( Args: method (Callable): The method that was originally called, and which instantiated this pager. - request (google.cloud.bigtable_admin_v2.types.ListHotTabletsRequest): + request (google.cloud.bigtable.admin.types.ListHotTabletsRequest): The initial request object. - response (google.cloud.bigtable_admin_v2.types.ListHotTabletsResponse): + response (google.cloud.bigtable.admin.types.ListHotTabletsResponse): The initial response object. retry (google.api_core.retry.Retry): Designation of what errors, if any, should be retried. @@ -281,7 +281,7 @@ class ListHotTabletsAsyncPager: """A pager for iterating through ``list_hot_tablets`` requests. This class thinly wraps an initial - :class:`google.cloud.bigtable_admin_v2.types.ListHotTabletsResponse` object, and + :class:`google.cloud.bigtable.admin.types.ListHotTabletsResponse` object, and provides an ``__aiter__`` method to iterate through its ``hot_tablets`` field. @@ -290,7 +290,7 @@ class ListHotTabletsAsyncPager: through the ``hot_tablets`` field on the corresponding responses. - All the usual :class:`google.cloud.bigtable_admin_v2.types.ListHotTabletsResponse` + All the usual :class:`google.cloud.bigtable.admin.types.ListHotTabletsResponse` attributes are available on the pager. If multiple requests are made, only the most recent response is retained, and thus used for attribute lookup. """ @@ -312,9 +312,9 @@ def __init__( Args: method (Callable): The method that was originally called, and which instantiated this pager. - request (google.cloud.bigtable_admin_v2.types.ListHotTabletsRequest): + request (google.cloud.bigtable.admin.types.ListHotTabletsRequest): The initial request object. - response (google.cloud.bigtable_admin_v2.types.ListHotTabletsResponse): + response (google.cloud.bigtable.admin.types.ListHotTabletsResponse): The initial response object. retry (google.api_core.retry.AsyncRetry): Designation of what errors, if any, should be retried. @@ -365,7 +365,7 @@ class ListLogicalViewsPager: """A pager for iterating through ``list_logical_views`` requests. This class thinly wraps an initial - :class:`google.cloud.bigtable_admin_v2.types.ListLogicalViewsResponse` object, and + :class:`google.cloud.bigtable.admin.types.ListLogicalViewsResponse` object, and provides an ``__iter__`` method to iterate through its ``logical_views`` field. @@ -374,7 +374,7 @@ class ListLogicalViewsPager: through the ``logical_views`` field on the corresponding responses. - All the usual :class:`google.cloud.bigtable_admin_v2.types.ListLogicalViewsResponse` + All the usual :class:`google.cloud.bigtable.admin.types.ListLogicalViewsResponse` attributes are available on the pager. If multiple requests are made, only the most recent response is retained, and thus used for attribute lookup. """ @@ -394,9 +394,9 @@ def __init__( Args: method (Callable): The method that was originally called, and which instantiated this pager. - request (google.cloud.bigtable_admin_v2.types.ListLogicalViewsRequest): + request (google.cloud.bigtable.admin.types.ListLogicalViewsRequest): The initial request object. - response (google.cloud.bigtable_admin_v2.types.ListLogicalViewsResponse): + response (google.cloud.bigtable.admin.types.ListLogicalViewsResponse): The initial response object. retry (google.api_core.retry.Retry): Designation of what errors, if any, should be retried. @@ -441,7 +441,7 @@ class ListLogicalViewsAsyncPager: """A pager for iterating through ``list_logical_views`` requests. This class thinly wraps an initial - :class:`google.cloud.bigtable_admin_v2.types.ListLogicalViewsResponse` object, and + :class:`google.cloud.bigtable.admin.types.ListLogicalViewsResponse` object, and provides an ``__aiter__`` method to iterate through its ``logical_views`` field. @@ -450,7 +450,7 @@ class ListLogicalViewsAsyncPager: through the ``logical_views`` field on the corresponding responses. - All the usual :class:`google.cloud.bigtable_admin_v2.types.ListLogicalViewsResponse` + All the usual :class:`google.cloud.bigtable.admin.types.ListLogicalViewsResponse` attributes are available on the pager. If multiple requests are made, only the most recent response is retained, and thus used for attribute lookup. """ @@ -472,9 +472,9 @@ def __init__( Args: method (Callable): The method that was originally called, and which instantiated this pager. - request (google.cloud.bigtable_admin_v2.types.ListLogicalViewsRequest): + request (google.cloud.bigtable.admin.types.ListLogicalViewsRequest): The initial request object. - response (google.cloud.bigtable_admin_v2.types.ListLogicalViewsResponse): + response (google.cloud.bigtable.admin.types.ListLogicalViewsResponse): The initial response object. retry (google.api_core.retry.AsyncRetry): Designation of what errors, if any, should be retried. @@ -525,7 +525,7 @@ class ListMaterializedViewsPager: """A pager for iterating through ``list_materialized_views`` requests. This class thinly wraps an initial - :class:`google.cloud.bigtable_admin_v2.types.ListMaterializedViewsResponse` object, and + :class:`google.cloud.bigtable.admin.types.ListMaterializedViewsResponse` object, and provides an ``__iter__`` method to iterate through its ``materialized_views`` field. @@ -534,7 +534,7 @@ class ListMaterializedViewsPager: through the ``materialized_views`` field on the corresponding responses. - All the usual :class:`google.cloud.bigtable_admin_v2.types.ListMaterializedViewsResponse` + All the usual :class:`google.cloud.bigtable.admin.types.ListMaterializedViewsResponse` attributes are available on the pager. If multiple requests are made, only the most recent response is retained, and thus used for attribute lookup. """ @@ -554,9 +554,9 @@ def __init__( Args: method (Callable): The method that was originally called, and which instantiated this pager. - request (google.cloud.bigtable_admin_v2.types.ListMaterializedViewsRequest): + request (google.cloud.bigtable.admin.types.ListMaterializedViewsRequest): The initial request object. - response (google.cloud.bigtable_admin_v2.types.ListMaterializedViewsResponse): + response (google.cloud.bigtable.admin.types.ListMaterializedViewsResponse): The initial response object. retry (google.api_core.retry.Retry): Designation of what errors, if any, should be retried. @@ -601,7 +601,7 @@ class ListMaterializedViewsAsyncPager: """A pager for iterating through ``list_materialized_views`` requests. This class thinly wraps an initial - :class:`google.cloud.bigtable_admin_v2.types.ListMaterializedViewsResponse` object, and + :class:`google.cloud.bigtable.admin.types.ListMaterializedViewsResponse` object, and provides an ``__aiter__`` method to iterate through its ``materialized_views`` field. @@ -610,7 +610,7 @@ class ListMaterializedViewsAsyncPager: through the ``materialized_views`` field on the corresponding responses. - All the usual :class:`google.cloud.bigtable_admin_v2.types.ListMaterializedViewsResponse` + All the usual :class:`google.cloud.bigtable.admin.types.ListMaterializedViewsResponse` attributes are available on the pager. If multiple requests are made, only the most recent response is retained, and thus used for attribute lookup. """ @@ -632,9 +632,9 @@ def __init__( Args: method (Callable): The method that was originally called, and which instantiated this pager. - request (google.cloud.bigtable_admin_v2.types.ListMaterializedViewsRequest): + request (google.cloud.bigtable.admin.types.ListMaterializedViewsRequest): The initial request object. - response (google.cloud.bigtable_admin_v2.types.ListMaterializedViewsResponse): + response (google.cloud.bigtable.admin.types.ListMaterializedViewsResponse): The initial response object. retry (google.api_core.retry.AsyncRetry): Designation of what errors, if any, should be retried. diff --git a/google/cloud/bigtable_admin_v2/services/bigtable_instance_admin/transports/README.rst b/google/cloud/bigtable/admin/services/bigtable_instance_admin/transports/README.rst similarity index 100% rename from google/cloud/bigtable_admin_v2/services/bigtable_instance_admin/transports/README.rst rename to google/cloud/bigtable/admin/services/bigtable_instance_admin/transports/README.rst diff --git a/google/cloud/bigtable_admin_v2/services/bigtable_instance_admin/transports/__init__.py b/google/cloud/bigtable/admin/services/bigtable_instance_admin/transports/__init__.py similarity index 100% rename from google/cloud/bigtable_admin_v2/services/bigtable_instance_admin/transports/__init__.py rename to google/cloud/bigtable/admin/services/bigtable_instance_admin/transports/__init__.py diff --git a/google/cloud/bigtable_admin_v2/services/bigtable_instance_admin/transports/base.py b/google/cloud/bigtable/admin/services/bigtable_instance_admin/transports/base.py similarity index 99% rename from google/cloud/bigtable_admin_v2/services/bigtable_instance_admin/transports/base.py rename to google/cloud/bigtable/admin/services/bigtable_instance_admin/transports/base.py index f5ceeeb68..652521d0d 100644 --- a/google/cloud/bigtable_admin_v2/services/bigtable_instance_admin/transports/base.py +++ b/google/cloud/bigtable/admin/services/bigtable_instance_admin/transports/base.py @@ -16,7 +16,7 @@ import abc from typing import Awaitable, Callable, Dict, Optional, Sequence, Union -from google.cloud.bigtable_admin_v2 import gapic_version as package_version +from google.cloud.bigtable.admin import gapic_version as package_version import google.auth # type: ignore import google.api_core @@ -28,8 +28,8 @@ from google.oauth2 import service_account # type: ignore import google.protobuf -from google.cloud.bigtable_admin_v2.types import bigtable_instance_admin -from google.cloud.bigtable_admin_v2.types import instance +from google.cloud.bigtable.admin.types import bigtable_instance_admin +from google.cloud.bigtable.admin.types import instance from google.iam.v1 import iam_policy_pb2 # type: ignore from google.iam.v1 import policy_pb2 # type: ignore from google.longrunning import operations_pb2 # type: ignore diff --git a/google/cloud/bigtable_admin_v2/services/bigtable_instance_admin/transports/grpc.py b/google/cloud/bigtable/admin/services/bigtable_instance_admin/transports/grpc.py similarity index 99% rename from google/cloud/bigtable_admin_v2/services/bigtable_instance_admin/transports/grpc.py rename to google/cloud/bigtable/admin/services/bigtable_instance_admin/transports/grpc.py index a294144ef..e64317237 100644 --- a/google/cloud/bigtable_admin_v2/services/bigtable_instance_admin/transports/grpc.py +++ b/google/cloud/bigtable/admin/services/bigtable_instance_admin/transports/grpc.py @@ -31,8 +31,8 @@ import grpc # type: ignore import proto # type: ignore -from google.cloud.bigtable_admin_v2.types import bigtable_instance_admin -from google.cloud.bigtable_admin_v2.types import instance +from google.cloud.bigtable.admin.types import bigtable_instance_admin +from google.cloud.bigtable.admin.types import instance from google.iam.v1 import iam_policy_pb2 # type: ignore from google.iam.v1 import policy_pb2 # type: ignore from google.longrunning import operations_pb2 # type: ignore diff --git a/google/cloud/bigtable_admin_v2/services/bigtable_instance_admin/transports/grpc_asyncio.py b/google/cloud/bigtable/admin/services/bigtable_instance_admin/transports/grpc_asyncio.py similarity index 99% rename from google/cloud/bigtable_admin_v2/services/bigtable_instance_admin/transports/grpc_asyncio.py rename to google/cloud/bigtable/admin/services/bigtable_instance_admin/transports/grpc_asyncio.py index aae0f44c4..48a6e0c77 100644 --- a/google/cloud/bigtable_admin_v2/services/bigtable_instance_admin/transports/grpc_asyncio.py +++ b/google/cloud/bigtable/admin/services/bigtable_instance_admin/transports/grpc_asyncio.py @@ -34,8 +34,8 @@ import proto # type: ignore from grpc.experimental import aio # type: ignore -from google.cloud.bigtable_admin_v2.types import bigtable_instance_admin -from google.cloud.bigtable_admin_v2.types import instance +from google.cloud.bigtable.admin.types import bigtable_instance_admin +from google.cloud.bigtable.admin.types import instance from google.iam.v1 import iam_policy_pb2 # type: ignore from google.iam.v1 import policy_pb2 # type: ignore from google.longrunning import operations_pb2 # type: ignore diff --git a/google/cloud/bigtable_admin_v2/services/bigtable_instance_admin/transports/rest.py b/google/cloud/bigtable/admin/services/bigtable_instance_admin/transports/rest.py similarity index 99% rename from google/cloud/bigtable_admin_v2/services/bigtable_instance_admin/transports/rest.py rename to google/cloud/bigtable/admin/services/bigtable_instance_admin/transports/rest.py index 12af0792b..5d340c792 100644 --- a/google/cloud/bigtable_admin_v2/services/bigtable_instance_admin/transports/rest.py +++ b/google/cloud/bigtable/admin/services/bigtable_instance_admin/transports/rest.py @@ -34,8 +34,8 @@ import warnings -from google.cloud.bigtable_admin_v2.types import bigtable_instance_admin -from google.cloud.bigtable_admin_v2.types import instance +from google.cloud.bigtable.admin.types import bigtable_instance_admin +from google.cloud.bigtable.admin.types import instance from google.iam.v1 import iam_policy_pb2 # type: ignore from google.iam.v1 import policy_pb2 # type: ignore from google.protobuf import empty_pb2 # type: ignore diff --git a/google/cloud/bigtable_admin_v2/services/bigtable_instance_admin/transports/rest_base.py b/google/cloud/bigtable/admin/services/bigtable_instance_admin/transports/rest_base.py similarity index 99% rename from google/cloud/bigtable_admin_v2/services/bigtable_instance_admin/transports/rest_base.py rename to google/cloud/bigtable/admin/services/bigtable_instance_admin/transports/rest_base.py index 9855756b8..50b2b5ff8 100644 --- a/google/cloud/bigtable_admin_v2/services/bigtable_instance_admin/transports/rest_base.py +++ b/google/cloud/bigtable/admin/services/bigtable_instance_admin/transports/rest_base.py @@ -24,8 +24,8 @@ from typing import Any, Callable, Dict, List, Optional, Sequence, Tuple, Union -from google.cloud.bigtable_admin_v2.types import bigtable_instance_admin -from google.cloud.bigtable_admin_v2.types import instance +from google.cloud.bigtable.admin.types import bigtable_instance_admin +from google.cloud.bigtable.admin.types import instance from google.iam.v1 import iam_policy_pb2 # type: ignore from google.iam.v1 import policy_pb2 # type: ignore from google.protobuf import empty_pb2 # type: ignore diff --git a/google/cloud/bigtable_admin_v2/services/bigtable_table_admin/__init__.py b/google/cloud/bigtable/admin/services/bigtable_table_admin/__init__.py similarity index 100% rename from google/cloud/bigtable_admin_v2/services/bigtable_table_admin/__init__.py rename to google/cloud/bigtable/admin/services/bigtable_table_admin/__init__.py diff --git a/google/cloud/bigtable_admin_v2/services/bigtable_table_admin/async_client.py b/google/cloud/bigtable/admin/services/bigtable_table_admin/async_client.py similarity index 96% rename from google/cloud/bigtable_admin_v2/services/bigtable_table_admin/async_client.py rename to google/cloud/bigtable/admin/services/bigtable_table_admin/async_client.py index 1bf544db6..ee8dd0f54 100644 --- a/google/cloud/bigtable_admin_v2/services/bigtable_table_admin/async_client.py +++ b/google/cloud/bigtable/admin/services/bigtable_table_admin/async_client.py @@ -29,7 +29,7 @@ Union, ) -from google.cloud.bigtable_admin_v2 import gapic_version as package_version +from google.cloud.bigtable.admin import gapic_version as package_version from google.api_core.client_options import ClientOptions from google.api_core import exceptions as core_exceptions @@ -47,11 +47,11 @@ from google.api_core import operation # type: ignore from google.api_core import operation_async # type: ignore -from google.cloud.bigtable_admin_v2.services.bigtable_table_admin import pagers -from google.cloud.bigtable_admin_v2.types import bigtable_table_admin -from google.cloud.bigtable_admin_v2.types import table -from google.cloud.bigtable_admin_v2.types import table as gba_table -from google.cloud.bigtable_admin_v2.types import types +from google.cloud.bigtable.admin.services.bigtable_table_admin import pagers +from google.cloud.bigtable.admin.types import bigtable_table_admin +from google.cloud.bigtable.admin.types import table +from google.cloud.bigtable.admin.types import table as gba_table +from google.cloud.bigtable.admin.types import types from google.iam.v1 import iam_policy_pb2 # type: ignore from google.iam.v1 import policy_pb2 # type: ignore from google.protobuf import field_mask_pb2 # type: ignore @@ -339,7 +339,7 @@ async def create_table( column families, specified in the request. Args: - request (Optional[Union[google.cloud.bigtable_admin_v2.types.CreateTableRequest, dict]]): + request (Optional[Union[google.cloud.bigtable.admin.types.CreateTableRequest, dict]]): The request object. Request message for [google.bigtable.admin.v2.BigtableTableAdmin.CreateTable][google.bigtable.admin.v2.BigtableTableAdmin.CreateTable] parent (:class:`str`): @@ -359,7 +359,7 @@ async def create_table( This corresponds to the ``table_id`` field on the ``request`` instance; if ``request`` is provided, this should not be set. - table (:class:`google.cloud.bigtable_admin_v2.types.Table`): + table (:class:`google.cloud.bigtable.admin.types.Table`): Required. The Table to create. This corresponds to the ``table`` field on the ``request`` instance; if ``request`` is provided, this @@ -373,7 +373,7 @@ async def create_table( be of type `bytes`. Returns: - google.cloud.bigtable_admin_v2.types.Table: + google.cloud.bigtable.admin.types.Table: A collection of user data indexed by row, column, and timestamp. Each table is served using the resources of its @@ -458,7 +458,7 @@ async def create_table_from_snapshot( SLA or deprecation policy. Args: - request (Optional[Union[google.cloud.bigtable_admin_v2.types.CreateTableFromSnapshotRequest, dict]]): + request (Optional[Union[google.cloud.bigtable.admin.types.CreateTableFromSnapshotRequest, dict]]): The request object. Request message for [google.bigtable.admin.v2.BigtableTableAdmin.CreateTableFromSnapshot][google.bigtable.admin.v2.BigtableTableAdmin.CreateTableFromSnapshot] @@ -505,7 +505,7 @@ async def create_table_from_snapshot( google.api_core.operation_async.AsyncOperation: An object representing a long-running operation. - The result type for the operation will be :class:`google.cloud.bigtable_admin_v2.types.Table` A collection of user data indexed by row, column, and timestamp. + The result type for the operation will be :class:`google.cloud.bigtable.admin.types.Table` A collection of user data indexed by row, column, and timestamp. Each table is served using the resources of its parent cluster. @@ -583,7 +583,7 @@ async def list_tables( r"""Lists all tables served from a specified instance. Args: - request (Optional[Union[google.cloud.bigtable_admin_v2.types.ListTablesRequest, dict]]): + request (Optional[Union[google.cloud.bigtable.admin.types.ListTablesRequest, dict]]): The request object. Request message for [google.bigtable.admin.v2.BigtableTableAdmin.ListTables][google.bigtable.admin.v2.BigtableTableAdmin.ListTables] parent (:class:`str`): @@ -603,7 +603,7 @@ async def list_tables( be of type `bytes`. Returns: - google.cloud.bigtable_admin_v2.services.bigtable_table_admin.pagers.ListTablesAsyncPager: + google.cloud.bigtable.admin.services.bigtable_table_admin.pagers.ListTablesAsyncPager: Response message for [google.bigtable.admin.v2.BigtableTableAdmin.ListTables][google.bigtable.admin.v2.BigtableTableAdmin.ListTables] @@ -683,7 +683,7 @@ async def get_table( r"""Gets metadata information about the specified table. Args: - request (Optional[Union[google.cloud.bigtable_admin_v2.types.GetTableRequest, dict]]): + request (Optional[Union[google.cloud.bigtable.admin.types.GetTableRequest, dict]]): The request object. Request message for [google.bigtable.admin.v2.BigtableTableAdmin.GetTable][google.bigtable.admin.v2.BigtableTableAdmin.GetTable] name (:class:`str`): @@ -703,7 +703,7 @@ async def get_table( be of type `bytes`. Returns: - google.cloud.bigtable_admin_v2.types.Table: + google.cloud.bigtable.admin.types.Table: A collection of user data indexed by row, column, and timestamp. Each table is served using the resources of its @@ -772,10 +772,10 @@ async def update_table( r"""Updates a specified table. Args: - request (Optional[Union[google.cloud.bigtable_admin_v2.types.UpdateTableRequest, dict]]): + request (Optional[Union[google.cloud.bigtable.admin.types.UpdateTableRequest, dict]]): The request object. The request for [UpdateTable][google.bigtable.admin.v2.BigtableTableAdmin.UpdateTable]. - table (:class:`google.cloud.bigtable_admin_v2.types.Table`): + table (:class:`google.cloud.bigtable.admin.types.Table`): Required. The table to update. The table's ``name`` field is used to identify the table to update. @@ -814,7 +814,7 @@ async def update_table( google.api_core.operation_async.AsyncOperation: An object representing a long-running operation. - The result type for the operation will be :class:`google.cloud.bigtable_admin_v2.types.Table` A collection of user data indexed by row, column, and timestamp. + The result type for the operation will be :class:`google.cloud.bigtable.admin.types.Table` A collection of user data indexed by row, column, and timestamp. Each table is served using the resources of its parent cluster. @@ -893,7 +893,7 @@ async def delete_table( data. Args: - request (Optional[Union[google.cloud.bigtable_admin_v2.types.DeleteTableRequest, dict]]): + request (Optional[Union[google.cloud.bigtable.admin.types.DeleteTableRequest, dict]]): The request object. Request message for [google.bigtable.admin.v2.BigtableTableAdmin.DeleteTable][google.bigtable.admin.v2.BigtableTableAdmin.DeleteTable] name (:class:`str`): @@ -973,7 +973,7 @@ async def undelete_table( deleted. Args: - request (Optional[Union[google.cloud.bigtable_admin_v2.types.UndeleteTableRequest, dict]]): + request (Optional[Union[google.cloud.bigtable.admin.types.UndeleteTableRequest, dict]]): The request object. Request message for [google.bigtable.admin.v2.BigtableTableAdmin.UndeleteTable][google.bigtable.admin.v2.BigtableTableAdmin.UndeleteTable] name (:class:`str`): @@ -996,7 +996,7 @@ async def undelete_table( google.api_core.operation_async.AsyncOperation: An object representing a long-running operation. - The result type for the operation will be :class:`google.cloud.bigtable_admin_v2.types.Table` A collection of user data indexed by row, column, and timestamp. + The result type for the operation will be :class:`google.cloud.bigtable.admin.types.Table` A collection of user data indexed by row, column, and timestamp. Each table is served using the resources of its parent cluster. @@ -1074,7 +1074,7 @@ async def create_authorized_view( r"""Creates a new AuthorizedView in a table. Args: - request (Optional[Union[google.cloud.bigtable_admin_v2.types.CreateAuthorizedViewRequest, dict]]): + request (Optional[Union[google.cloud.bigtable.admin.types.CreateAuthorizedViewRequest, dict]]): The request object. The request for [CreateAuthorizedView][google.bigtable.admin.v2.BigtableTableAdmin.CreateAuthorizedView] parent (:class:`str`): @@ -1085,7 +1085,7 @@ async def create_authorized_view( This corresponds to the ``parent`` field on the ``request`` instance; if ``request`` is provided, this should not be set. - authorized_view (:class:`google.cloud.bigtable_admin_v2.types.AuthorizedView`): + authorized_view (:class:`google.cloud.bigtable.admin.types.AuthorizedView`): Required. The AuthorizedView to create. @@ -1114,7 +1114,7 @@ async def create_authorized_view( google.api_core.operation_async.AsyncOperation: An object representing a long-running operation. - The result type for the operation will be :class:`google.cloud.bigtable_admin_v2.types.AuthorizedView` AuthorizedViews represent subsets of a particular Cloud Bigtable table. Users + The result type for the operation will be :class:`google.cloud.bigtable.admin.types.AuthorizedView` AuthorizedViews represent subsets of a particular Cloud Bigtable table. Users can configure access to each Authorized View independently from the table and use the existing Data APIs to access the subset of data. @@ -1195,7 +1195,7 @@ async def list_authorized_views( r"""Lists all AuthorizedViews from a specific table. Args: - request (Optional[Union[google.cloud.bigtable_admin_v2.types.ListAuthorizedViewsRequest, dict]]): + request (Optional[Union[google.cloud.bigtable.admin.types.ListAuthorizedViewsRequest, dict]]): The request object. Request message for [google.bigtable.admin.v2.BigtableTableAdmin.ListAuthorizedViews][google.bigtable.admin.v2.BigtableTableAdmin.ListAuthorizedViews] parent (:class:`str`): @@ -1215,7 +1215,7 @@ async def list_authorized_views( be of type `bytes`. Returns: - google.cloud.bigtable_admin_v2.services.bigtable_table_admin.pagers.ListAuthorizedViewsAsyncPager: + google.cloud.bigtable.admin.services.bigtable_table_admin.pagers.ListAuthorizedViewsAsyncPager: Response message for [google.bigtable.admin.v2.BigtableTableAdmin.ListAuthorizedViews][google.bigtable.admin.v2.BigtableTableAdmin.ListAuthorizedViews] @@ -1297,7 +1297,7 @@ async def get_authorized_view( r"""Gets information from a specified AuthorizedView. Args: - request (Optional[Union[google.cloud.bigtable_admin_v2.types.GetAuthorizedViewRequest, dict]]): + request (Optional[Union[google.cloud.bigtable.admin.types.GetAuthorizedViewRequest, dict]]): The request object. Request message for [google.bigtable.admin.v2.BigtableTableAdmin.GetAuthorizedView][google.bigtable.admin.v2.BigtableTableAdmin.GetAuthorizedView] name (:class:`str`): @@ -1317,7 +1317,7 @@ async def get_authorized_view( be of type `bytes`. Returns: - google.cloud.bigtable_admin_v2.types.AuthorizedView: + google.cloud.bigtable.admin.types.AuthorizedView: AuthorizedViews represent subsets of a particular Cloud Bigtable table. Users can configure access to each Authorized @@ -1390,10 +1390,10 @@ async def update_authorized_view( r"""Updates an AuthorizedView in a table. Args: - request (Optional[Union[google.cloud.bigtable_admin_v2.types.UpdateAuthorizedViewRequest, dict]]): + request (Optional[Union[google.cloud.bigtable.admin.types.UpdateAuthorizedViewRequest, dict]]): The request object. The request for [UpdateAuthorizedView][google.bigtable.admin.v2.BigtableTableAdmin.UpdateAuthorizedView]. - authorized_view (:class:`google.cloud.bigtable_admin_v2.types.AuthorizedView`): + authorized_view (:class:`google.cloud.bigtable.admin.types.AuthorizedView`): Required. The AuthorizedView to update. The ``name`` in ``authorized_view`` is used to identify the AuthorizedView. AuthorizedView name must in this format @@ -1427,7 +1427,7 @@ async def update_authorized_view( google.api_core.operation_async.AsyncOperation: An object representing a long-running operation. - The result type for the operation will be :class:`google.cloud.bigtable_admin_v2.types.AuthorizedView` AuthorizedViews represent subsets of a particular Cloud Bigtable table. Users + The result type for the operation will be :class:`google.cloud.bigtable.admin.types.AuthorizedView` AuthorizedViews represent subsets of a particular Cloud Bigtable table. Users can configure access to each Authorized View independently from the table and use the existing Data APIs to access the subset of data. @@ -1508,7 +1508,7 @@ async def delete_authorized_view( r"""Permanently deletes a specified AuthorizedView. Args: - request (Optional[Union[google.cloud.bigtable_admin_v2.types.DeleteAuthorizedViewRequest, dict]]): + request (Optional[Union[google.cloud.bigtable.admin.types.DeleteAuthorizedViewRequest, dict]]): The request object. Request message for [google.bigtable.admin.v2.BigtableTableAdmin.DeleteAuthorizedView][google.bigtable.admin.v2.BigtableTableAdmin.DeleteAuthorizedView] name (:class:`str`): @@ -1596,7 +1596,7 @@ async def modify_column_families( table where only some modifications have taken effect. Args: - request (Optional[Union[google.cloud.bigtable_admin_v2.types.ModifyColumnFamiliesRequest, dict]]): + request (Optional[Union[google.cloud.bigtable.admin.types.ModifyColumnFamiliesRequest, dict]]): The request object. Request message for [google.bigtable.admin.v2.BigtableTableAdmin.ModifyColumnFamilies][google.bigtable.admin.v2.BigtableTableAdmin.ModifyColumnFamilies] name (:class:`str`): @@ -1607,7 +1607,7 @@ async def modify_column_families( This corresponds to the ``name`` field on the ``request`` instance; if ``request`` is provided, this should not be set. - modifications (:class:`MutableSequence[google.cloud.bigtable_admin_v2.types.ModifyColumnFamiliesRequest.Modification]`): + modifications (:class:`MutableSequence[google.cloud.bigtable.admin.types.ModifyColumnFamiliesRequest.Modification]`): Required. Modifications to be atomically applied to the specified table's families. Entries are applied in @@ -1628,7 +1628,7 @@ async def modify_column_families( be of type `bytes`. Returns: - google.cloud.bigtable_admin_v2.types.Table: + google.cloud.bigtable.admin.types.Table: A collection of user data indexed by row, column, and timestamp. Each table is served using the resources of its @@ -1700,7 +1700,7 @@ async def drop_row_range( prefix. Args: - request (Optional[Union[google.cloud.bigtable_admin_v2.types.DropRowRangeRequest, dict]]): + request (Optional[Union[google.cloud.bigtable.admin.types.DropRowRangeRequest, dict]]): The request object. Request message for [google.bigtable.admin.v2.BigtableTableAdmin.DropRowRange][google.bigtable.admin.v2.BigtableTableAdmin.DropRowRange] retry (google.api_core.retry_async.AsyncRetry): Designation of what errors, if any, @@ -1758,7 +1758,7 @@ async def generate_consistency_token( days. Args: - request (Optional[Union[google.cloud.bigtable_admin_v2.types.GenerateConsistencyTokenRequest, dict]]): + request (Optional[Union[google.cloud.bigtable.admin.types.GenerateConsistencyTokenRequest, dict]]): The request object. Request message for [google.bigtable.admin.v2.BigtableTableAdmin.GenerateConsistencyToken][google.bigtable.admin.v2.BigtableTableAdmin.GenerateConsistencyToken] name (:class:`str`): @@ -1778,7 +1778,7 @@ async def generate_consistency_token( be of type `bytes`. Returns: - google.cloud.bigtable_admin_v2.types.GenerateConsistencyTokenResponse: + google.cloud.bigtable.admin.types.GenerateConsistencyTokenResponse: Response message for [google.bigtable.admin.v2.BigtableTableAdmin.GenerateConsistencyToken][google.bigtable.admin.v2.BigtableTableAdmin.GenerateConsistencyToken] @@ -1852,7 +1852,7 @@ async def check_consistency( request. Args: - request (Optional[Union[google.cloud.bigtable_admin_v2.types.CheckConsistencyRequest, dict]]): + request (Optional[Union[google.cloud.bigtable.admin.types.CheckConsistencyRequest, dict]]): The request object. Request message for [google.bigtable.admin.v2.BigtableTableAdmin.CheckConsistency][google.bigtable.admin.v2.BigtableTableAdmin.CheckConsistency] name (:class:`str`): @@ -1879,7 +1879,7 @@ async def check_consistency( be of type `bytes`. Returns: - google.cloud.bigtable_admin_v2.types.CheckConsistencyResponse: + google.cloud.bigtable.admin.types.CheckConsistencyResponse: Response message for [google.bigtable.admin.v2.BigtableTableAdmin.CheckConsistency][google.bigtable.admin.v2.BigtableTableAdmin.CheckConsistency] @@ -1961,7 +1961,7 @@ async def snapshot_table( SLA or deprecation policy. Args: - request (Optional[Union[google.cloud.bigtable_admin_v2.types.SnapshotTableRequest, dict]]): + request (Optional[Union[google.cloud.bigtable.admin.types.SnapshotTableRequest, dict]]): The request object. Request message for [google.bigtable.admin.v2.BigtableTableAdmin.SnapshotTable][google.bigtable.admin.v2.BigtableTableAdmin.SnapshotTable] @@ -2014,7 +2014,7 @@ async def snapshot_table( google.api_core.operation_async.AsyncOperation: An object representing a long-running operation. - The result type for the operation will be :class:`google.cloud.bigtable_admin_v2.types.Snapshot` A snapshot of a table at a particular time. A snapshot can be used as a + The result type for the operation will be :class:`google.cloud.bigtable.admin.types.Snapshot` A snapshot of a table at a particular time. A snapshot can be used as a checkpoint for data restoration or a data source for a new table. @@ -2108,7 +2108,7 @@ async def get_snapshot( SLA or deprecation policy. Args: - request (Optional[Union[google.cloud.bigtable_admin_v2.types.GetSnapshotRequest, dict]]): + request (Optional[Union[google.cloud.bigtable.admin.types.GetSnapshotRequest, dict]]): The request object. Request message for [google.bigtable.admin.v2.BigtableTableAdmin.GetSnapshot][google.bigtable.admin.v2.BigtableTableAdmin.GetSnapshot] @@ -2135,7 +2135,7 @@ async def get_snapshot( be of type `bytes`. Returns: - google.cloud.bigtable_admin_v2.types.Snapshot: + google.cloud.bigtable.admin.types.Snapshot: A snapshot of a table at a particular time. A snapshot can be used as a checkpoint for data restoration or a @@ -2221,7 +2221,7 @@ async def list_snapshots( SLA or deprecation policy. Args: - request (Optional[Union[google.cloud.bigtable_admin_v2.types.ListSnapshotsRequest, dict]]): + request (Optional[Union[google.cloud.bigtable.admin.types.ListSnapshotsRequest, dict]]): The request object. Request message for [google.bigtable.admin.v2.BigtableTableAdmin.ListSnapshots][google.bigtable.admin.v2.BigtableTableAdmin.ListSnapshots] @@ -2251,7 +2251,7 @@ async def list_snapshots( be of type `bytes`. Returns: - google.cloud.bigtable_admin_v2.services.bigtable_table_admin.pagers.ListSnapshotsAsyncPager: + google.cloud.bigtable.admin.services.bigtable_table_admin.pagers.ListSnapshotsAsyncPager: Response message for [google.bigtable.admin.v2.BigtableTableAdmin.ListSnapshots][google.bigtable.admin.v2.BigtableTableAdmin.ListSnapshots] @@ -2347,7 +2347,7 @@ async def delete_snapshot( SLA or deprecation policy. Args: - request (Optional[Union[google.cloud.bigtable_admin_v2.types.DeleteSnapshotRequest, dict]]): + request (Optional[Union[google.cloud.bigtable.admin.types.DeleteSnapshotRequest, dict]]): The request object. Request message for [google.bigtable.admin.v2.BigtableTableAdmin.DeleteSnapshot][google.bigtable.admin.v2.BigtableTableAdmin.DeleteSnapshot] @@ -2441,7 +2441,7 @@ async def create_backup( delete the backup. Args: - request (Optional[Union[google.cloud.bigtable_admin_v2.types.CreateBackupRequest, dict]]): + request (Optional[Union[google.cloud.bigtable.admin.types.CreateBackupRequest, dict]]): The request object. The request for [CreateBackup][google.bigtable.admin.v2.BigtableTableAdmin.CreateBackup]. parent (:class:`str`): @@ -2465,7 +2465,7 @@ async def create_backup( This corresponds to the ``backup_id`` field on the ``request`` instance; if ``request`` is provided, this should not be set. - backup (:class:`google.cloud.bigtable_admin_v2.types.Backup`): + backup (:class:`google.cloud.bigtable.admin.types.Backup`): Required. The backup to create. This corresponds to the ``backup`` field on the ``request`` instance; if ``request`` is provided, this @@ -2483,7 +2483,7 @@ async def create_backup( An object representing a long-running operation. The result type for the operation will be - :class:`google.cloud.bigtable_admin_v2.types.Backup` A + :class:`google.cloud.bigtable.admin.types.Backup` A backup of a Cloud Bigtable table. """ @@ -2561,7 +2561,7 @@ async def get_backup( Bigtable Backup. Args: - request (Optional[Union[google.cloud.bigtable_admin_v2.types.GetBackupRequest, dict]]): + request (Optional[Union[google.cloud.bigtable.admin.types.GetBackupRequest, dict]]): The request object. The request for [GetBackup][google.bigtable.admin.v2.BigtableTableAdmin.GetBackup]. name (:class:`str`): @@ -2580,7 +2580,7 @@ async def get_backup( be of type `bytes`. Returns: - google.cloud.bigtable_admin_v2.types.Backup: + google.cloud.bigtable.admin.types.Backup: A backup of a Cloud Bigtable table. """ # Create or coerce a protobuf request object. @@ -2645,10 +2645,10 @@ async def update_backup( r"""Updates a pending or completed Cloud Bigtable Backup. Args: - request (Optional[Union[google.cloud.bigtable_admin_v2.types.UpdateBackupRequest, dict]]): + request (Optional[Union[google.cloud.bigtable.admin.types.UpdateBackupRequest, dict]]): The request object. The request for [UpdateBackup][google.bigtable.admin.v2.BigtableTableAdmin.UpdateBackup]. - backup (:class:`google.cloud.bigtable_admin_v2.types.Backup`): + backup (:class:`google.cloud.bigtable.admin.types.Backup`): Required. The backup to update. ``backup.name``, and the fields to be updated as specified by ``update_mask`` are required. Other fields are ignored. Update is only @@ -2680,7 +2680,7 @@ async def update_backup( be of type `bytes`. Returns: - google.cloud.bigtable_admin_v2.types.Backup: + google.cloud.bigtable.admin.types.Backup: A backup of a Cloud Bigtable table. """ # Create or coerce a protobuf request object. @@ -2748,7 +2748,7 @@ async def delete_backup( r"""Deletes a pending or completed Cloud Bigtable backup. Args: - request (Optional[Union[google.cloud.bigtable_admin_v2.types.DeleteBackupRequest, dict]]): + request (Optional[Union[google.cloud.bigtable.admin.types.DeleteBackupRequest, dict]]): The request object. The request for [DeleteBackup][google.bigtable.admin.v2.BigtableTableAdmin.DeleteBackup]. name (:class:`str`): @@ -2826,7 +2826,7 @@ async def list_backups( and pending backups. Args: - request (Optional[Union[google.cloud.bigtable_admin_v2.types.ListBackupsRequest, dict]]): + request (Optional[Union[google.cloud.bigtable.admin.types.ListBackupsRequest, dict]]): The request object. The request for [ListBackups][google.bigtable.admin.v2.BigtableTableAdmin.ListBackups]. parent (:class:`str`): @@ -2849,7 +2849,7 @@ async def list_backups( be of type `bytes`. Returns: - google.cloud.bigtable_admin_v2.services.bigtable_table_admin.pagers.ListBackupsAsyncPager: + google.cloud.bigtable.admin.services.bigtable_table_admin.pagers.ListBackupsAsyncPager: The response for [ListBackups][google.bigtable.admin.v2.BigtableTableAdmin.ListBackups]. @@ -2935,7 +2935,7 @@ async def restore_table( [Table][google.bigtable.admin.v2.Table], if successful. Args: - request (Optional[Union[google.cloud.bigtable_admin_v2.types.RestoreTableRequest, dict]]): + request (Optional[Union[google.cloud.bigtable.admin.types.RestoreTableRequest, dict]]): The request object. The request for [RestoreTable][google.bigtable.admin.v2.BigtableTableAdmin.RestoreTable]. retry (google.api_core.retry_async.AsyncRetry): Designation of what errors, if any, @@ -2950,7 +2950,7 @@ async def restore_table( google.api_core.operation_async.AsyncOperation: An object representing a long-running operation. - The result type for the operation will be :class:`google.cloud.bigtable_admin_v2.types.Table` A collection of user data indexed by row, column, and timestamp. + The result type for the operation will be :class:`google.cloud.bigtable.admin.types.Table` A collection of user data indexed by row, column, and timestamp. Each table is served using the resources of its parent cluster. @@ -3012,7 +3012,7 @@ async def copy_backup( and project. Args: - request (Optional[Union[google.cloud.bigtable_admin_v2.types.CopyBackupRequest, dict]]): + request (Optional[Union[google.cloud.bigtable.admin.types.CopyBackupRequest, dict]]): The request object. The request for [CopyBackup][google.bigtable.admin.v2.BigtableTableAdmin.CopyBackup]. parent (:class:`str`): @@ -3072,7 +3072,7 @@ async def copy_backup( An object representing a long-running operation. The result type for the operation will be - :class:`google.cloud.bigtable_admin_v2.types.Backup` A + :class:`google.cloud.bigtable.admin.types.Backup` A backup of a Cloud Bigtable table. """ diff --git a/google/cloud/bigtable_admin_v2/services/bigtable_table_admin/client.py b/google/cloud/bigtable/admin/services/bigtable_table_admin/client.py similarity index 96% rename from google/cloud/bigtable_admin_v2/services/bigtable_table_admin/client.py rename to google/cloud/bigtable/admin/services/bigtable_table_admin/client.py index abb82b1ed..7409bc0ff 100644 --- a/google/cloud/bigtable_admin_v2/services/bigtable_table_admin/client.py +++ b/google/cloud/bigtable/admin/services/bigtable_table_admin/client.py @@ -34,7 +34,7 @@ ) import warnings -from google.cloud.bigtable_admin_v2 import gapic_version as package_version +from google.cloud.bigtable.admin import gapic_version as package_version from google.api_core import client_options as client_options_lib from google.api_core import exceptions as core_exceptions @@ -63,11 +63,11 @@ from google.api_core import operation # type: ignore from google.api_core import operation_async # type: ignore -from google.cloud.bigtable_admin_v2.services.bigtable_table_admin import pagers -from google.cloud.bigtable_admin_v2.types import bigtable_table_admin -from google.cloud.bigtable_admin_v2.types import table -from google.cloud.bigtable_admin_v2.types import table as gba_table -from google.cloud.bigtable_admin_v2.types import types +from google.cloud.bigtable.admin.services.bigtable_table_admin import pagers +from google.cloud.bigtable.admin.types import bigtable_table_admin +from google.cloud.bigtable.admin.types import table +from google.cloud.bigtable.admin.types import table as gba_table +from google.cloud.bigtable.admin.types import types from google.iam.v1 import iam_policy_pb2 # type: ignore from google.iam.v1 import policy_pb2 # type: ignore from google.protobuf import field_mask_pb2 # type: ignore @@ -881,7 +881,7 @@ def create_table( column families, specified in the request. Args: - request (Union[google.cloud.bigtable_admin_v2.types.CreateTableRequest, dict]): + request (Union[google.cloud.bigtable.admin.types.CreateTableRequest, dict]): The request object. Request message for [google.bigtable.admin.v2.BigtableTableAdmin.CreateTable][google.bigtable.admin.v2.BigtableTableAdmin.CreateTable] parent (str): @@ -901,7 +901,7 @@ def create_table( This corresponds to the ``table_id`` field on the ``request`` instance; if ``request`` is provided, this should not be set. - table (google.cloud.bigtable_admin_v2.types.Table): + table (google.cloud.bigtable.admin.types.Table): Required. The Table to create. This corresponds to the ``table`` field on the ``request`` instance; if ``request`` is provided, this @@ -915,7 +915,7 @@ def create_table( be of type `bytes`. Returns: - google.cloud.bigtable_admin_v2.types.Table: + google.cloud.bigtable.admin.types.Table: A collection of user data indexed by row, column, and timestamp. Each table is served using the resources of its @@ -997,7 +997,7 @@ def create_table_from_snapshot( SLA or deprecation policy. Args: - request (Union[google.cloud.bigtable_admin_v2.types.CreateTableFromSnapshotRequest, dict]): + request (Union[google.cloud.bigtable.admin.types.CreateTableFromSnapshotRequest, dict]): The request object. Request message for [google.bigtable.admin.v2.BigtableTableAdmin.CreateTableFromSnapshot][google.bigtable.admin.v2.BigtableTableAdmin.CreateTableFromSnapshot] @@ -1044,7 +1044,7 @@ def create_table_from_snapshot( google.api_core.operation.Operation: An object representing a long-running operation. - The result type for the operation will be :class:`google.cloud.bigtable_admin_v2.types.Table` A collection of user data indexed by row, column, and timestamp. + The result type for the operation will be :class:`google.cloud.bigtable.admin.types.Table` A collection of user data indexed by row, column, and timestamp. Each table is served using the resources of its parent cluster. @@ -1121,7 +1121,7 @@ def list_tables( r"""Lists all tables served from a specified instance. Args: - request (Union[google.cloud.bigtable_admin_v2.types.ListTablesRequest, dict]): + request (Union[google.cloud.bigtable.admin.types.ListTablesRequest, dict]): The request object. Request message for [google.bigtable.admin.v2.BigtableTableAdmin.ListTables][google.bigtable.admin.v2.BigtableTableAdmin.ListTables] parent (str): @@ -1141,7 +1141,7 @@ def list_tables( be of type `bytes`. Returns: - google.cloud.bigtable_admin_v2.services.bigtable_table_admin.pagers.ListTablesPager: + google.cloud.bigtable.admin.services.bigtable_table_admin.pagers.ListTablesPager: Response message for [google.bigtable.admin.v2.BigtableTableAdmin.ListTables][google.bigtable.admin.v2.BigtableTableAdmin.ListTables] @@ -1218,7 +1218,7 @@ def get_table( r"""Gets metadata information about the specified table. Args: - request (Union[google.cloud.bigtable_admin_v2.types.GetTableRequest, dict]): + request (Union[google.cloud.bigtable.admin.types.GetTableRequest, dict]): The request object. Request message for [google.bigtable.admin.v2.BigtableTableAdmin.GetTable][google.bigtable.admin.v2.BigtableTableAdmin.GetTable] name (str): @@ -1238,7 +1238,7 @@ def get_table( be of type `bytes`. Returns: - google.cloud.bigtable_admin_v2.types.Table: + google.cloud.bigtable.admin.types.Table: A collection of user data indexed by row, column, and timestamp. Each table is served using the resources of its @@ -1304,10 +1304,10 @@ def update_table( r"""Updates a specified table. Args: - request (Union[google.cloud.bigtable_admin_v2.types.UpdateTableRequest, dict]): + request (Union[google.cloud.bigtable.admin.types.UpdateTableRequest, dict]): The request object. The request for [UpdateTable][google.bigtable.admin.v2.BigtableTableAdmin.UpdateTable]. - table (google.cloud.bigtable_admin_v2.types.Table): + table (google.cloud.bigtable.admin.types.Table): Required. The table to update. The table's ``name`` field is used to identify the table to update. @@ -1346,7 +1346,7 @@ def update_table( google.api_core.operation.Operation: An object representing a long-running operation. - The result type for the operation will be :class:`google.cloud.bigtable_admin_v2.types.Table` A collection of user data indexed by row, column, and timestamp. + The result type for the operation will be :class:`google.cloud.bigtable.admin.types.Table` A collection of user data indexed by row, column, and timestamp. Each table is served using the resources of its parent cluster. @@ -1422,7 +1422,7 @@ def delete_table( data. Args: - request (Union[google.cloud.bigtable_admin_v2.types.DeleteTableRequest, dict]): + request (Union[google.cloud.bigtable.admin.types.DeleteTableRequest, dict]): The request object. Request message for [google.bigtable.admin.v2.BigtableTableAdmin.DeleteTable][google.bigtable.admin.v2.BigtableTableAdmin.DeleteTable] name (str): @@ -1499,7 +1499,7 @@ def undelete_table( deleted. Args: - request (Union[google.cloud.bigtable_admin_v2.types.UndeleteTableRequest, dict]): + request (Union[google.cloud.bigtable.admin.types.UndeleteTableRequest, dict]): The request object. Request message for [google.bigtable.admin.v2.BigtableTableAdmin.UndeleteTable][google.bigtable.admin.v2.BigtableTableAdmin.UndeleteTable] name (str): @@ -1522,7 +1522,7 @@ def undelete_table( google.api_core.operation.Operation: An object representing a long-running operation. - The result type for the operation will be :class:`google.cloud.bigtable_admin_v2.types.Table` A collection of user data indexed by row, column, and timestamp. + The result type for the operation will be :class:`google.cloud.bigtable.admin.types.Table` A collection of user data indexed by row, column, and timestamp. Each table is served using the resources of its parent cluster. @@ -1597,7 +1597,7 @@ def create_authorized_view( r"""Creates a new AuthorizedView in a table. Args: - request (Union[google.cloud.bigtable_admin_v2.types.CreateAuthorizedViewRequest, dict]): + request (Union[google.cloud.bigtable.admin.types.CreateAuthorizedViewRequest, dict]): The request object. The request for [CreateAuthorizedView][google.bigtable.admin.v2.BigtableTableAdmin.CreateAuthorizedView] parent (str): @@ -1608,7 +1608,7 @@ def create_authorized_view( This corresponds to the ``parent`` field on the ``request`` instance; if ``request`` is provided, this should not be set. - authorized_view (google.cloud.bigtable_admin_v2.types.AuthorizedView): + authorized_view (google.cloud.bigtable.admin.types.AuthorizedView): Required. The AuthorizedView to create. @@ -1637,7 +1637,7 @@ def create_authorized_view( google.api_core.operation.Operation: An object representing a long-running operation. - The result type for the operation will be :class:`google.cloud.bigtable_admin_v2.types.AuthorizedView` AuthorizedViews represent subsets of a particular Cloud Bigtable table. Users + The result type for the operation will be :class:`google.cloud.bigtable.admin.types.AuthorizedView` AuthorizedViews represent subsets of a particular Cloud Bigtable table. Users can configure access to each Authorized View independently from the table and use the existing Data APIs to access the subset of data. @@ -1715,7 +1715,7 @@ def list_authorized_views( r"""Lists all AuthorizedViews from a specific table. Args: - request (Union[google.cloud.bigtable_admin_v2.types.ListAuthorizedViewsRequest, dict]): + request (Union[google.cloud.bigtable.admin.types.ListAuthorizedViewsRequest, dict]): The request object. Request message for [google.bigtable.admin.v2.BigtableTableAdmin.ListAuthorizedViews][google.bigtable.admin.v2.BigtableTableAdmin.ListAuthorizedViews] parent (str): @@ -1735,7 +1735,7 @@ def list_authorized_views( be of type `bytes`. Returns: - google.cloud.bigtable_admin_v2.services.bigtable_table_admin.pagers.ListAuthorizedViewsPager: + google.cloud.bigtable.admin.services.bigtable_table_admin.pagers.ListAuthorizedViewsPager: Response message for [google.bigtable.admin.v2.BigtableTableAdmin.ListAuthorizedViews][google.bigtable.admin.v2.BigtableTableAdmin.ListAuthorizedViews] @@ -1814,7 +1814,7 @@ def get_authorized_view( r"""Gets information from a specified AuthorizedView. Args: - request (Union[google.cloud.bigtable_admin_v2.types.GetAuthorizedViewRequest, dict]): + request (Union[google.cloud.bigtable.admin.types.GetAuthorizedViewRequest, dict]): The request object. Request message for [google.bigtable.admin.v2.BigtableTableAdmin.GetAuthorizedView][google.bigtable.admin.v2.BigtableTableAdmin.GetAuthorizedView] name (str): @@ -1834,7 +1834,7 @@ def get_authorized_view( be of type `bytes`. Returns: - google.cloud.bigtable_admin_v2.types.AuthorizedView: + google.cloud.bigtable.admin.types.AuthorizedView: AuthorizedViews represent subsets of a particular Cloud Bigtable table. Users can configure access to each Authorized @@ -1904,10 +1904,10 @@ def update_authorized_view( r"""Updates an AuthorizedView in a table. Args: - request (Union[google.cloud.bigtable_admin_v2.types.UpdateAuthorizedViewRequest, dict]): + request (Union[google.cloud.bigtable.admin.types.UpdateAuthorizedViewRequest, dict]): The request object. The request for [UpdateAuthorizedView][google.bigtable.admin.v2.BigtableTableAdmin.UpdateAuthorizedView]. - authorized_view (google.cloud.bigtable_admin_v2.types.AuthorizedView): + authorized_view (google.cloud.bigtable.admin.types.AuthorizedView): Required. The AuthorizedView to update. The ``name`` in ``authorized_view`` is used to identify the AuthorizedView. AuthorizedView name must in this format @@ -1941,7 +1941,7 @@ def update_authorized_view( google.api_core.operation.Operation: An object representing a long-running operation. - The result type for the operation will be :class:`google.cloud.bigtable_admin_v2.types.AuthorizedView` AuthorizedViews represent subsets of a particular Cloud Bigtable table. Users + The result type for the operation will be :class:`google.cloud.bigtable.admin.types.AuthorizedView` AuthorizedViews represent subsets of a particular Cloud Bigtable table. Users can configure access to each Authorized View independently from the table and use the existing Data APIs to access the subset of data. @@ -2019,7 +2019,7 @@ def delete_authorized_view( r"""Permanently deletes a specified AuthorizedView. Args: - request (Union[google.cloud.bigtable_admin_v2.types.DeleteAuthorizedViewRequest, dict]): + request (Union[google.cloud.bigtable.admin.types.DeleteAuthorizedViewRequest, dict]): The request object. Request message for [google.bigtable.admin.v2.BigtableTableAdmin.DeleteAuthorizedView][google.bigtable.admin.v2.BigtableTableAdmin.DeleteAuthorizedView] name (str): @@ -2104,7 +2104,7 @@ def modify_column_families( table where only some modifications have taken effect. Args: - request (Union[google.cloud.bigtable_admin_v2.types.ModifyColumnFamiliesRequest, dict]): + request (Union[google.cloud.bigtable.admin.types.ModifyColumnFamiliesRequest, dict]): The request object. Request message for [google.bigtable.admin.v2.BigtableTableAdmin.ModifyColumnFamilies][google.bigtable.admin.v2.BigtableTableAdmin.ModifyColumnFamilies] name (str): @@ -2115,7 +2115,7 @@ def modify_column_families( This corresponds to the ``name`` field on the ``request`` instance; if ``request`` is provided, this should not be set. - modifications (MutableSequence[google.cloud.bigtable_admin_v2.types.ModifyColumnFamiliesRequest.Modification]): + modifications (MutableSequence[google.cloud.bigtable.admin.types.ModifyColumnFamiliesRequest.Modification]): Required. Modifications to be atomically applied to the specified table's families. Entries are applied in @@ -2136,7 +2136,7 @@ def modify_column_families( be of type `bytes`. Returns: - google.cloud.bigtable_admin_v2.types.Table: + google.cloud.bigtable.admin.types.Table: A collection of user data indexed by row, column, and timestamp. Each table is served using the resources of its @@ -2205,7 +2205,7 @@ def drop_row_range( prefix. Args: - request (Union[google.cloud.bigtable_admin_v2.types.DropRowRangeRequest, dict]): + request (Union[google.cloud.bigtable.admin.types.DropRowRangeRequest, dict]): The request object. Request message for [google.bigtable.admin.v2.BigtableTableAdmin.DropRowRange][google.bigtable.admin.v2.BigtableTableAdmin.DropRowRange] retry (google.api_core.retry.Retry): Designation of what errors, if any, @@ -2261,7 +2261,7 @@ def generate_consistency_token( days. Args: - request (Union[google.cloud.bigtable_admin_v2.types.GenerateConsistencyTokenRequest, dict]): + request (Union[google.cloud.bigtable.admin.types.GenerateConsistencyTokenRequest, dict]): The request object. Request message for [google.bigtable.admin.v2.BigtableTableAdmin.GenerateConsistencyToken][google.bigtable.admin.v2.BigtableTableAdmin.GenerateConsistencyToken] name (str): @@ -2281,7 +2281,7 @@ def generate_consistency_token( be of type `bytes`. Returns: - google.cloud.bigtable_admin_v2.types.GenerateConsistencyTokenResponse: + google.cloud.bigtable.admin.types.GenerateConsistencyTokenResponse: Response message for [google.bigtable.admin.v2.BigtableTableAdmin.GenerateConsistencyToken][google.bigtable.admin.v2.BigtableTableAdmin.GenerateConsistencyToken] @@ -2354,7 +2354,7 @@ def check_consistency( request. Args: - request (Union[google.cloud.bigtable_admin_v2.types.CheckConsistencyRequest, dict]): + request (Union[google.cloud.bigtable.admin.types.CheckConsistencyRequest, dict]): The request object. Request message for [google.bigtable.admin.v2.BigtableTableAdmin.CheckConsistency][google.bigtable.admin.v2.BigtableTableAdmin.CheckConsistency] name (str): @@ -2381,7 +2381,7 @@ def check_consistency( be of type `bytes`. Returns: - google.cloud.bigtable_admin_v2.types.CheckConsistencyResponse: + google.cloud.bigtable.admin.types.CheckConsistencyResponse: Response message for [google.bigtable.admin.v2.BigtableTableAdmin.CheckConsistency][google.bigtable.admin.v2.BigtableTableAdmin.CheckConsistency] @@ -2460,7 +2460,7 @@ def snapshot_table( SLA or deprecation policy. Args: - request (Union[google.cloud.bigtable_admin_v2.types.SnapshotTableRequest, dict]): + request (Union[google.cloud.bigtable.admin.types.SnapshotTableRequest, dict]): The request object. Request message for [google.bigtable.admin.v2.BigtableTableAdmin.SnapshotTable][google.bigtable.admin.v2.BigtableTableAdmin.SnapshotTable] @@ -2513,7 +2513,7 @@ def snapshot_table( google.api_core.operation.Operation: An object representing a long-running operation. - The result type for the operation will be :class:`google.cloud.bigtable_admin_v2.types.Snapshot` A snapshot of a table at a particular time. A snapshot can be used as a + The result type for the operation will be :class:`google.cloud.bigtable.admin.types.Snapshot` A snapshot of a table at a particular time. A snapshot can be used as a checkpoint for data restoration or a data source for a new table. @@ -2604,7 +2604,7 @@ def get_snapshot( SLA or deprecation policy. Args: - request (Union[google.cloud.bigtable_admin_v2.types.GetSnapshotRequest, dict]): + request (Union[google.cloud.bigtable.admin.types.GetSnapshotRequest, dict]): The request object. Request message for [google.bigtable.admin.v2.BigtableTableAdmin.GetSnapshot][google.bigtable.admin.v2.BigtableTableAdmin.GetSnapshot] @@ -2631,7 +2631,7 @@ def get_snapshot( be of type `bytes`. Returns: - google.cloud.bigtable_admin_v2.types.Snapshot: + google.cloud.bigtable.admin.types.Snapshot: A snapshot of a table at a particular time. A snapshot can be used as a checkpoint for data restoration or a @@ -2714,7 +2714,7 @@ def list_snapshots( SLA or deprecation policy. Args: - request (Union[google.cloud.bigtable_admin_v2.types.ListSnapshotsRequest, dict]): + request (Union[google.cloud.bigtable.admin.types.ListSnapshotsRequest, dict]): The request object. Request message for [google.bigtable.admin.v2.BigtableTableAdmin.ListSnapshots][google.bigtable.admin.v2.BigtableTableAdmin.ListSnapshots] @@ -2744,7 +2744,7 @@ def list_snapshots( be of type `bytes`. Returns: - google.cloud.bigtable_admin_v2.services.bigtable_table_admin.pagers.ListSnapshotsPager: + google.cloud.bigtable.admin.services.bigtable_table_admin.pagers.ListSnapshotsPager: Response message for [google.bigtable.admin.v2.BigtableTableAdmin.ListSnapshots][google.bigtable.admin.v2.BigtableTableAdmin.ListSnapshots] @@ -2837,7 +2837,7 @@ def delete_snapshot( SLA or deprecation policy. Args: - request (Union[google.cloud.bigtable_admin_v2.types.DeleteSnapshotRequest, dict]): + request (Union[google.cloud.bigtable.admin.types.DeleteSnapshotRequest, dict]): The request object. Request message for [google.bigtable.admin.v2.BigtableTableAdmin.DeleteSnapshot][google.bigtable.admin.v2.BigtableTableAdmin.DeleteSnapshot] @@ -2928,7 +2928,7 @@ def create_backup( delete the backup. Args: - request (Union[google.cloud.bigtable_admin_v2.types.CreateBackupRequest, dict]): + request (Union[google.cloud.bigtable.admin.types.CreateBackupRequest, dict]): The request object. The request for [CreateBackup][google.bigtable.admin.v2.BigtableTableAdmin.CreateBackup]. parent (str): @@ -2952,7 +2952,7 @@ def create_backup( This corresponds to the ``backup_id`` field on the ``request`` instance; if ``request`` is provided, this should not be set. - backup (google.cloud.bigtable_admin_v2.types.Backup): + backup (google.cloud.bigtable.admin.types.Backup): Required. The backup to create. This corresponds to the ``backup`` field on the ``request`` instance; if ``request`` is provided, this @@ -2970,7 +2970,7 @@ def create_backup( An object representing a long-running operation. The result type for the operation will be - :class:`google.cloud.bigtable_admin_v2.types.Backup` A + :class:`google.cloud.bigtable.admin.types.Backup` A backup of a Cloud Bigtable table. """ @@ -3045,7 +3045,7 @@ def get_backup( Bigtable Backup. Args: - request (Union[google.cloud.bigtable_admin_v2.types.GetBackupRequest, dict]): + request (Union[google.cloud.bigtable.admin.types.GetBackupRequest, dict]): The request object. The request for [GetBackup][google.bigtable.admin.v2.BigtableTableAdmin.GetBackup]. name (str): @@ -3064,7 +3064,7 @@ def get_backup( be of type `bytes`. Returns: - google.cloud.bigtable_admin_v2.types.Backup: + google.cloud.bigtable.admin.types.Backup: A backup of a Cloud Bigtable table. """ # Create or coerce a protobuf request object. @@ -3126,10 +3126,10 @@ def update_backup( r"""Updates a pending or completed Cloud Bigtable Backup. Args: - request (Union[google.cloud.bigtable_admin_v2.types.UpdateBackupRequest, dict]): + request (Union[google.cloud.bigtable.admin.types.UpdateBackupRequest, dict]): The request object. The request for [UpdateBackup][google.bigtable.admin.v2.BigtableTableAdmin.UpdateBackup]. - backup (google.cloud.bigtable_admin_v2.types.Backup): + backup (google.cloud.bigtable.admin.types.Backup): Required. The backup to update. ``backup.name``, and the fields to be updated as specified by ``update_mask`` are required. Other fields are ignored. Update is only @@ -3161,7 +3161,7 @@ def update_backup( be of type `bytes`. Returns: - google.cloud.bigtable_admin_v2.types.Backup: + google.cloud.bigtable.admin.types.Backup: A backup of a Cloud Bigtable table. """ # Create or coerce a protobuf request object. @@ -3226,7 +3226,7 @@ def delete_backup( r"""Deletes a pending or completed Cloud Bigtable backup. Args: - request (Union[google.cloud.bigtable_admin_v2.types.DeleteBackupRequest, dict]): + request (Union[google.cloud.bigtable.admin.types.DeleteBackupRequest, dict]): The request object. The request for [DeleteBackup][google.bigtable.admin.v2.BigtableTableAdmin.DeleteBackup]. name (str): @@ -3301,7 +3301,7 @@ def list_backups( and pending backups. Args: - request (Union[google.cloud.bigtable_admin_v2.types.ListBackupsRequest, dict]): + request (Union[google.cloud.bigtable.admin.types.ListBackupsRequest, dict]): The request object. The request for [ListBackups][google.bigtable.admin.v2.BigtableTableAdmin.ListBackups]. parent (str): @@ -3324,7 +3324,7 @@ def list_backups( be of type `bytes`. Returns: - google.cloud.bigtable_admin_v2.services.bigtable_table_admin.pagers.ListBackupsPager: + google.cloud.bigtable.admin.services.bigtable_table_admin.pagers.ListBackupsPager: The response for [ListBackups][google.bigtable.admin.v2.BigtableTableAdmin.ListBackups]. @@ -3407,7 +3407,7 @@ def restore_table( [Table][google.bigtable.admin.v2.Table], if successful. Args: - request (Union[google.cloud.bigtable_admin_v2.types.RestoreTableRequest, dict]): + request (Union[google.cloud.bigtable.admin.types.RestoreTableRequest, dict]): The request object. The request for [RestoreTable][google.bigtable.admin.v2.BigtableTableAdmin.RestoreTable]. retry (google.api_core.retry.Retry): Designation of what errors, if any, @@ -3422,7 +3422,7 @@ def restore_table( google.api_core.operation.Operation: An object representing a long-running operation. - The result type for the operation will be :class:`google.cloud.bigtable_admin_v2.types.Table` A collection of user data indexed by row, column, and timestamp. + The result type for the operation will be :class:`google.cloud.bigtable.admin.types.Table` A collection of user data indexed by row, column, and timestamp. Each table is served using the resources of its parent cluster. @@ -3482,7 +3482,7 @@ def copy_backup( and project. Args: - request (Union[google.cloud.bigtable_admin_v2.types.CopyBackupRequest, dict]): + request (Union[google.cloud.bigtable.admin.types.CopyBackupRequest, dict]): The request object. The request for [CopyBackup][google.bigtable.admin.v2.BigtableTableAdmin.CopyBackup]. parent (str): @@ -3542,7 +3542,7 @@ def copy_backup( An object representing a long-running operation. The result type for the operation will be - :class:`google.cloud.bigtable_admin_v2.types.Backup` A + :class:`google.cloud.bigtable.admin.types.Backup` A backup of a Cloud Bigtable table. """ diff --git a/google/cloud/bigtable_admin_v2/services/bigtable_table_admin/pagers.py b/google/cloud/bigtable/admin/services/bigtable_table_admin/pagers.py similarity index 89% rename from google/cloud/bigtable_admin_v2/services/bigtable_table_admin/pagers.py rename to google/cloud/bigtable/admin/services/bigtable_table_admin/pagers.py index 8b1ffba34..101127db0 100644 --- a/google/cloud/bigtable_admin_v2/services/bigtable_table_admin/pagers.py +++ b/google/cloud/bigtable/admin/services/bigtable_table_admin/pagers.py @@ -37,15 +37,15 @@ OptionalRetry = Union[retries.Retry, object, None] # type: ignore OptionalAsyncRetry = Union[retries_async.AsyncRetry, object, None] # type: ignore -from google.cloud.bigtable_admin_v2.types import bigtable_table_admin -from google.cloud.bigtable_admin_v2.types import table +from google.cloud.bigtable.admin.types import bigtable_table_admin +from google.cloud.bigtable.admin.types import table class ListTablesPager: """A pager for iterating through ``list_tables`` requests. This class thinly wraps an initial - :class:`google.cloud.bigtable_admin_v2.types.ListTablesResponse` object, and + :class:`google.cloud.bigtable.admin.types.ListTablesResponse` object, and provides an ``__iter__`` method to iterate through its ``tables`` field. @@ -54,7 +54,7 @@ class ListTablesPager: through the ``tables`` field on the corresponding responses. - All the usual :class:`google.cloud.bigtable_admin_v2.types.ListTablesResponse` + All the usual :class:`google.cloud.bigtable.admin.types.ListTablesResponse` attributes are available on the pager. If multiple requests are made, only the most recent response is retained, and thus used for attribute lookup. """ @@ -74,9 +74,9 @@ def __init__( Args: method (Callable): The method that was originally called, and which instantiated this pager. - request (google.cloud.bigtable_admin_v2.types.ListTablesRequest): + request (google.cloud.bigtable.admin.types.ListTablesRequest): The initial request object. - response (google.cloud.bigtable_admin_v2.types.ListTablesResponse): + response (google.cloud.bigtable.admin.types.ListTablesResponse): The initial response object. retry (google.api_core.retry.Retry): Designation of what errors, if any, should be retried. @@ -121,7 +121,7 @@ class ListTablesAsyncPager: """A pager for iterating through ``list_tables`` requests. This class thinly wraps an initial - :class:`google.cloud.bigtable_admin_v2.types.ListTablesResponse` object, and + :class:`google.cloud.bigtable.admin.types.ListTablesResponse` object, and provides an ``__aiter__`` method to iterate through its ``tables`` field. @@ -130,7 +130,7 @@ class ListTablesAsyncPager: through the ``tables`` field on the corresponding responses. - All the usual :class:`google.cloud.bigtable_admin_v2.types.ListTablesResponse` + All the usual :class:`google.cloud.bigtable.admin.types.ListTablesResponse` attributes are available on the pager. If multiple requests are made, only the most recent response is retained, and thus used for attribute lookup. """ @@ -150,9 +150,9 @@ def __init__( Args: method (Callable): The method that was originally called, and which instantiated this pager. - request (google.cloud.bigtable_admin_v2.types.ListTablesRequest): + request (google.cloud.bigtable.admin.types.ListTablesRequest): The initial request object. - response (google.cloud.bigtable_admin_v2.types.ListTablesResponse): + response (google.cloud.bigtable.admin.types.ListTablesResponse): The initial response object. retry (google.api_core.retry.AsyncRetry): Designation of what errors, if any, should be retried. @@ -201,7 +201,7 @@ class ListAuthorizedViewsPager: """A pager for iterating through ``list_authorized_views`` requests. This class thinly wraps an initial - :class:`google.cloud.bigtable_admin_v2.types.ListAuthorizedViewsResponse` object, and + :class:`google.cloud.bigtable.admin.types.ListAuthorizedViewsResponse` object, and provides an ``__iter__`` method to iterate through its ``authorized_views`` field. @@ -210,7 +210,7 @@ class ListAuthorizedViewsPager: through the ``authorized_views`` field on the corresponding responses. - All the usual :class:`google.cloud.bigtable_admin_v2.types.ListAuthorizedViewsResponse` + All the usual :class:`google.cloud.bigtable.admin.types.ListAuthorizedViewsResponse` attributes are available on the pager. If multiple requests are made, only the most recent response is retained, and thus used for attribute lookup. """ @@ -230,9 +230,9 @@ def __init__( Args: method (Callable): The method that was originally called, and which instantiated this pager. - request (google.cloud.bigtable_admin_v2.types.ListAuthorizedViewsRequest): + request (google.cloud.bigtable.admin.types.ListAuthorizedViewsRequest): The initial request object. - response (google.cloud.bigtable_admin_v2.types.ListAuthorizedViewsResponse): + response (google.cloud.bigtable.admin.types.ListAuthorizedViewsResponse): The initial response object. retry (google.api_core.retry.Retry): Designation of what errors, if any, should be retried. @@ -277,7 +277,7 @@ class ListAuthorizedViewsAsyncPager: """A pager for iterating through ``list_authorized_views`` requests. This class thinly wraps an initial - :class:`google.cloud.bigtable_admin_v2.types.ListAuthorizedViewsResponse` object, and + :class:`google.cloud.bigtable.admin.types.ListAuthorizedViewsResponse` object, and provides an ``__aiter__`` method to iterate through its ``authorized_views`` field. @@ -286,7 +286,7 @@ class ListAuthorizedViewsAsyncPager: through the ``authorized_views`` field on the corresponding responses. - All the usual :class:`google.cloud.bigtable_admin_v2.types.ListAuthorizedViewsResponse` + All the usual :class:`google.cloud.bigtable.admin.types.ListAuthorizedViewsResponse` attributes are available on the pager. If multiple requests are made, only the most recent response is retained, and thus used for attribute lookup. """ @@ -308,9 +308,9 @@ def __init__( Args: method (Callable): The method that was originally called, and which instantiated this pager. - request (google.cloud.bigtable_admin_v2.types.ListAuthorizedViewsRequest): + request (google.cloud.bigtable.admin.types.ListAuthorizedViewsRequest): The initial request object. - response (google.cloud.bigtable_admin_v2.types.ListAuthorizedViewsResponse): + response (google.cloud.bigtable.admin.types.ListAuthorizedViewsResponse): The initial response object. retry (google.api_core.retry.AsyncRetry): Designation of what errors, if any, should be retried. @@ -361,7 +361,7 @@ class ListSnapshotsPager: """A pager for iterating through ``list_snapshots`` requests. This class thinly wraps an initial - :class:`google.cloud.bigtable_admin_v2.types.ListSnapshotsResponse` object, and + :class:`google.cloud.bigtable.admin.types.ListSnapshotsResponse` object, and provides an ``__iter__`` method to iterate through its ``snapshots`` field. @@ -370,7 +370,7 @@ class ListSnapshotsPager: through the ``snapshots`` field on the corresponding responses. - All the usual :class:`google.cloud.bigtable_admin_v2.types.ListSnapshotsResponse` + All the usual :class:`google.cloud.bigtable.admin.types.ListSnapshotsResponse` attributes are available on the pager. If multiple requests are made, only the most recent response is retained, and thus used for attribute lookup. """ @@ -390,9 +390,9 @@ def __init__( Args: method (Callable): The method that was originally called, and which instantiated this pager. - request (google.cloud.bigtable_admin_v2.types.ListSnapshotsRequest): + request (google.cloud.bigtable.admin.types.ListSnapshotsRequest): The initial request object. - response (google.cloud.bigtable_admin_v2.types.ListSnapshotsResponse): + response (google.cloud.bigtable.admin.types.ListSnapshotsResponse): The initial response object. retry (google.api_core.retry.Retry): Designation of what errors, if any, should be retried. @@ -437,7 +437,7 @@ class ListSnapshotsAsyncPager: """A pager for iterating through ``list_snapshots`` requests. This class thinly wraps an initial - :class:`google.cloud.bigtable_admin_v2.types.ListSnapshotsResponse` object, and + :class:`google.cloud.bigtable.admin.types.ListSnapshotsResponse` object, and provides an ``__aiter__`` method to iterate through its ``snapshots`` field. @@ -446,7 +446,7 @@ class ListSnapshotsAsyncPager: through the ``snapshots`` field on the corresponding responses. - All the usual :class:`google.cloud.bigtable_admin_v2.types.ListSnapshotsResponse` + All the usual :class:`google.cloud.bigtable.admin.types.ListSnapshotsResponse` attributes are available on the pager. If multiple requests are made, only the most recent response is retained, and thus used for attribute lookup. """ @@ -466,9 +466,9 @@ def __init__( Args: method (Callable): The method that was originally called, and which instantiated this pager. - request (google.cloud.bigtable_admin_v2.types.ListSnapshotsRequest): + request (google.cloud.bigtable.admin.types.ListSnapshotsRequest): The initial request object. - response (google.cloud.bigtable_admin_v2.types.ListSnapshotsResponse): + response (google.cloud.bigtable.admin.types.ListSnapshotsResponse): The initial response object. retry (google.api_core.retry.AsyncRetry): Designation of what errors, if any, should be retried. @@ -517,7 +517,7 @@ class ListBackupsPager: """A pager for iterating through ``list_backups`` requests. This class thinly wraps an initial - :class:`google.cloud.bigtable_admin_v2.types.ListBackupsResponse` object, and + :class:`google.cloud.bigtable.admin.types.ListBackupsResponse` object, and provides an ``__iter__`` method to iterate through its ``backups`` field. @@ -526,7 +526,7 @@ class ListBackupsPager: through the ``backups`` field on the corresponding responses. - All the usual :class:`google.cloud.bigtable_admin_v2.types.ListBackupsResponse` + All the usual :class:`google.cloud.bigtable.admin.types.ListBackupsResponse` attributes are available on the pager. If multiple requests are made, only the most recent response is retained, and thus used for attribute lookup. """ @@ -546,9 +546,9 @@ def __init__( Args: method (Callable): The method that was originally called, and which instantiated this pager. - request (google.cloud.bigtable_admin_v2.types.ListBackupsRequest): + request (google.cloud.bigtable.admin.types.ListBackupsRequest): The initial request object. - response (google.cloud.bigtable_admin_v2.types.ListBackupsResponse): + response (google.cloud.bigtable.admin.types.ListBackupsResponse): The initial response object. retry (google.api_core.retry.Retry): Designation of what errors, if any, should be retried. @@ -593,7 +593,7 @@ class ListBackupsAsyncPager: """A pager for iterating through ``list_backups`` requests. This class thinly wraps an initial - :class:`google.cloud.bigtable_admin_v2.types.ListBackupsResponse` object, and + :class:`google.cloud.bigtable.admin.types.ListBackupsResponse` object, and provides an ``__aiter__`` method to iterate through its ``backups`` field. @@ -602,7 +602,7 @@ class ListBackupsAsyncPager: through the ``backups`` field on the corresponding responses. - All the usual :class:`google.cloud.bigtable_admin_v2.types.ListBackupsResponse` + All the usual :class:`google.cloud.bigtable.admin.types.ListBackupsResponse` attributes are available on the pager. If multiple requests are made, only the most recent response is retained, and thus used for attribute lookup. """ @@ -622,9 +622,9 @@ def __init__( Args: method (Callable): The method that was originally called, and which instantiated this pager. - request (google.cloud.bigtable_admin_v2.types.ListBackupsRequest): + request (google.cloud.bigtable.admin.types.ListBackupsRequest): The initial request object. - response (google.cloud.bigtable_admin_v2.types.ListBackupsResponse): + response (google.cloud.bigtable.admin.types.ListBackupsResponse): The initial response object. retry (google.api_core.retry.AsyncRetry): Designation of what errors, if any, should be retried. diff --git a/google/cloud/bigtable_admin_v2/services/bigtable_table_admin/transports/README.rst b/google/cloud/bigtable/admin/services/bigtable_table_admin/transports/README.rst similarity index 100% rename from google/cloud/bigtable_admin_v2/services/bigtable_table_admin/transports/README.rst rename to google/cloud/bigtable/admin/services/bigtable_table_admin/transports/README.rst diff --git a/google/cloud/bigtable_admin_v2/services/bigtable_table_admin/transports/__init__.py b/google/cloud/bigtable/admin/services/bigtable_table_admin/transports/__init__.py similarity index 100% rename from google/cloud/bigtable_admin_v2/services/bigtable_table_admin/transports/__init__.py rename to google/cloud/bigtable/admin/services/bigtable_table_admin/transports/__init__.py diff --git a/google/cloud/bigtable_admin_v2/services/bigtable_table_admin/transports/base.py b/google/cloud/bigtable/admin/services/bigtable_table_admin/transports/base.py similarity index 98% rename from google/cloud/bigtable_admin_v2/services/bigtable_table_admin/transports/base.py rename to google/cloud/bigtable/admin/services/bigtable_table_admin/transports/base.py index 9a549b7ca..41d84a27f 100644 --- a/google/cloud/bigtable_admin_v2/services/bigtable_table_admin/transports/base.py +++ b/google/cloud/bigtable/admin/services/bigtable_table_admin/transports/base.py @@ -16,7 +16,7 @@ import abc from typing import Awaitable, Callable, Dict, Optional, Sequence, Union -from google.cloud.bigtable_admin_v2 import gapic_version as package_version +from google.cloud.bigtable.admin import gapic_version as package_version import google.auth # type: ignore import google.api_core @@ -28,9 +28,9 @@ from google.oauth2 import service_account # type: ignore import google.protobuf -from google.cloud.bigtable_admin_v2.types import bigtable_table_admin -from google.cloud.bigtable_admin_v2.types import table -from google.cloud.bigtable_admin_v2.types import table as gba_table +from google.cloud.bigtable.admin.types import bigtable_table_admin +from google.cloud.bigtable.admin.types import table +from google.cloud.bigtable.admin.types import table as gba_table from google.iam.v1 import iam_policy_pb2 # type: ignore from google.iam.v1 import policy_pb2 # type: ignore from google.longrunning import operations_pb2 # type: ignore diff --git a/google/cloud/bigtable_admin_v2/services/bigtable_table_admin/transports/grpc.py b/google/cloud/bigtable/admin/services/bigtable_table_admin/transports/grpc.py similarity index 99% rename from google/cloud/bigtable_admin_v2/services/bigtable_table_admin/transports/grpc.py rename to google/cloud/bigtable/admin/services/bigtable_table_admin/transports/grpc.py index b18f13133..fcefab32e 100644 --- a/google/cloud/bigtable_admin_v2/services/bigtable_table_admin/transports/grpc.py +++ b/google/cloud/bigtable/admin/services/bigtable_table_admin/transports/grpc.py @@ -31,9 +31,9 @@ import grpc # type: ignore import proto # type: ignore -from google.cloud.bigtable_admin_v2.types import bigtable_table_admin -from google.cloud.bigtable_admin_v2.types import table -from google.cloud.bigtable_admin_v2.types import table as gba_table +from google.cloud.bigtable.admin.types import bigtable_table_admin +from google.cloud.bigtable.admin.types import table +from google.cloud.bigtable.admin.types import table as gba_table from google.iam.v1 import iam_policy_pb2 # type: ignore from google.iam.v1 import policy_pb2 # type: ignore from google.longrunning import operations_pb2 # type: ignore diff --git a/google/cloud/bigtable_admin_v2/services/bigtable_table_admin/transports/grpc_asyncio.py b/google/cloud/bigtable/admin/services/bigtable_table_admin/transports/grpc_asyncio.py similarity index 99% rename from google/cloud/bigtable_admin_v2/services/bigtable_table_admin/transports/grpc_asyncio.py rename to google/cloud/bigtable/admin/services/bigtable_table_admin/transports/grpc_asyncio.py index 8b08cbe8c..d55fbab2d 100644 --- a/google/cloud/bigtable_admin_v2/services/bigtable_table_admin/transports/grpc_asyncio.py +++ b/google/cloud/bigtable/admin/services/bigtable_table_admin/transports/grpc_asyncio.py @@ -34,9 +34,9 @@ import proto # type: ignore from grpc.experimental import aio # type: ignore -from google.cloud.bigtable_admin_v2.types import bigtable_table_admin -from google.cloud.bigtable_admin_v2.types import table -from google.cloud.bigtable_admin_v2.types import table as gba_table +from google.cloud.bigtable.admin.types import bigtable_table_admin +from google.cloud.bigtable.admin.types import table +from google.cloud.bigtable.admin.types import table as gba_table from google.iam.v1 import iam_policy_pb2 # type: ignore from google.iam.v1 import policy_pb2 # type: ignore from google.longrunning import operations_pb2 # type: ignore diff --git a/google/cloud/bigtable_admin_v2/services/bigtable_table_admin/transports/rest.py b/google/cloud/bigtable/admin/services/bigtable_table_admin/transports/rest.py similarity index 99% rename from google/cloud/bigtable_admin_v2/services/bigtable_table_admin/transports/rest.py rename to google/cloud/bigtable/admin/services/bigtable_table_admin/transports/rest.py index fd9445161..da15bac64 100644 --- a/google/cloud/bigtable_admin_v2/services/bigtable_table_admin/transports/rest.py +++ b/google/cloud/bigtable/admin/services/bigtable_table_admin/transports/rest.py @@ -34,9 +34,9 @@ import warnings -from google.cloud.bigtable_admin_v2.types import bigtable_table_admin -from google.cloud.bigtable_admin_v2.types import table -from google.cloud.bigtable_admin_v2.types import table as gba_table +from google.cloud.bigtable.admin.types import bigtable_table_admin +from google.cloud.bigtable.admin.types import table +from google.cloud.bigtable.admin.types import table as gba_table from google.iam.v1 import iam_policy_pb2 # type: ignore from google.iam.v1 import policy_pb2 # type: ignore from google.protobuf import empty_pb2 # type: ignore diff --git a/google/cloud/bigtable_admin_v2/services/bigtable_table_admin/transports/rest_base.py b/google/cloud/bigtable/admin/services/bigtable_table_admin/transports/rest_base.py similarity index 99% rename from google/cloud/bigtable_admin_v2/services/bigtable_table_admin/transports/rest_base.py rename to google/cloud/bigtable/admin/services/bigtable_table_admin/transports/rest_base.py index add95bcca..47cb1e59b 100644 --- a/google/cloud/bigtable_admin_v2/services/bigtable_table_admin/transports/rest_base.py +++ b/google/cloud/bigtable/admin/services/bigtable_table_admin/transports/rest_base.py @@ -24,9 +24,9 @@ from typing import Any, Callable, Dict, List, Optional, Sequence, Tuple, Union -from google.cloud.bigtable_admin_v2.types import bigtable_table_admin -from google.cloud.bigtable_admin_v2.types import table -from google.cloud.bigtable_admin_v2.types import table as gba_table +from google.cloud.bigtable.admin.types import bigtable_table_admin +from google.cloud.bigtable.admin.types import table +from google.cloud.bigtable.admin.types import table as gba_table from google.iam.v1 import iam_policy_pb2 # type: ignore from google.iam.v1 import policy_pb2 # type: ignore from google.protobuf import empty_pb2 # type: ignore diff --git a/google/cloud/bigtable_admin_v2/types/__init__.py b/google/cloud/bigtable/admin/types/__init__.py similarity index 100% rename from google/cloud/bigtable_admin_v2/types/__init__.py rename to google/cloud/bigtable/admin/types/__init__.py diff --git a/google/cloud/bigtable_admin_v2/types/bigtable_instance_admin.py b/google/cloud/bigtable/admin/types/bigtable_instance_admin.py similarity index 94% rename from google/cloud/bigtable_admin_v2/types/bigtable_instance_admin.py rename to google/cloud/bigtable/admin/types/bigtable_instance_admin.py index 4197ed0b7..d2a7f4ad9 100644 --- a/google/cloud/bigtable_admin_v2/types/bigtable_instance_admin.py +++ b/google/cloud/bigtable/admin/types/bigtable_instance_admin.py @@ -19,7 +19,7 @@ import proto # type: ignore -from google.cloud.bigtable_admin_v2.types import instance as gba_instance +from google.cloud.bigtable.admin.types import instance as gba_instance from google.protobuf import field_mask_pb2 # type: ignore from google.protobuf import timestamp_pb2 # type: ignore @@ -85,10 +85,10 @@ class CreateInstanceRequest(proto.Message): Required. The ID to be used when referring to the new instance within its project, e.g., just ``myinstance`` rather than ``projects/myproject/instances/myinstance``. - instance (google.cloud.bigtable_admin_v2.types.Instance): + instance (google.cloud.bigtable.admin.types.Instance): Required. The instance to create. Fields marked ``OutputOnly`` must be left blank. - clusters (MutableMapping[str, google.cloud.bigtable_admin_v2.types.Cluster]): + clusters (MutableMapping[str, google.cloud.bigtable.admin.types.Cluster]): Required. The clusters to be created within the instance, mapped by desired cluster ID, e.g., just ``mycluster`` rather than @@ -158,7 +158,7 @@ class ListInstancesResponse(proto.Message): r"""Response message for BigtableInstanceAdmin.ListInstances. Attributes: - instances (MutableSequence[google.cloud.bigtable_admin_v2.types.Instance]): + instances (MutableSequence[google.cloud.bigtable.admin.types.Instance]): The list of requested instances. failed_locations (MutableSequence[str]): Locations from which Instance information could not be @@ -196,7 +196,7 @@ class PartialUpdateInstanceRequest(proto.Message): BigtableInstanceAdmin.PartialUpdateInstance. Attributes: - instance (google.cloud.bigtable_admin_v2.types.Instance): + instance (google.cloud.bigtable.admin.types.Instance): Required. The Instance which will (partially) replace the current value. update_mask (google.protobuf.field_mask_pb2.FieldMask): @@ -245,7 +245,7 @@ class CreateClusterRequest(proto.Message): cluster within its instance, e.g., just ``mycluster`` rather than ``projects/myproject/instances/myinstance/clusters/mycluster``. - cluster (google.cloud.bigtable_admin_v2.types.Cluster): + cluster (google.cloud.bigtable.admin.types.Cluster): Required. The cluster to be created. Fields marked ``OutputOnly`` must be left blank. """ @@ -309,7 +309,7 @@ class ListClustersResponse(proto.Message): r"""Response message for BigtableInstanceAdmin.ListClusters. Attributes: - clusters (MutableSequence[google.cloud.bigtable_admin_v2.types.Cluster]): + clusters (MutableSequence[google.cloud.bigtable.admin.types.Cluster]): The list of requested clusters. failed_locations (MutableSequence[str]): Locations from which Cluster information could not be @@ -361,7 +361,7 @@ class CreateInstanceMetadata(proto.Message): r"""The metadata for the Operation returned by CreateInstance. Attributes: - original_request (google.cloud.bigtable_admin_v2.types.CreateInstanceRequest): + original_request (google.cloud.bigtable.admin.types.CreateInstanceRequest): The request that prompted the initiation of this CreateInstance operation. request_time (google.protobuf.timestamp_pb2.Timestamp): @@ -393,7 +393,7 @@ class UpdateInstanceMetadata(proto.Message): r"""The metadata for the Operation returned by UpdateInstance. Attributes: - original_request (google.cloud.bigtable_admin_v2.types.PartialUpdateInstanceRequest): + original_request (google.cloud.bigtable.admin.types.PartialUpdateInstanceRequest): The request that prompted the initiation of this UpdateInstance operation. request_time (google.protobuf.timestamp_pb2.Timestamp): @@ -425,7 +425,7 @@ class CreateClusterMetadata(proto.Message): r"""The metadata for the Operation returned by CreateCluster. Attributes: - original_request (google.cloud.bigtable_admin_v2.types.CreateClusterRequest): + original_request (google.cloud.bigtable.admin.types.CreateClusterRequest): The request that prompted the initiation of this CreateCluster operation. request_time (google.protobuf.timestamp_pb2.Timestamp): @@ -434,7 +434,7 @@ class CreateClusterMetadata(proto.Message): finish_time (google.protobuf.timestamp_pb2.Timestamp): The time at which the operation failed or was completed successfully. - tables (MutableMapping[str, google.cloud.bigtable_admin_v2.types.CreateClusterMetadata.TableProgress]): + tables (MutableMapping[str, google.cloud.bigtable.admin.types.CreateClusterMetadata.TableProgress]): Keys: the full ``name`` of each table that existed in the instance when CreateCluster was first called, i.e. ``projects//instances//tables/``. @@ -456,7 +456,7 @@ class TableProgress(proto.Message): Estimate of the number of bytes copied so far for this table. This will eventually reach 'estimated_size_bytes' unless the table copy is CANCELLED. - state (google.cloud.bigtable_admin_v2.types.CreateClusterMetadata.TableProgress.State): + state (google.cloud.bigtable.admin.types.CreateClusterMetadata.TableProgress.State): """ @@ -528,7 +528,7 @@ class UpdateClusterMetadata(proto.Message): r"""The metadata for the Operation returned by UpdateCluster. Attributes: - original_request (google.cloud.bigtable_admin_v2.types.Cluster): + original_request (google.cloud.bigtable.admin.types.Cluster): The request that prompted the initiation of this UpdateCluster operation. request_time (google.protobuf.timestamp_pb2.Timestamp): @@ -567,7 +567,7 @@ class PartialUpdateClusterMetadata(proto.Message): finish_time (google.protobuf.timestamp_pb2.Timestamp): The time at which the operation failed or was completed successfully. - original_request (google.cloud.bigtable_admin_v2.types.PartialUpdateClusterRequest): + original_request (google.cloud.bigtable.admin.types.PartialUpdateClusterRequest): The original request for PartialUpdateCluster. """ @@ -594,7 +594,7 @@ class PartialUpdateClusterRequest(proto.Message): BigtableInstanceAdmin.PartialUpdateCluster. Attributes: - cluster (google.cloud.bigtable_admin_v2.types.Cluster): + cluster (google.cloud.bigtable.admin.types.Cluster): Required. The Cluster which contains the partial updates to be applied, subject to the update_mask. update_mask (google.protobuf.field_mask_pb2.FieldMask): @@ -627,7 +627,7 @@ class CreateAppProfileRequest(proto.Message): profile within its instance, e.g., just ``myprofile`` rather than ``projects/myproject/instances/myinstance/appProfiles/myprofile``. - app_profile (google.cloud.bigtable_admin_v2.types.AppProfile): + app_profile (google.cloud.bigtable.admin.types.AppProfile): Required. The app profile to be created. Fields marked ``OutputOnly`` will be ignored. ignore_warnings (bool): @@ -715,7 +715,7 @@ class ListAppProfilesResponse(proto.Message): r"""Response message for BigtableInstanceAdmin.ListAppProfiles. Attributes: - app_profiles (MutableSequence[google.cloud.bigtable_admin_v2.types.AppProfile]): + app_profiles (MutableSequence[google.cloud.bigtable.admin.types.AppProfile]): The list of requested app profiles. next_page_token (str): Set if not all app profiles could be returned in a single @@ -752,7 +752,7 @@ class UpdateAppProfileRequest(proto.Message): r"""Request message for BigtableInstanceAdmin.UpdateAppProfile. Attributes: - app_profile (google.cloud.bigtable_admin_v2.types.AppProfile): + app_profile (google.cloud.bigtable.admin.types.AppProfile): Required. The app profile which will (partially) replace the current value. update_mask (google.protobuf.field_mask_pb2.FieldMask): @@ -873,7 +873,7 @@ class ListHotTabletsResponse(proto.Message): r"""Response message for BigtableInstanceAdmin.ListHotTablets. Attributes: - hot_tablets (MutableSequence[google.cloud.bigtable_admin_v2.types.HotTablet]): + hot_tablets (MutableSequence[google.cloud.bigtable.admin.types.HotTablet]): List of hot tablets in the tables of the requested cluster that fall within the requested time range. Hot tablets are ordered by node cpu @@ -915,7 +915,7 @@ class CreateLogicalViewRequest(proto.Message): Required. The ID to use for the logical view, which will become the final component of the logical view's resource name. - logical_view (google.cloud.bigtable_admin_v2.types.LogicalView): + logical_view (google.cloud.bigtable.admin.types.LogicalView): Required. The logical view to create. """ @@ -938,7 +938,7 @@ class CreateLogicalViewMetadata(proto.Message): r"""The metadata for the Operation returned by CreateLogicalView. Attributes: - original_request (google.cloud.bigtable_admin_v2.types.CreateLogicalViewRequest): + original_request (google.cloud.bigtable.admin.types.CreateLogicalViewRequest): The request that prompted the initiation of this CreateLogicalView operation. start_time (google.protobuf.timestamp_pb2.Timestamp): @@ -1021,7 +1021,7 @@ class ListLogicalViewsResponse(proto.Message): r"""Response message for BigtableInstanceAdmin.ListLogicalViews. Attributes: - logical_views (MutableSequence[google.cloud.bigtable_admin_v2.types.LogicalView]): + logical_views (MutableSequence[google.cloud.bigtable.admin.types.LogicalView]): The list of requested logical views. next_page_token (str): A token, which can be sent as ``page_token`` to retrieve the @@ -1048,7 +1048,7 @@ class UpdateLogicalViewRequest(proto.Message): r"""Request message for BigtableInstanceAdmin.UpdateLogicalView. Attributes: - logical_view (google.cloud.bigtable_admin_v2.types.LogicalView): + logical_view (google.cloud.bigtable.admin.types.LogicalView): Required. The logical view to update. The logical view's ``name`` field is used to identify the @@ -1074,7 +1074,7 @@ class UpdateLogicalViewMetadata(proto.Message): r"""The metadata for the Operation returned by UpdateLogicalView. Attributes: - original_request (google.cloud.bigtable_admin_v2.types.UpdateLogicalViewRequest): + original_request (google.cloud.bigtable.admin.types.UpdateLogicalViewRequest): The request that prompted the initiation of this UpdateLogicalView operation. start_time (google.protobuf.timestamp_pb2.Timestamp): @@ -1140,7 +1140,7 @@ class CreateMaterializedViewRequest(proto.Message): Required. The ID to use for the materialized view, which will become the final component of the materialized view's resource name. - materialized_view (google.cloud.bigtable_admin_v2.types.MaterializedView): + materialized_view (google.cloud.bigtable.admin.types.MaterializedView): Required. The materialized view to create. """ @@ -1164,7 +1164,7 @@ class CreateMaterializedViewMetadata(proto.Message): CreateMaterializedView. Attributes: - original_request (google.cloud.bigtable_admin_v2.types.CreateMaterializedViewRequest): + original_request (google.cloud.bigtable.admin.types.CreateMaterializedViewRequest): The request that prompted the initiation of this CreateMaterializedView operation. start_time (google.protobuf.timestamp_pb2.Timestamp): @@ -1250,7 +1250,7 @@ class ListMaterializedViewsResponse(proto.Message): BigtableInstanceAdmin.ListMaterializedViews. Attributes: - materialized_views (MutableSequence[google.cloud.bigtable_admin_v2.types.MaterializedView]): + materialized_views (MutableSequence[google.cloud.bigtable.admin.types.MaterializedView]): The list of requested materialized views. next_page_token (str): A token, which can be sent as ``page_token`` to retrieve the @@ -1280,7 +1280,7 @@ class UpdateMaterializedViewRequest(proto.Message): BigtableInstanceAdmin.UpdateMaterializedView. Attributes: - materialized_view (google.cloud.bigtable_admin_v2.types.MaterializedView): + materialized_view (google.cloud.bigtable.admin.types.MaterializedView): Required. The materialized view to update. The materialized view's ``name`` field is used to identify @@ -1307,7 +1307,7 @@ class UpdateMaterializedViewMetadata(proto.Message): UpdateMaterializedView. Attributes: - original_request (google.cloud.bigtable_admin_v2.types.UpdateMaterializedViewRequest): + original_request (google.cloud.bigtable.admin.types.UpdateMaterializedViewRequest): The request that prompted the initiation of this UpdateMaterializedView operation. start_time (google.protobuf.timestamp_pb2.Timestamp): diff --git a/google/cloud/bigtable_admin_v2/types/bigtable_table_admin.py b/google/cloud/bigtable/admin/types/bigtable_table_admin.py similarity index 95% rename from google/cloud/bigtable_admin_v2/types/bigtable_table_admin.py rename to google/cloud/bigtable/admin/types/bigtable_table_admin.py index 4cadfb1bf..78b024950 100644 --- a/google/cloud/bigtable_admin_v2/types/bigtable_table_admin.py +++ b/google/cloud/bigtable/admin/types/bigtable_table_admin.py @@ -19,8 +19,8 @@ import proto # type: ignore -from google.cloud.bigtable_admin_v2.types import common -from google.cloud.bigtable_admin_v2.types import table as gba_table +from google.cloud.bigtable.admin.types import common +from google.cloud.bigtable.admin.types import table as gba_table from google.protobuf import duration_pb2 # type: ignore from google.protobuf import field_mask_pb2 # type: ignore from google.protobuf import timestamp_pb2 # type: ignore @@ -129,9 +129,9 @@ class RestoreTableMetadata(proto.Message): name (str): Name of the table being created and restored to. - source_type (google.cloud.bigtable_admin_v2.types.RestoreSourceType): + source_type (google.cloud.bigtable.admin.types.RestoreSourceType): The type of the restore source. - backup_info (google.cloud.bigtable_admin_v2.types.BackupInfo): + backup_info (google.cloud.bigtable.admin.types.BackupInfo): This field is a member of `oneof`_ ``source_info``. optimize_table_operation_name (str): @@ -145,7 +145,7 @@ class RestoreTableMetadata(proto.Message): after the RestoreTable long-running operation completes successfully. This operation may not be created if the table is already optimized or the restore was not successful. - progress (google.cloud.bigtable_admin_v2.types.OperationProgress): + progress (google.cloud.bigtable.admin.types.OperationProgress): The progress of the [RestoreTable][google.bigtable.admin.v2.BigtableTableAdmin.RestoreTable] operation. @@ -187,7 +187,7 @@ class OptimizeRestoredTableMetadata(proto.Message): Attributes: name (str): Name of the restored table being optimized. - progress (google.cloud.bigtable_admin_v2.types.OperationProgress): + progress (google.cloud.bigtable.admin.types.OperationProgress): The progress of the post-restore optimizations. """ @@ -216,9 +216,9 @@ class CreateTableRequest(proto.Message): Required. The name by which the new table should be referred to within the parent instance, e.g., ``foobar`` rather than ``{parent}/tables/foobar``. Maximum 50 characters. - table (google.cloud.bigtable_admin_v2.types.Table): + table (google.cloud.bigtable.admin.types.Table): Required. The Table to create. - initial_splits (MutableSequence[google.cloud.bigtable_admin_v2.types.CreateTableRequest.Split]): + initial_splits (MutableSequence[google.cloud.bigtable.admin.types.CreateTableRequest.Split]): The optional list of row keys that will be used to initially split the table into several tablets (tablets are similar to HBase regions). Given two split keys, ``s1`` and ``s2``, @@ -369,7 +369,7 @@ class ListTablesRequest(proto.Message): Required. The unique name of the instance for which tables should be listed. Values are of the form ``projects/{project}/instances/{instance}``. - view (google.cloud.bigtable_admin_v2.types.Table.View): + view (google.cloud.bigtable.admin.types.Table.View): The view to be applied to the returned tables' fields. NAME_ONLY view (default) and REPLICATION_VIEW are supported. page_size (int): @@ -413,7 +413,7 @@ class ListTablesResponse(proto.Message): [google.bigtable.admin.v2.BigtableTableAdmin.ListTables][google.bigtable.admin.v2.BigtableTableAdmin.ListTables] Attributes: - tables (MutableSequence[google.cloud.bigtable_admin_v2.types.Table]): + tables (MutableSequence[google.cloud.bigtable.admin.types.Table]): The tables present in the requested instance. next_page_token (str): Set if not all tables could be returned in a single @@ -445,7 +445,7 @@ class GetTableRequest(proto.Message): Required. The unique name of the requested table. Values are of the form ``projects/{project}/instances/{instance}/tables/{table}``. - view (google.cloud.bigtable_admin_v2.types.Table.View): + view (google.cloud.bigtable.admin.types.Table.View): The view to be applied to the returned table's fields. Defaults to ``SCHEMA_VIEW`` if unspecified. """ @@ -466,7 +466,7 @@ class UpdateTableRequest(proto.Message): [UpdateTable][google.bigtable.admin.v2.BigtableTableAdmin.UpdateTable]. Attributes: - table (google.cloud.bigtable_admin_v2.types.Table): + table (google.cloud.bigtable.admin.types.Table): Required. The table to update. The table's ``name`` field is used to identify the table to update. update_mask (google.protobuf.field_mask_pb2.FieldMask): @@ -608,7 +608,7 @@ class ModifyColumnFamiliesRequest(proto.Message): Required. The unique name of the table whose families should be modified. Values are of the form ``projects/{project}/instances/{instance}/tables/{table}``. - modifications (MutableSequence[google.cloud.bigtable_admin_v2.types.ModifyColumnFamiliesRequest.Modification]): + modifications (MutableSequence[google.cloud.bigtable.admin.types.ModifyColumnFamiliesRequest.Modification]): Required. Modifications to be atomically applied to the specified table's families. Entries are applied in order, meaning that @@ -633,13 +633,13 @@ class Modification(proto.Message): Attributes: id (str): The ID of the column family to be modified. - create (google.cloud.bigtable_admin_v2.types.ColumnFamily): + create (google.cloud.bigtable.admin.types.ColumnFamily): Create a new column family with the specified schema, or fail if one already exists with the given ID. This field is a member of `oneof`_ ``mod``. - update (google.cloud.bigtable_admin_v2.types.ColumnFamily): + update (google.cloud.bigtable.admin.types.ColumnFamily): Update an existing column family to the specified schema, or fail if no column family exists with the given ID. @@ -750,14 +750,14 @@ class CheckConsistencyRequest(proto.Message): consistency_token (str): Required. The token created using GenerateConsistencyToken for the Table. - standard_read_remote_writes (google.cloud.bigtable_admin_v2.types.StandardReadRemoteWrites): + standard_read_remote_writes (google.cloud.bigtable.admin.types.StandardReadRemoteWrites): Checks that reads using an app profile with ``StandardIsolation`` can see all writes committed before the token was created, even if the read and write target different clusters. This field is a member of `oneof`_ ``mode``. - data_boost_read_local_writes (google.cloud.bigtable_admin_v2.types.DataBoostReadLocalWrites): + data_boost_read_local_writes (google.cloud.bigtable.admin.types.DataBoostReadLocalWrites): Checks that reads using an app profile with ``DataBoostIsolationReadOnly`` can see all writes committed before the token was created, but only if the read and write @@ -951,7 +951,7 @@ class ListSnapshotsResponse(proto.Message): any SLA or deprecation policy. Attributes: - snapshots (MutableSequence[google.cloud.bigtable_admin_v2.types.Snapshot]): + snapshots (MutableSequence[google.cloud.bigtable.admin.types.Snapshot]): The snapshots present in the requested cluster. next_page_token (str): @@ -1008,7 +1008,7 @@ class SnapshotTableMetadata(proto.Message): use. It is not subject to any SLA or deprecation policy. Attributes: - original_request (google.cloud.bigtable_admin_v2.types.SnapshotTableRequest): + original_request (google.cloud.bigtable.admin.types.SnapshotTableRequest): The request that prompted the initiation of this SnapshotTable operation. request_time (google.protobuf.timestamp_pb2.Timestamp): @@ -1046,7 +1046,7 @@ class CreateTableFromSnapshotMetadata(proto.Message): use. It is not subject to any SLA or deprecation policy. Attributes: - original_request (google.cloud.bigtable_admin_v2.types.CreateTableFromSnapshotRequest): + original_request (google.cloud.bigtable.admin.types.CreateTableFromSnapshotRequest): The request that prompted the initiation of this CreateTableFromSnapshot operation. request_time (google.protobuf.timestamp_pb2.Timestamp): @@ -1092,7 +1092,7 @@ class CreateBackupRequest(proto.Message): ``projects/{project}/instances/{instance}/clusters/{cluster}/backups/{backup_id}``. This string must be between 1 and 50 characters in length and match the regex [*a-zA-Z0-9][-*.a-zA-Z0-9]*. - backup (google.cloud.bigtable_admin_v2.types.Backup): + backup (google.cloud.bigtable.admin.types.Backup): Required. The backup to create. """ @@ -1153,7 +1153,7 @@ class UpdateBackupRequest(proto.Message): [UpdateBackup][google.bigtable.admin.v2.BigtableTableAdmin.UpdateBackup]. Attributes: - backup (google.cloud.bigtable_admin_v2.types.Backup): + backup (google.cloud.bigtable.admin.types.Backup): Required. The backup to update. ``backup.name``, and the fields to be updated as specified by ``update_mask`` are required. Other fields are ignored. Update is only supported @@ -1334,7 +1334,7 @@ class ListBackupsResponse(proto.Message): [ListBackups][google.bigtable.admin.v2.BigtableTableAdmin.ListBackups]. Attributes: - backups (MutableSequence[google.cloud.bigtable_admin_v2.types.Backup]): + backups (MutableSequence[google.cloud.bigtable.admin.types.Backup]): The list of matching backups. next_page_token (str): ``next_page_token`` can be sent in a subsequent @@ -1418,10 +1418,10 @@ class CopyBackupMetadata(proto.Message): The name of the backup being created through the copy operation. Values are of the form ``projects//instances//clusters//backups/``. - source_backup_info (google.cloud.bigtable_admin_v2.types.BackupInfo): + source_backup_info (google.cloud.bigtable.admin.types.BackupInfo): Information about the source backup that is being copied from. - progress (google.cloud.bigtable_admin_v2.types.OperationProgress): + progress (google.cloud.bigtable.admin.types.OperationProgress): The progress of the [CopyBackup][google.bigtable.admin.v2.BigtableTableAdmin.CopyBackup] operation. @@ -1458,7 +1458,7 @@ class CreateAuthorizedViewRequest(proto.Message): ``authorized_view_id`` appended to ``parent`` forms the full AuthorizedView name of the form ``projects/{project}/instances/{instance}/tables/{table}/authorizedView/{authorized_view}``. - authorized_view (google.cloud.bigtable_admin_v2.types.AuthorizedView): + authorized_view (google.cloud.bigtable.admin.types.AuthorizedView): Required. The AuthorizedView to create. """ @@ -1482,7 +1482,7 @@ class CreateAuthorizedViewMetadata(proto.Message): CreateAuthorizedView. Attributes: - original_request (google.cloud.bigtable_admin_v2.types.CreateAuthorizedViewRequest): + original_request (google.cloud.bigtable.admin.types.CreateAuthorizedViewRequest): The request that prompted the initiation of this CreateInstance operation. request_time (google.protobuf.timestamp_pb2.Timestamp): @@ -1534,7 +1534,7 @@ class ListAuthorizedViewsRequest(proto.Message): page_token (str): Optional. The value of ``next_page_token`` returned by a previous call. - view (google.cloud.bigtable_admin_v2.types.AuthorizedView.ResponseView): + view (google.cloud.bigtable.admin.types.AuthorizedView.ResponseView): Optional. The resource_view to be applied to the returned views' fields. Default to NAME_ONLY. """ @@ -1563,7 +1563,7 @@ class ListAuthorizedViewsResponse(proto.Message): [google.bigtable.admin.v2.BigtableTableAdmin.ListAuthorizedViews][google.bigtable.admin.v2.BigtableTableAdmin.ListAuthorizedViews] Attributes: - authorized_views (MutableSequence[google.cloud.bigtable_admin_v2.types.AuthorizedView]): + authorized_views (MutableSequence[google.cloud.bigtable.admin.types.AuthorizedView]): The AuthorizedViews present in the requested table. next_page_token (str): @@ -1596,7 +1596,7 @@ class GetAuthorizedViewRequest(proto.Message): Required. The unique name of the requested AuthorizedView. Values are of the form ``projects/{project}/instances/{instance}/tables/{table}/authorizedViews/{authorized_view}``. - view (google.cloud.bigtable_admin_v2.types.AuthorizedView.ResponseView): + view (google.cloud.bigtable.admin.types.AuthorizedView.ResponseView): Optional. The resource_view to be applied to the returned AuthorizedView's fields. Default to BASIC. """ @@ -1617,7 +1617,7 @@ class UpdateAuthorizedViewRequest(proto.Message): [UpdateAuthorizedView][google.bigtable.admin.v2.BigtableTableAdmin.UpdateAuthorizedView]. Attributes: - authorized_view (google.cloud.bigtable_admin_v2.types.AuthorizedView): + authorized_view (google.cloud.bigtable.admin.types.AuthorizedView): Required. The AuthorizedView to update. The ``name`` in ``authorized_view`` is used to identify the AuthorizedView. AuthorizedView name must in this format @@ -1657,7 +1657,7 @@ class UpdateAuthorizedViewMetadata(proto.Message): [UpdateAuthorizedView][google.bigtable.admin.v2.BigtableTableAdmin.UpdateAuthorizedView]. Attributes: - original_request (google.cloud.bigtable_admin_v2.types.UpdateAuthorizedViewRequest): + original_request (google.cloud.bigtable.admin.types.UpdateAuthorizedViewRequest): The request that prompted the initiation of this UpdateAuthorizedView operation. request_time (google.protobuf.timestamp_pb2.Timestamp): diff --git a/google/cloud/bigtable_admin_v2/types/common.py b/google/cloud/bigtable/admin/types/common.py similarity index 100% rename from google/cloud/bigtable_admin_v2/types/common.py rename to google/cloud/bigtable/admin/types/common.py diff --git a/google/cloud/bigtable_admin_v2/types/instance.py b/google/cloud/bigtable/admin/types/instance.py similarity index 94% rename from google/cloud/bigtable_admin_v2/types/instance.py rename to google/cloud/bigtable/admin/types/instance.py index 2623b770e..8f1169c11 100644 --- a/google/cloud/bigtable_admin_v2/types/instance.py +++ b/google/cloud/bigtable/admin/types/instance.py @@ -19,7 +19,7 @@ import proto # type: ignore -from google.cloud.bigtable_admin_v2.types import common +from google.cloud.bigtable.admin.types import common from google.protobuf import timestamp_pb2 # type: ignore @@ -56,10 +56,10 @@ class Instance(proto.Message): instance as it appears in UIs. Can be changed at any time, but should be kept globally unique to avoid confusion. - state (google.cloud.bigtable_admin_v2.types.Instance.State): + state (google.cloud.bigtable.admin.types.Instance.State): Output only. The current state of the instance. - type_ (google.cloud.bigtable_admin_v2.types.Instance.Type): + type_ (google.cloud.bigtable.admin.types.Instance.Type): The type of the instance. Defaults to ``PRODUCTION``. labels (MutableMapping[str, str]): Labels are a flexible and lightweight mechanism for @@ -242,7 +242,7 @@ class Cluster(proto.Message): located as close as possible to this cluster. Currently only zones are supported, so values should be of the form ``projects/{project}/locations/{zone}``. - state (google.cloud.bigtable_admin_v2.types.Cluster.State): + state (google.cloud.bigtable.admin.types.Cluster.State): Output only. The current state of the cluster. serve_nodes (int): @@ -250,18 +250,18 @@ class Cluster(proto.Message): value is set, Cloud Bigtable automatically allocates nodes based on your data footprint and optimized for 50% storage utilization. - node_scaling_factor (google.cloud.bigtable_admin_v2.types.Cluster.NodeScalingFactor): + node_scaling_factor (google.cloud.bigtable.admin.types.Cluster.NodeScalingFactor): Immutable. The node scaling factor of this cluster. - cluster_config (google.cloud.bigtable_admin_v2.types.Cluster.ClusterConfig): + cluster_config (google.cloud.bigtable.admin.types.Cluster.ClusterConfig): Configuration for this cluster. This field is a member of `oneof`_ ``config``. - default_storage_type (google.cloud.bigtable_admin_v2.types.StorageType): + default_storage_type (google.cloud.bigtable.admin.types.StorageType): Immutable. The type of storage used by this cluster to serve its parent instance's tables, unless explicitly overridden. - encryption_config (google.cloud.bigtable_admin_v2.types.Cluster.EncryptionConfig): + encryption_config (google.cloud.bigtable.admin.types.Cluster.EncryptionConfig): Immutable. The encryption configuration for CMEK-protected clusters. """ @@ -326,10 +326,10 @@ class ClusterAutoscalingConfig(proto.Message): r"""Autoscaling config for a cluster. Attributes: - autoscaling_limits (google.cloud.bigtable_admin_v2.types.AutoscalingLimits): + autoscaling_limits (google.cloud.bigtable.admin.types.AutoscalingLimits): Required. Autoscaling limits for this cluster. - autoscaling_targets (google.cloud.bigtable_admin_v2.types.AutoscalingTargets): + autoscaling_targets (google.cloud.bigtable.admin.types.AutoscalingTargets): Required. Autoscaling targets for this cluster. """ @@ -349,7 +349,7 @@ class ClusterConfig(proto.Message): r"""Configuration for a cluster. Attributes: - cluster_autoscaling_config (google.cloud.bigtable_admin_v2.types.Cluster.ClusterAutoscalingConfig): + cluster_autoscaling_config (google.cloud.bigtable.admin.types.Cluster.ClusterAutoscalingConfig): Autoscaling configuration for this cluster. """ @@ -453,15 +453,15 @@ class AppProfile(proto.Message): description (str): Long form description of the use case for this AppProfile. - multi_cluster_routing_use_any (google.cloud.bigtable_admin_v2.types.AppProfile.MultiClusterRoutingUseAny): + multi_cluster_routing_use_any (google.cloud.bigtable.admin.types.AppProfile.MultiClusterRoutingUseAny): Use a multi-cluster routing policy. This field is a member of `oneof`_ ``routing_policy``. - single_cluster_routing (google.cloud.bigtable_admin_v2.types.AppProfile.SingleClusterRouting): + single_cluster_routing (google.cloud.bigtable.admin.types.AppProfile.SingleClusterRouting): Use a single-cluster routing policy. This field is a member of `oneof`_ ``routing_policy``. - priority (google.cloud.bigtable_admin_v2.types.AppProfile.Priority): + priority (google.cloud.bigtable.admin.types.AppProfile.Priority): This field has been deprecated in favor of ``standard_isolation.priority``. If you set this field, ``standard_isolation.priority`` will be set instead. @@ -469,12 +469,12 @@ class AppProfile(proto.Message): The priority of requests sent using this app profile. This field is a member of `oneof`_ ``isolation``. - standard_isolation (google.cloud.bigtable_admin_v2.types.AppProfile.StandardIsolation): + standard_isolation (google.cloud.bigtable.admin.types.AppProfile.StandardIsolation): The standard options used for isolating this app profile's traffic from other use cases. This field is a member of `oneof`_ ``isolation``. - data_boost_isolation_read_only (google.cloud.bigtable_admin_v2.types.AppProfile.DataBoostIsolationReadOnly): + data_boost_isolation_read_only (google.cloud.bigtable.admin.types.AppProfile.DataBoostIsolationReadOnly): Specifies that this app profile is intended for read-only usage via the Data Boost feature. @@ -519,7 +519,7 @@ class MultiClusterRoutingUseAny(proto.Message): ignored; clusters will be tried in order of distance. If left empty, all clusters are eligible. - row_affinity (google.cloud.bigtable_admin_v2.types.AppProfile.MultiClusterRoutingUseAny.RowAffinity): + row_affinity (google.cloud.bigtable.admin.types.AppProfile.MultiClusterRoutingUseAny.RowAffinity): Row affinity sticky routing based on the row key of the request. Requests that span multiple rows are routed non-deterministically. @@ -582,7 +582,7 @@ class StandardIsolation(proto.Message): from other use cases. Attributes: - priority (google.cloud.bigtable_admin_v2.types.AppProfile.Priority): + priority (google.cloud.bigtable.admin.types.AppProfile.Priority): The priority of requests sent using this app profile. """ @@ -604,7 +604,7 @@ class DataBoostIsolationReadOnly(proto.Message): .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields Attributes: - compute_billing_owner (google.cloud.bigtable_admin_v2.types.AppProfile.DataBoostIsolationReadOnly.ComputeBillingOwner): + compute_billing_owner (google.cloud.bigtable.admin.types.AppProfile.DataBoostIsolationReadOnly.ComputeBillingOwner): The Compute Billing Owner for this Data Boost App Profile. diff --git a/google/cloud/bigtable_admin_v2/types/table.py b/google/cloud/bigtable/admin/types/table.py similarity index 95% rename from google/cloud/bigtable_admin_v2/types/table.py rename to google/cloud/bigtable/admin/types/table.py index 730b54ce3..a248f740f 100644 --- a/google/cloud/bigtable_admin_v2/types/table.py +++ b/google/cloud/bigtable/admin/types/table.py @@ -19,7 +19,7 @@ import proto # type: ignore -from google.cloud.bigtable_admin_v2.types import types +from google.cloud.bigtable.admin.types import types from google.protobuf import duration_pb2 # type: ignore from google.protobuf import timestamp_pb2 # type: ignore from google.rpc import status_pb2 # type: ignore @@ -63,9 +63,9 @@ class RestoreInfo(proto.Message): .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields Attributes: - source_type (google.cloud.bigtable_admin_v2.types.RestoreSourceType): + source_type (google.cloud.bigtable.admin.types.RestoreSourceType): The type of the restore source. - backup_info (google.cloud.bigtable_admin_v2.types.BackupInfo): + backup_info (google.cloud.bigtable.admin.types.BackupInfo): Information about the backup used to restore the table. The backup may no longer exist. @@ -120,29 +120,29 @@ class Table(proto.Message): ``projects/{project}/instances/{instance}/tables/[_a-zA-Z0-9][-_.a-zA-Z0-9]*``. Views: ``NAME_ONLY``, ``SCHEMA_VIEW``, ``REPLICATION_VIEW``, ``FULL`` - cluster_states (MutableMapping[str, google.cloud.bigtable_admin_v2.types.Table.ClusterState]): + cluster_states (MutableMapping[str, google.cloud.bigtable.admin.types.Table.ClusterState]): Output only. Map from cluster ID to per-cluster table state. If it could not be determined whether or not the table has data in a particular cluster (for example, if its zone is unavailable), then there will be an entry for the cluster with UNKNOWN ``replication_status``. Views: ``REPLICATION_VIEW``, ``ENCRYPTION_VIEW``, ``FULL`` - column_families (MutableMapping[str, google.cloud.bigtable_admin_v2.types.ColumnFamily]): + column_families (MutableMapping[str, google.cloud.bigtable.admin.types.ColumnFamily]): The column families configured for this table, mapped by column family ID. Views: ``SCHEMA_VIEW``, ``STATS_VIEW``, ``FULL`` - granularity (google.cloud.bigtable_admin_v2.types.Table.TimestampGranularity): + granularity (google.cloud.bigtable.admin.types.Table.TimestampGranularity): Immutable. The granularity (i.e. ``MILLIS``) at which timestamps are stored in this table. Timestamps not matching the granularity will be rejected. If unspecified at creation time, the value will be set to ``MILLIS``. Views: ``SCHEMA_VIEW``, ``FULL``. - restore_info (google.cloud.bigtable_admin_v2.types.RestoreInfo): + restore_info (google.cloud.bigtable.admin.types.RestoreInfo): Output only. If this table was restored from another data source (e.g. a backup), this field will be populated with information about the restore. - change_stream_config (google.cloud.bigtable_admin_v2.types.ChangeStreamConfig): + change_stream_config (google.cloud.bigtable.admin.types.ChangeStreamConfig): If specified, enable the change stream on this table. Otherwise, the change stream is disabled and the change stream is not retained. @@ -157,13 +157,13 @@ class Table(proto.Message): Note one can still delete the data stored in the table through Data APIs. - automated_backup_policy (google.cloud.bigtable_admin_v2.types.Table.AutomatedBackupPolicy): + automated_backup_policy (google.cloud.bigtable.admin.types.Table.AutomatedBackupPolicy): If specified, automated backups are enabled for this table. Otherwise, automated backups are disabled. This field is a member of `oneof`_ ``automated_backup_config``. - row_key_schema (google.cloud.bigtable_admin_v2.types.Type.Struct): + row_key_schema (google.cloud.bigtable.admin.types.Type.Struct): The row key schema for this table. The schema is used to decode the raw row key bytes into a structured format. The order of field declarations in this schema is important, as @@ -266,10 +266,10 @@ class ClusterState(proto.Message): r"""The state of a table's data in a particular cluster. Attributes: - replication_state (google.cloud.bigtable_admin_v2.types.Table.ClusterState.ReplicationState): + replication_state (google.cloud.bigtable.admin.types.Table.ClusterState.ReplicationState): Output only. The state of replication for the table in this cluster. - encryption_info (MutableSequence[google.cloud.bigtable_admin_v2.types.EncryptionInfo]): + encryption_info (MutableSequence[google.cloud.bigtable.admin.types.EncryptionInfo]): Output only. The encryption information for the table in this cluster. If the encryption key protecting this resource is customer managed, @@ -417,7 +417,7 @@ class AuthorizedView(proto.Message): Identifier. The name of this AuthorizedView. Values are of the form ``projects/{project}/instances/{instance}/tables/{table}/authorizedViews/{authorized_view}`` - subset_view (google.cloud.bigtable_admin_v2.types.AuthorizedView.SubsetView): + subset_view (google.cloud.bigtable.admin.types.AuthorizedView.SubsetView): An AuthorizedView permitting access to an explicit subset of a Table. @@ -489,7 +489,7 @@ class SubsetView(proto.Message): Row prefixes to be included in the AuthorizedView. To provide access to all rows, include the empty string as a prefix (""). - family_subsets (MutableMapping[str, google.cloud.bigtable_admin_v2.types.AuthorizedView.FamilySubsets]): + family_subsets (MutableMapping[str, google.cloud.bigtable.admin.types.AuthorizedView.FamilySubsets]): Map from column family name to the columns in this family to be included in the AuthorizedView. @@ -533,7 +533,7 @@ class ColumnFamily(proto.Message): configuration. Attributes: - gc_rule (google.cloud.bigtable_admin_v2.types.GcRule): + gc_rule (google.cloud.bigtable.admin.types.GcRule): Garbage collection rule specified as a protobuf. Must serialize to at most 500 bytes. @@ -541,7 +541,7 @@ class ColumnFamily(proto.Message): opportunistically in the background, and so it's possible for reads to return a cell even if it matches the active GC expression for its family. - value_type (google.cloud.bigtable_admin_v2.types.Type): + value_type (google.cloud.bigtable.admin.types.Type): The type of data stored in each of this family's cell values, including its full encoding. If omitted, the family only serves raw untyped bytes. @@ -593,12 +593,12 @@ class GcRule(proto.Message): granularity. This field is a member of `oneof`_ ``rule``. - intersection (google.cloud.bigtable_admin_v2.types.GcRule.Intersection): + intersection (google.cloud.bigtable.admin.types.GcRule.Intersection): Delete cells that would be deleted by every nested rule. This field is a member of `oneof`_ ``rule``. - union (google.cloud.bigtable_admin_v2.types.GcRule.Union): + union (google.cloud.bigtable.admin.types.GcRule.Union): Delete cells that would be deleted by any nested rule. @@ -609,7 +609,7 @@ class Intersection(proto.Message): r"""A GcRule which deletes cells matching all of the given rules. Attributes: - rules (MutableSequence[google.cloud.bigtable_admin_v2.types.GcRule]): + rules (MutableSequence[google.cloud.bigtable.admin.types.GcRule]): Only delete cells which would be deleted by every element of ``rules``. """ @@ -624,7 +624,7 @@ class Union(proto.Message): r"""A GcRule which deletes cells matching any of the given rules. Attributes: - rules (MutableSequence[google.cloud.bigtable_admin_v2.types.GcRule]): + rules (MutableSequence[google.cloud.bigtable.admin.types.GcRule]): Delete cells which would be deleted by any element of ``rules``. """ @@ -667,7 +667,7 @@ class EncryptionInfo(proto.Message): is specified along with its status. Attributes: - encryption_type (google.cloud.bigtable_admin_v2.types.EncryptionInfo.EncryptionType): + encryption_type (google.cloud.bigtable.admin.types.EncryptionInfo.EncryptionType): Output only. The type of encryption used to protect this resource. encryption_status (google.rpc.status_pb2.Status): @@ -737,7 +737,7 @@ class Snapshot(proto.Message): name (str): The unique name of the snapshot. Values are of the form ``projects/{project}/instances/{instance}/clusters/{cluster}/snapshots/{snapshot}``. - source_table (google.cloud.bigtable_admin_v2.types.Table): + source_table (google.cloud.bigtable.admin.types.Table): Output only. The source table at the time the snapshot was taken. data_size_bytes (int): @@ -754,7 +754,7 @@ class Snapshot(proto.Message): The maximum amount of time a snapshot can stay active is 365 days. If 'ttl' is not specified, the default maximum of 365 days will be used. - state (google.cloud.bigtable_admin_v2.types.Snapshot.State): + state (google.cloud.bigtable.admin.types.Snapshot.State): Output only. The current state of the snapshot. description (str): @@ -863,12 +863,12 @@ class Backup(proto.Message): this timestamp. size_bytes (int): Output only. Size of the backup in bytes. - state (google.cloud.bigtable_admin_v2.types.Backup.State): + state (google.cloud.bigtable.admin.types.Backup.State): Output only. The current state of the backup. - encryption_info (google.cloud.bigtable_admin_v2.types.EncryptionInfo): + encryption_info (google.cloud.bigtable.admin.types.EncryptionInfo): Output only. The encryption information for the backup. - backup_type (google.cloud.bigtable_admin_v2.types.Backup.BackupType): + backup_type (google.cloud.bigtable.admin.types.Backup.BackupType): Indicates the backup type of the backup. hot_to_standard_time (google.protobuf.timestamp_pb2.Timestamp): The time at which the hot backup will be converted to a diff --git a/google/cloud/bigtable_admin_v2/types/types.py b/google/cloud/bigtable/admin/types/types.py similarity index 88% rename from google/cloud/bigtable_admin_v2/types/types.py rename to google/cloud/bigtable/admin/types/types.py index 42935df3c..cd3a24b5e 100644 --- a/google/cloud/bigtable_admin_v2/types/types.py +++ b/google/cloud/bigtable/admin/types/types.py @@ -65,51 +65,51 @@ class Type(proto.Message): .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields Attributes: - bytes_type (google.cloud.bigtable_admin_v2.types.Type.Bytes): + bytes_type (google.cloud.bigtable.admin.types.Type.Bytes): Bytes This field is a member of `oneof`_ ``kind``. - string_type (google.cloud.bigtable_admin_v2.types.Type.String): + string_type (google.cloud.bigtable.admin.types.Type.String): String This field is a member of `oneof`_ ``kind``. - int64_type (google.cloud.bigtable_admin_v2.types.Type.Int64): + int64_type (google.cloud.bigtable.admin.types.Type.Int64): Int64 This field is a member of `oneof`_ ``kind``. - float32_type (google.cloud.bigtable_admin_v2.types.Type.Float32): + float32_type (google.cloud.bigtable.admin.types.Type.Float32): Float32 This field is a member of `oneof`_ ``kind``. - float64_type (google.cloud.bigtable_admin_v2.types.Type.Float64): + float64_type (google.cloud.bigtable.admin.types.Type.Float64): Float64 This field is a member of `oneof`_ ``kind``. - bool_type (google.cloud.bigtable_admin_v2.types.Type.Bool): + bool_type (google.cloud.bigtable.admin.types.Type.Bool): Bool This field is a member of `oneof`_ ``kind``. - timestamp_type (google.cloud.bigtable_admin_v2.types.Type.Timestamp): + timestamp_type (google.cloud.bigtable.admin.types.Type.Timestamp): Timestamp This field is a member of `oneof`_ ``kind``. - date_type (google.cloud.bigtable_admin_v2.types.Type.Date): + date_type (google.cloud.bigtable.admin.types.Type.Date): Date This field is a member of `oneof`_ ``kind``. - aggregate_type (google.cloud.bigtable_admin_v2.types.Type.Aggregate): + aggregate_type (google.cloud.bigtable.admin.types.Type.Aggregate): Aggregate This field is a member of `oneof`_ ``kind``. - struct_type (google.cloud.bigtable_admin_v2.types.Type.Struct): + struct_type (google.cloud.bigtable.admin.types.Type.Struct): Struct This field is a member of `oneof`_ ``kind``. - array_type (google.cloud.bigtable_admin_v2.types.Type.Array): + array_type (google.cloud.bigtable.admin.types.Type.Array): Array This field is a member of `oneof`_ ``kind``. - map_type (google.cloud.bigtable_admin_v2.types.Type.Map): + map_type (google.cloud.bigtable.admin.types.Type.Map): Map This field is a member of `oneof`_ ``kind``. @@ -119,7 +119,7 @@ class Bytes(proto.Message): r"""Bytes Values of type ``Bytes`` are stored in ``Value.bytes_value``. Attributes: - encoding (google.cloud.bigtable_admin_v2.types.Type.Bytes.Encoding): + encoding (google.cloud.bigtable.admin.types.Type.Bytes.Encoding): The encoding to use when converting to or from lower level types. """ @@ -130,7 +130,7 @@ class Encoding(proto.Message): .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields Attributes: - raw (google.cloud.bigtable_admin_v2.types.Type.Bytes.Encoding.Raw): + raw (google.cloud.bigtable.admin.types.Type.Bytes.Encoding.Raw): Use ``Raw`` encoding. This field is a member of `oneof`_ ``encoding``. @@ -163,7 +163,7 @@ class String(proto.Message): ``Value.string_value``. Attributes: - encoding (google.cloud.bigtable_admin_v2.types.Type.String.Encoding): + encoding (google.cloud.bigtable.admin.types.Type.String.Encoding): The encoding to use when converting to or from lower level types. """ @@ -179,11 +179,11 @@ class Encoding(proto.Message): .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields Attributes: - utf8_raw (google.cloud.bigtable_admin_v2.types.Type.String.Encoding.Utf8Raw): + utf8_raw (google.cloud.bigtable.admin.types.Type.String.Encoding.Utf8Raw): Deprecated: if set, converts to an empty ``utf8_bytes``. This field is a member of `oneof`_ ``encoding``. - utf8_bytes (google.cloud.bigtable_admin_v2.types.Type.String.Encoding.Utf8Bytes): + utf8_bytes (google.cloud.bigtable.admin.types.Type.String.Encoding.Utf8Bytes): Use ``Utf8Bytes`` encoding. This field is a member of `oneof`_ ``encoding``. @@ -233,7 +233,7 @@ class Int64(proto.Message): r"""Int64 Values of type ``Int64`` are stored in ``Value.int_value``. Attributes: - encoding (google.cloud.bigtable_admin_v2.types.Type.Int64.Encoding): + encoding (google.cloud.bigtable.admin.types.Type.Int64.Encoding): The encoding to use when converting to or from lower level types. """ @@ -249,11 +249,11 @@ class Encoding(proto.Message): .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields Attributes: - big_endian_bytes (google.cloud.bigtable_admin_v2.types.Type.Int64.Encoding.BigEndianBytes): + big_endian_bytes (google.cloud.bigtable.admin.types.Type.Int64.Encoding.BigEndianBytes): Use ``BigEndianBytes`` encoding. This field is a member of `oneof`_ ``encoding``. - ordered_code_bytes (google.cloud.bigtable_admin_v2.types.Type.Int64.Encoding.OrderedCodeBytes): + ordered_code_bytes (google.cloud.bigtable.admin.types.Type.Int64.Encoding.OrderedCodeBytes): Use ``OrderedCodeBytes`` encoding. This field is a member of `oneof`_ ``encoding``. @@ -273,7 +273,7 @@ class BigEndianBytes(proto.Message): - Java ``ByteBuffer.putLong()`` with ``ByteOrder.BIG_ENDIAN`` Attributes: - bytes_type (google.cloud.bigtable_admin_v2.types.Type.Bytes): + bytes_type (google.cloud.bigtable.admin.types.Type.Bytes): Deprecated: ignored if set. """ @@ -332,7 +332,7 @@ class Timestamp(proto.Message): ``Value.timestamp_value``. Attributes: - encoding (google.cloud.bigtable_admin_v2.types.Type.Timestamp.Encoding): + encoding (google.cloud.bigtable.admin.types.Type.Timestamp.Encoding): The encoding to use when converting to or from lower level types. """ @@ -343,7 +343,7 @@ class Encoding(proto.Message): .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields Attributes: - unix_micros_int64 (google.cloud.bigtable_admin_v2.types.Type.Int64.Encoding): + unix_micros_int64 (google.cloud.bigtable.admin.types.Type.Int64.Encoding): Encodes the number of microseconds since the Unix epoch using the given ``Int64`` encoding. Values must be microsecond-aligned. @@ -378,10 +378,10 @@ class Struct(proto.Message): as ``field_types``. Attributes: - fields (MutableSequence[google.cloud.bigtable_admin_v2.types.Type.Struct.Field]): + fields (MutableSequence[google.cloud.bigtable.admin.types.Type.Struct.Field]): The names and types of the fields in this struct. - encoding (google.cloud.bigtable_admin_v2.types.Type.Struct.Encoding): + encoding (google.cloud.bigtable.admin.types.Type.Struct.Encoding): The encoding to use when converting to or from lower level types. """ @@ -393,7 +393,7 @@ class Field(proto.Message): field_name (str): The field name (optional). Fields without a ``field_name`` are considered anonymous and cannot be referenced by name. - type_ (google.cloud.bigtable_admin_v2.types.Type): + type_ (google.cloud.bigtable.admin.types.Type): The type of values in this field. """ @@ -418,15 +418,15 @@ class Encoding(proto.Message): .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields Attributes: - singleton (google.cloud.bigtable_admin_v2.types.Type.Struct.Encoding.Singleton): + singleton (google.cloud.bigtable.admin.types.Type.Struct.Encoding.Singleton): Use ``Singleton`` encoding. This field is a member of `oneof`_ ``encoding``. - delimited_bytes (google.cloud.bigtable_admin_v2.types.Type.Struct.Encoding.DelimitedBytes): + delimited_bytes (google.cloud.bigtable.admin.types.Type.Struct.Encoding.DelimitedBytes): Use ``DelimitedBytes`` encoding. This field is a member of `oneof`_ ``encoding``. - ordered_code_bytes (google.cloud.bigtable_admin_v2.types.Type.Struct.Encoding.OrderedCodeBytes): + ordered_code_bytes (google.cloud.bigtable.admin.types.Type.Struct.Encoding.OrderedCodeBytes): User ``OrderedCodeBytes`` encoding. This field is a member of `oneof`_ ``encoding``. @@ -553,7 +553,7 @@ class Array(proto.Message): ``Array`` are stored in ``Value.array_value``. Attributes: - element_type (google.cloud.bigtable_admin_v2.types.Type): + element_type (google.cloud.bigtable.admin.types.Type): The type of the elements in the array. This must not be ``Array``. """ @@ -574,10 +574,10 @@ class Map(proto.Message): precedence. Attributes: - key_type (google.cloud.bigtable_admin_v2.types.Type): + key_type (google.cloud.bigtable.admin.types.Type): The type of a map key. Only ``Bytes``, ``String``, and ``Int64`` are allowed as key types. - value_type (google.cloud.bigtable_admin_v2.types.Type): + value_type (google.cloud.bigtable.admin.types.Type): The type of the values in a map. """ @@ -607,28 +607,28 @@ class Aggregate(proto.Message): .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields Attributes: - input_type (google.cloud.bigtable_admin_v2.types.Type): + input_type (google.cloud.bigtable.admin.types.Type): Type of the inputs that are accumulated by this ``Aggregate``, which must specify a full encoding. Use ``AddInput`` mutations to accumulate new inputs. - state_type (google.cloud.bigtable_admin_v2.types.Type): + state_type (google.cloud.bigtable.admin.types.Type): Output only. Type that holds the internal accumulator state for the ``Aggregate``. This is a function of the ``input_type`` and ``aggregator`` chosen, and will always specify a full encoding. - sum (google.cloud.bigtable_admin_v2.types.Type.Aggregate.Sum): + sum (google.cloud.bigtable.admin.types.Type.Aggregate.Sum): Sum aggregator. This field is a member of `oneof`_ ``aggregator``. - hllpp_unique_count (google.cloud.bigtable_admin_v2.types.Type.Aggregate.HyperLogLogPlusPlusUniqueCount): + hllpp_unique_count (google.cloud.bigtable.admin.types.Type.Aggregate.HyperLogLogPlusPlusUniqueCount): HyperLogLogPlusPlusUniqueCount aggregator. This field is a member of `oneof`_ ``aggregator``. - max_ (google.cloud.bigtable_admin_v2.types.Type.Aggregate.Max): + max_ (google.cloud.bigtable.admin.types.Type.Aggregate.Max): Max aggregator. This field is a member of `oneof`_ ``aggregator``. - min_ (google.cloud.bigtable_admin_v2.types.Type.Aggregate.Min): + min_ (google.cloud.bigtable.admin.types.Type.Aggregate.Min): Min aggregator. This field is a member of `oneof`_ ``aggregator``. diff --git a/google/cloud/bigtable_admin_v2/__init__.py b/google/cloud/bigtable_admin_v2/__init__.py index 4ee0cc6b1..b6275f098 100644 --- a/google/cloud/bigtable_admin_v2/__init__.py +++ b/google/cloud/bigtable_admin_v2/__init__.py @@ -13,238 +13,42 @@ # See the License for the specific language governing permissions and # limitations under the License. # -from google.cloud.bigtable_admin_v2 import gapic_version as package_version +import sys +import importlib +import pkgutil +import warnings -__version__ = package_version.__version__ +_new_path = "google.cloud.bigtable.admin" +_old_path = __name__ # This will be 'google.cloud.bigtable_admin_v2' +# Issue a warning to users that the old path is deprecated. +warnings.warn( + f"The '{_old_path}' package is deprecated and will be removed in a future " + f"version. Please use '{_new_path}' instead.", + DeprecationWarning, + stacklevel=2, +) -from .services.bigtable_instance_admin import BigtableInstanceAdminClient -from .services.bigtable_instance_admin import BigtableInstanceAdminAsyncClient -from .services.bigtable_table_admin import BigtableTableAdminClient -from .services.bigtable_table_admin import BigtableTableAdminAsyncClient +# 1. Import the real top-level package from its new location. +_real_package = importlib.import_module(_new_path) -from .types.bigtable_instance_admin import CreateAppProfileRequest -from .types.bigtable_instance_admin import CreateClusterMetadata -from .types.bigtable_instance_admin import CreateClusterRequest -from .types.bigtable_instance_admin import CreateInstanceMetadata -from .types.bigtable_instance_admin import CreateInstanceRequest -from .types.bigtable_instance_admin import CreateLogicalViewMetadata -from .types.bigtable_instance_admin import CreateLogicalViewRequest -from .types.bigtable_instance_admin import CreateMaterializedViewMetadata -from .types.bigtable_instance_admin import CreateMaterializedViewRequest -from .types.bigtable_instance_admin import DeleteAppProfileRequest -from .types.bigtable_instance_admin import DeleteClusterRequest -from .types.bigtable_instance_admin import DeleteInstanceRequest -from .types.bigtable_instance_admin import DeleteLogicalViewRequest -from .types.bigtable_instance_admin import DeleteMaterializedViewRequest -from .types.bigtable_instance_admin import GetAppProfileRequest -from .types.bigtable_instance_admin import GetClusterRequest -from .types.bigtable_instance_admin import GetInstanceRequest -from .types.bigtable_instance_admin import GetLogicalViewRequest -from .types.bigtable_instance_admin import GetMaterializedViewRequest -from .types.bigtable_instance_admin import ListAppProfilesRequest -from .types.bigtable_instance_admin import ListAppProfilesResponse -from .types.bigtable_instance_admin import ListClustersRequest -from .types.bigtable_instance_admin import ListClustersResponse -from .types.bigtable_instance_admin import ListHotTabletsRequest -from .types.bigtable_instance_admin import ListHotTabletsResponse -from .types.bigtable_instance_admin import ListInstancesRequest -from .types.bigtable_instance_admin import ListInstancesResponse -from .types.bigtable_instance_admin import ListLogicalViewsRequest -from .types.bigtable_instance_admin import ListLogicalViewsResponse -from .types.bigtable_instance_admin import ListMaterializedViewsRequest -from .types.bigtable_instance_admin import ListMaterializedViewsResponse -from .types.bigtable_instance_admin import PartialUpdateClusterMetadata -from .types.bigtable_instance_admin import PartialUpdateClusterRequest -from .types.bigtable_instance_admin import PartialUpdateInstanceRequest -from .types.bigtable_instance_admin import UpdateAppProfileMetadata -from .types.bigtable_instance_admin import UpdateAppProfileRequest -from .types.bigtable_instance_admin import UpdateClusterMetadata -from .types.bigtable_instance_admin import UpdateInstanceMetadata -from .types.bigtable_instance_admin import UpdateLogicalViewMetadata -from .types.bigtable_instance_admin import UpdateLogicalViewRequest -from .types.bigtable_instance_admin import UpdateMaterializedViewMetadata -from .types.bigtable_instance_admin import UpdateMaterializedViewRequest -from .types.bigtable_table_admin import CheckConsistencyRequest -from .types.bigtable_table_admin import CheckConsistencyResponse -from .types.bigtable_table_admin import CopyBackupMetadata -from .types.bigtable_table_admin import CopyBackupRequest -from .types.bigtable_table_admin import CreateAuthorizedViewMetadata -from .types.bigtable_table_admin import CreateAuthorizedViewRequest -from .types.bigtable_table_admin import CreateBackupMetadata -from .types.bigtable_table_admin import CreateBackupRequest -from .types.bigtable_table_admin import CreateTableFromSnapshotMetadata -from .types.bigtable_table_admin import CreateTableFromSnapshotRequest -from .types.bigtable_table_admin import CreateTableRequest -from .types.bigtable_table_admin import DataBoostReadLocalWrites -from .types.bigtable_table_admin import DeleteAuthorizedViewRequest -from .types.bigtable_table_admin import DeleteBackupRequest -from .types.bigtable_table_admin import DeleteSnapshotRequest -from .types.bigtable_table_admin import DeleteTableRequest -from .types.bigtable_table_admin import DropRowRangeRequest -from .types.bigtable_table_admin import GenerateConsistencyTokenRequest -from .types.bigtable_table_admin import GenerateConsistencyTokenResponse -from .types.bigtable_table_admin import GetAuthorizedViewRequest -from .types.bigtable_table_admin import GetBackupRequest -from .types.bigtable_table_admin import GetSnapshotRequest -from .types.bigtable_table_admin import GetTableRequest -from .types.bigtable_table_admin import ListAuthorizedViewsRequest -from .types.bigtable_table_admin import ListAuthorizedViewsResponse -from .types.bigtable_table_admin import ListBackupsRequest -from .types.bigtable_table_admin import ListBackupsResponse -from .types.bigtable_table_admin import ListSnapshotsRequest -from .types.bigtable_table_admin import ListSnapshotsResponse -from .types.bigtable_table_admin import ListTablesRequest -from .types.bigtable_table_admin import ListTablesResponse -from .types.bigtable_table_admin import ModifyColumnFamiliesRequest -from .types.bigtable_table_admin import OptimizeRestoredTableMetadata -from .types.bigtable_table_admin import RestoreTableMetadata -from .types.bigtable_table_admin import RestoreTableRequest -from .types.bigtable_table_admin import SnapshotTableMetadata -from .types.bigtable_table_admin import SnapshotTableRequest -from .types.bigtable_table_admin import StandardReadRemoteWrites -from .types.bigtable_table_admin import UndeleteTableMetadata -from .types.bigtable_table_admin import UndeleteTableRequest -from .types.bigtable_table_admin import UpdateAuthorizedViewMetadata -from .types.bigtable_table_admin import UpdateAuthorizedViewRequest -from .types.bigtable_table_admin import UpdateBackupRequest -from .types.bigtable_table_admin import UpdateTableMetadata -from .types.bigtable_table_admin import UpdateTableRequest -from .types.common import OperationProgress -from .types.common import StorageType -from .types.instance import AppProfile -from .types.instance import AutoscalingLimits -from .types.instance import AutoscalingTargets -from .types.instance import Cluster -from .types.instance import HotTablet -from .types.instance import Instance -from .types.instance import LogicalView -from .types.instance import MaterializedView -from .types.table import AuthorizedView -from .types.table import Backup -from .types.table import BackupInfo -from .types.table import ChangeStreamConfig -from .types.table import ColumnFamily -from .types.table import EncryptionInfo -from .types.table import GcRule -from .types.table import RestoreInfo -from .types.table import Snapshot -from .types.table import Table -from .types.table import RestoreSourceType -from .types.types import Type +# 2. Immediately replace this alias package in the module cache with the real one. +sys.modules[_old_path] = _real_package -__all__ = ( - "BigtableInstanceAdminAsyncClient", - "BigtableTableAdminAsyncClient", - "AppProfile", - "AuthorizedView", - "AutoscalingLimits", - "AutoscalingTargets", - "Backup", - "BackupInfo", - "BigtableInstanceAdminClient", - "BigtableTableAdminClient", - "ChangeStreamConfig", - "CheckConsistencyRequest", - "CheckConsistencyResponse", - "Cluster", - "ColumnFamily", - "CopyBackupMetadata", - "CopyBackupRequest", - "CreateAppProfileRequest", - "CreateAuthorizedViewMetadata", - "CreateAuthorizedViewRequest", - "CreateBackupMetadata", - "CreateBackupRequest", - "CreateClusterMetadata", - "CreateClusterRequest", - "CreateInstanceMetadata", - "CreateInstanceRequest", - "CreateLogicalViewMetadata", - "CreateLogicalViewRequest", - "CreateMaterializedViewMetadata", - "CreateMaterializedViewRequest", - "CreateTableFromSnapshotMetadata", - "CreateTableFromSnapshotRequest", - "CreateTableRequest", - "DataBoostReadLocalWrites", - "DeleteAppProfileRequest", - "DeleteAuthorizedViewRequest", - "DeleteBackupRequest", - "DeleteClusterRequest", - "DeleteInstanceRequest", - "DeleteLogicalViewRequest", - "DeleteMaterializedViewRequest", - "DeleteSnapshotRequest", - "DeleteTableRequest", - "DropRowRangeRequest", - "EncryptionInfo", - "GcRule", - "GenerateConsistencyTokenRequest", - "GenerateConsistencyTokenResponse", - "GetAppProfileRequest", - "GetAuthorizedViewRequest", - "GetBackupRequest", - "GetClusterRequest", - "GetInstanceRequest", - "GetLogicalViewRequest", - "GetMaterializedViewRequest", - "GetSnapshotRequest", - "GetTableRequest", - "HotTablet", - "Instance", - "ListAppProfilesRequest", - "ListAppProfilesResponse", - "ListAuthorizedViewsRequest", - "ListAuthorizedViewsResponse", - "ListBackupsRequest", - "ListBackupsResponse", - "ListClustersRequest", - "ListClustersResponse", - "ListHotTabletsRequest", - "ListHotTabletsResponse", - "ListInstancesRequest", - "ListInstancesResponse", - "ListLogicalViewsRequest", - "ListLogicalViewsResponse", - "ListMaterializedViewsRequest", - "ListMaterializedViewsResponse", - "ListSnapshotsRequest", - "ListSnapshotsResponse", - "ListTablesRequest", - "ListTablesResponse", - "LogicalView", - "MaterializedView", - "ModifyColumnFamiliesRequest", - "OperationProgress", - "OptimizeRestoredTableMetadata", - "PartialUpdateClusterMetadata", - "PartialUpdateClusterRequest", - "PartialUpdateInstanceRequest", - "RestoreInfo", - "RestoreSourceType", - "RestoreTableMetadata", - "RestoreTableRequest", - "Snapshot", - "SnapshotTableMetadata", - "SnapshotTableRequest", - "StandardReadRemoteWrites", - "StorageType", - "Table", - "Type", - "UndeleteTableMetadata", - "UndeleteTableRequest", - "UpdateAppProfileMetadata", - "UpdateAppProfileRequest", - "UpdateAuthorizedViewMetadata", - "UpdateAuthorizedViewRequest", - "UpdateBackupRequest", - "UpdateClusterMetadata", - "UpdateInstanceMetadata", - "UpdateLogicalViewMetadata", - "UpdateLogicalViewRequest", - "UpdateMaterializedViewMetadata", - "UpdateMaterializedViewRequest", - "UpdateTableMetadata", - "UpdateTableRequest", -) +# 3. Eagerly walk and import all submodules of the real package. +# This populates sys.modules with all the canonical submodule paths +# (e.g., 'google.cloud.bigtable.admin.types', etc.). +for _, name, _ in pkgutil.walk_packages( + path=_real_package.__path__, + prefix=_real_package.__name__ + ".", +): + importlib.import_module(name) + +# 4. Now that they're all loaded, create an alias for each submodule. +# We iterate over a copy of the keys, as the dictionary size will change. +for name in list(sys.modules.keys()): + # Check if a loaded module is a submodule of our new package... + if name.startswith(_new_path + "."): + # ...and create a corresponding alias using the old path prefix. + old_submodule_path = name.replace(_new_path, _old_path, 1) + sys.modules[old_submodule_path] = sys.modules[name] \ No newline at end of file From dc61aa9fe8067882699262889848f86b7ac17dcd Mon Sep 17 00:00:00 2001 From: Daniel Sanche Date: Fri, 15 Aug 2025 15:49:05 -0700 Subject: [PATCH 4/5] updated classic client references --- google/cloud/bigtable/classic/app_profile.py | 2 +- google/cloud/bigtable/classic/backup.py | 12 ++++++------ google/cloud/bigtable/classic/client.py | 16 ++++++++-------- google/cloud/bigtable/classic/cluster.py | 2 +- google/cloud/bigtable/classic/column_family.py | 4 ++-- google/cloud/bigtable/classic/enums.py | 6 +++--- google/cloud/bigtable/classic/instance.py | 2 +- google/cloud/bigtable/classic/table.py | 8 ++++---- 8 files changed, 26 insertions(+), 26 deletions(-) diff --git a/google/cloud/bigtable/classic/app_profile.py b/google/cloud/bigtable/classic/app_profile.py index 629abaff0..e9d68a330 100644 --- a/google/cloud/bigtable/classic/app_profile.py +++ b/google/cloud/bigtable/classic/app_profile.py @@ -18,7 +18,7 @@ import re from .enums import RoutingPolicyType -from google.cloud.bigtable_admin_v2.types import instance +from google.cloud.bigtable.admin.types import instance from google.protobuf import field_mask_pb2 from google.api_core.exceptions import NotFound diff --git a/google/cloud/bigtable/classic/backup.py b/google/cloud/bigtable/classic/backup.py index 3ddf34070..3af5c31a3 100644 --- a/google/cloud/bigtable/classic/backup.py +++ b/google/cloud/bigtable/classic/backup.py @@ -17,8 +17,8 @@ import re from google.cloud._helpers import _datetime_to_pb_timestamp # type: ignore -from google.cloud.bigtable_admin_v2 import BigtableTableAdminClient -from google.cloud.bigtable_admin_v2.types import table +from google.cloud.bigtable.admin import BigtableTableAdminClient +from google.cloud.bigtable.admin.types import table from .encryption_info import EncryptionInfo from .policy import Policy from google.cloud.exceptions import NotFound # type: ignore @@ -226,7 +226,7 @@ def size_bytes(self): def state(self): """The current state of this Backup. - :rtype: :class:`~google.cloud.bigtable_admin_v2.gapic.enums.Backup.State` + :rtype: :class:`~google.cloud.bigtable.admin.gapic.enums.Backup.State` :returns: The current state of this Backup. """ return self._state @@ -305,7 +305,7 @@ def create(self, cluster_id=None): created Backup. :rtype: :class:`~google.api_core.operation.Operation` - :returns: :class:`~google.cloud.bigtable_admin_v2.types._OperationFuture` + :returns: :class:`~google.cloud.bigtable.admin.types._OperationFuture` instance, to be used to poll the status of the 'create' request :raises Conflict: if the Backup already exists :raises NotFound: if the Instance owning the Backup does not exist @@ -343,7 +343,7 @@ def get(self): """Retrieves metadata of a pending or completed Backup. :returns: An instance of - :class:`~google.cloud.bigtable_admin_v2.types.Backup` + :class:`~google.cloud.bigtable.admin.types.Backup` :raises google.api_core.exceptions.GoogleAPICallError: If the request failed for any reason. @@ -412,7 +412,7 @@ def restore(self, table_id, instance_id=None): :param instance_id: (Optional) The ID of the Instance to restore the backup into, if different from the current one. - :rtype: :class:`~google.cloud.bigtable_admin_v2.types._OperationFuture` + :rtype: :class:`~google.cloud.bigtable.admin.types._OperationFuture` :returns: A future to be used to poll the status of the 'restore' request. diff --git a/google/cloud/bigtable/classic/client.py b/google/cloud/bigtable/classic/client.py index 9ce57c405..ec8159218 100644 --- a/google/cloud/bigtable/classic/client.py +++ b/google/cloud/bigtable/classic/client.py @@ -35,12 +35,12 @@ from google.auth.credentials import AnonymousCredentials # type: ignore from google.cloud import bigtable_v2 -from google.cloud import bigtable_admin_v2 +from google.cloud.bigtable import admin as bigtable_admin_v2 from google.cloud.bigtable_v2.services.bigtable.transports import BigtableGrpcTransport -from google.cloud.bigtable_admin_v2.services.bigtable_instance_admin.transports import ( +from google.cloud.bigtable.admin.services.bigtable_instance_admin.transports import ( BigtableInstanceAdminGrpcTransport, ) -from google.cloud.bigtable_admin_v2.services.bigtable_table_admin.transports import ( +from google.cloud.bigtable.admin.services.bigtable_table_admin.transports import ( BigtableTableAdminGrpcTransport, ) @@ -50,7 +50,7 @@ from google.cloud.client import ClientWithProject # type: ignore -from google.cloud.bigtable_admin_v2.types import instance +from google.cloud.bigtable.admin.types import instance from .cluster import _CLUSTER_NAME_RE from google.cloud.environment_vars import BIGTABLE_EMULATOR # type: ignore @@ -325,11 +325,11 @@ def table_admin_client(self): raise ValueError("Client is not an admin client.") transport = self._create_gapic_client_channel( - bigtable_admin_v2.BigtableTableAdminClient, + bigtable.admin.BigtableTableAdminClient, BigtableTableAdminGrpcTransport, ) klass = _create_gapic_client( - bigtable_admin_v2.BigtableTableAdminClient, + bigtable.admin.BigtableTableAdminClient, client_options=self._admin_client_options, transport=transport, ) @@ -358,11 +358,11 @@ def instance_admin_client(self): raise ValueError("Client is not an admin client.") transport = self._create_gapic_client_channel( - bigtable_admin_v2.BigtableInstanceAdminClient, + bigtable.admin.BigtableInstanceAdminClient, BigtableInstanceAdminGrpcTransport, ) klass = _create_gapic_client( - bigtable_admin_v2.BigtableInstanceAdminClient, + bigtable.admin.BigtableInstanceAdminClient, client_options=self._admin_client_options, transport=transport, ) diff --git a/google/cloud/bigtable/classic/cluster.py b/google/cloud/bigtable/classic/cluster.py index 11fb5492d..65a62cffa 100644 --- a/google/cloud/bigtable/classic/cluster.py +++ b/google/cloud/bigtable/classic/cluster.py @@ -16,7 +16,7 @@ import re -from google.cloud.bigtable_admin_v2.types import instance +from google.cloud.bigtable.admin.types import instance from google.api_core.exceptions import NotFound from google.protobuf import field_mask_pb2 diff --git a/google/cloud/bigtable/classic/column_family.py b/google/cloud/bigtable/classic/column_family.py index 80232958d..93112abd8 100644 --- a/google/cloud/bigtable/classic/column_family.py +++ b/google/cloud/bigtable/classic/column_family.py @@ -16,8 +16,8 @@ from google.cloud import _helpers -from google.cloud.bigtable_admin_v2.types import table as table_v2_pb2 -from google.cloud.bigtable_admin_v2.types import ( +from google.cloud.bigtable.admin.types import table as table_v2_pb2 +from google.cloud.bigtable.admin.types import ( bigtable_table_admin as table_admin_v2_pb2, ) from google.api_core.gapic_v1.method import DEFAULT diff --git a/google/cloud/bigtable/classic/enums.py b/google/cloud/bigtable/classic/enums.py index 327b2f828..4df3569b4 100644 --- a/google/cloud/bigtable/classic/enums.py +++ b/google/cloud/bigtable/classic/enums.py @@ -13,9 +13,9 @@ # limitations under the License. """Wrappers for gapic enum types.""" -from google.cloud.bigtable_admin_v2.types import common -from google.cloud.bigtable_admin_v2.types import instance -from google.cloud.bigtable_admin_v2.types import table +from google.cloud.bigtable.admin.types import common +from google.cloud.bigtable.admin.types import instance +from google.cloud.bigtable.admin.types import table class StorageType(object): diff --git a/google/cloud/bigtable/classic/instance.py b/google/cloud/bigtable/classic/instance.py index bbba39f6a..03b6629f2 100644 --- a/google/cloud/bigtable/classic/instance.py +++ b/google/cloud/bigtable/classic/instance.py @@ -22,7 +22,7 @@ from google.protobuf import field_mask_pb2 -from google.cloud.bigtable_admin_v2.types import instance +from google.cloud.bigtable.admin.types import instance from google.iam.v1 import options_pb2 # type: ignore diff --git a/google/cloud/bigtable/classic/table.py b/google/cloud/bigtable/classic/table.py index 5cea14e1b..6271645eb 100644 --- a/google/cloud/bigtable/classic/table.py +++ b/google/cloud/bigtable/classic/table.py @@ -47,9 +47,9 @@ from .row_set import RowRange from . import enums from google.cloud.bigtable_v2.types import bigtable as data_messages_v2_pb2 -from google.cloud.bigtable_admin_v2 import BigtableTableAdminClient -from google.cloud.bigtable_admin_v2.types import table as admin_messages_v2_pb2 -from google.cloud.bigtable_admin_v2.types import ( +from google.cloud.bigtable.admin import BigtableTableAdminClient +from google.cloud.bigtable.admin.types import table as admin_messages_v2_pb2 +from google.cloud.bigtable.admin.types import ( bigtable_table_admin as table_admin_messages_v2_pb2, ) @@ -1037,7 +1037,7 @@ def restore(self, new_table_id, cluster_id=None, backup_id=None, backup_name=Non and `backup_id` parameters even of such specified. :return: An instance of - :class:`~google.cloud.bigtable_admin_v2.types._OperationFuture`. + :class:`~google.cloud.bigtable.admin.types._OperationFuture`. :raises: google.api_core.exceptions.AlreadyExists: If the table already exists. From fbb1c1c8b4b33218754272b9f785a909af67efed Mon Sep 17 00:00:00 2001 From: Daniel Sanche Date: Fri, 15 Aug 2025 16:20:29 -0700 Subject: [PATCH 5/5] simplified __init__.py files --- google/cloud/bigtable/__init__.py | 40 +++++++++------------- google/cloud/bigtable_admin_v2/__init__.py | 28 +++------------ 2 files changed, 22 insertions(+), 46 deletions(-) diff --git a/google/cloud/bigtable/__init__.py b/google/cloud/bigtable/__init__.py index 211a19767..4f608815c 100644 --- a/google/cloud/bigtable/__init__.py +++ b/google/cloud/bigtable/__init__.py @@ -1,9 +1,21 @@ +# 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 + import importlib import sys -import warnings - -_LEGACY_MODULE_NAMES = { +_CLASSIC_CLIENT_MODULE_NAMES = { "app_profile", "backup", "batcher", @@ -24,34 +36,16 @@ "table", } -# Eagerly create aliases in sys.modules for full backward compatibility. -# This is more robust than the lazy __getattr__ approach because it handles -# direct submodule imports (e.g., `import google.cloud.bigtable.row_data`). -for module_name in _LEGACY_MODULE_NAMES: - # Define the old and new module paths +# update sys.modules to add an alias from old path to new +for module_name in _CLASSIC_CLIENT_MODULE_NAMES: old_path = f"google.cloud.bigtable.{module_name}" new_path = f".classic.{module_name}" - # Import the module from its new location module = importlib.import_module(new_path, __name__) - - # Inject the loaded module into sys.modules under its old path. - # This makes Python's import machinery find it automatically. sys.modules[old_path] = module - # Attach the module as an attribute to the current package setattr(sys.modules[__name__], module_name, module) -# You can also issue a single, general warning that some modules were moved. -warnings.warn( - ( - "Several modules have been moved to the `google.cloud.bigtable.classic` " - "subpackage. The top-level aliases will be removed in a future version." - ), - DeprecationWarning, - stacklevel=2, -) - # previously exported classes from google.cloud.bigtable.classic.client import Client from . import gapic_version diff --git a/google/cloud/bigtable_admin_v2/__init__.py b/google/cloud/bigtable_admin_v2/__init__.py index b6275f098..e318c77bd 100644 --- a/google/cloud/bigtable_admin_v2/__init__.py +++ b/google/cloud/bigtable_admin_v2/__init__.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- # Copyright 2025 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); @@ -16,39 +15,22 @@ import sys import importlib import pkgutil -import warnings _new_path = "google.cloud.bigtable.admin" -_old_path = __name__ # This will be 'google.cloud.bigtable_admin_v2' -# Issue a warning to users that the old path is deprecated. -warnings.warn( - f"The '{_old_path}' package is deprecated and will be removed in a future " - f"version. Please use '{_new_path}' instead.", - DeprecationWarning, - stacklevel=2, -) - -# 1. Import the real top-level package from its new location. +# update sys.modules to add an alias from this path to new _real_package = importlib.import_module(_new_path) +sys.modules[__name__] = _real_package -# 2. Immediately replace this alias package in the module cache with the real one. -sys.modules[_old_path] = _real_package - -# 3. Eagerly walk and import all submodules of the real package. -# This populates sys.modules with all the canonical submodule paths -# (e.g., 'google.cloud.bigtable.admin.types', etc.). +# iterate and import all submodules to populate sys.modules for _, name, _ in pkgutil.walk_packages( path=_real_package.__path__, prefix=_real_package.__name__ + ".", ): importlib.import_module(name) -# 4. Now that they're all loaded, create an alias for each submodule. -# We iterate over a copy of the keys, as the dictionary size will change. +# create an alias for each submodule for name in list(sys.modules.keys()): - # Check if a loaded module is a submodule of our new package... if name.startswith(_new_path + "."): - # ...and create a corresponding alias using the old path prefix. - old_submodule_path = name.replace(_new_path, _old_path, 1) + old_submodule_path = name.replace(_new_path, __name__, 1) sys.modules[old_submodule_path] = sys.modules[name] \ No newline at end of file