diff --git a/docs/connection_v1/services.rst b/docs/bigquery_connection_v1/services.rst similarity index 71% rename from docs/connection_v1/services.rst rename to docs/bigquery_connection_v1/services.rst index 4891cc8..8ae7bc5 100644 --- a/docs/connection_v1/services.rst +++ b/docs/bigquery_connection_v1/services.rst @@ -1,6 +1,6 @@ Services for Google Cloud Bigquery Connection v1 API ==================================================== -.. automodule:: google.cloud.bigquery.connection_v1.services.connection_service +.. automodule:: google.cloud.bigquery_connection_v1.services.connection_service :members: :inherited-members: diff --git a/docs/connection_v1/types.rst b/docs/bigquery_connection_v1/types.rst similarity index 70% rename from docs/connection_v1/types.rst rename to docs/bigquery_connection_v1/types.rst index 85d883a..9c90aa6 100644 --- a/docs/connection_v1/types.rst +++ b/docs/bigquery_connection_v1/types.rst @@ -1,6 +1,6 @@ Types for Google Cloud Bigquery Connection v1 API ================================================= -.. automodule:: google.cloud.bigquery.connection_v1.types +.. automodule:: google.cloud.bigquery_connection_v1.types :members: :show-inheritance: diff --git a/docs/index.rst b/docs/index.rst index d740517..944bf8d 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -6,8 +6,8 @@ API Reference .. toctree:: :maxdepth: 2 - connection_v1/services - connection_v1/types + bigquery_connection_v1/services + bigquery_connection_v1/types Changelog --------- diff --git a/google/cloud/bigquery/connection/__init__.py b/google/cloud/bigquery_connection/__init__.py similarity index 61% rename from google/cloud/bigquery/connection/__init__.py rename to google/cloud/bigquery_connection/__init__.py index c46bd3f..591eaac 100644 --- a/google/cloud/bigquery/connection/__init__.py +++ b/google/cloud/bigquery_connection/__init__.py @@ -15,23 +15,23 @@ # limitations under the License. # -from google.cloud.bigquery.connection_v1.services.connection_service.async_client import ( +from google.cloud.bigquery_connection_v1.services.connection_service.async_client import ( ConnectionServiceAsyncClient, ) -from google.cloud.bigquery.connection_v1.services.connection_service.client import ( +from google.cloud.bigquery_connection_v1.services.connection_service.client import ( ConnectionServiceClient, ) -from google.cloud.bigquery.connection_v1.types.connection import AwsCrossAccountRole -from google.cloud.bigquery.connection_v1.types.connection import AwsProperties -from google.cloud.bigquery.connection_v1.types.connection import CloudSqlCredential -from google.cloud.bigquery.connection_v1.types.connection import CloudSqlProperties -from google.cloud.bigquery.connection_v1.types.connection import Connection -from google.cloud.bigquery.connection_v1.types.connection import CreateConnectionRequest -from google.cloud.bigquery.connection_v1.types.connection import DeleteConnectionRequest -from google.cloud.bigquery.connection_v1.types.connection import GetConnectionRequest -from google.cloud.bigquery.connection_v1.types.connection import ListConnectionsRequest -from google.cloud.bigquery.connection_v1.types.connection import ListConnectionsResponse -from google.cloud.bigquery.connection_v1.types.connection import UpdateConnectionRequest +from google.cloud.bigquery_connection_v1.types.connection import AwsCrossAccountRole +from google.cloud.bigquery_connection_v1.types.connection import AwsProperties +from google.cloud.bigquery_connection_v1.types.connection import CloudSqlCredential +from google.cloud.bigquery_connection_v1.types.connection import CloudSqlProperties +from google.cloud.bigquery_connection_v1.types.connection import Connection +from google.cloud.bigquery_connection_v1.types.connection import CreateConnectionRequest +from google.cloud.bigquery_connection_v1.types.connection import DeleteConnectionRequest +from google.cloud.bigquery_connection_v1.types.connection import GetConnectionRequest +from google.cloud.bigquery_connection_v1.types.connection import ListConnectionsRequest +from google.cloud.bigquery_connection_v1.types.connection import ListConnectionsResponse +from google.cloud.bigquery_connection_v1.types.connection import UpdateConnectionRequest __all__ = ( "AwsCrossAccountRole", diff --git a/google/cloud/bigquery/connection/py.typed b/google/cloud/bigquery_connection/py.typed similarity index 100% rename from google/cloud/bigquery/connection/py.typed rename to google/cloud/bigquery_connection/py.typed diff --git a/google/cloud/bigquery/connection_v1/__init__.py b/google/cloud/bigquery_connection_v1/__init__.py similarity index 100% rename from google/cloud/bigquery/connection_v1/__init__.py rename to google/cloud/bigquery_connection_v1/__init__.py diff --git a/google/cloud/bigquery/connection_v1/py.typed b/google/cloud/bigquery_connection_v1/py.typed similarity index 100% rename from google/cloud/bigquery/connection_v1/py.typed rename to google/cloud/bigquery_connection_v1/py.typed diff --git a/google/cloud/bigquery/connection_v1/services/__init__.py b/google/cloud/bigquery_connection_v1/services/__init__.py similarity index 100% rename from google/cloud/bigquery/connection_v1/services/__init__.py rename to google/cloud/bigquery_connection_v1/services/__init__.py diff --git a/google/cloud/bigquery/connection_v1/services/connection_service/__init__.py b/google/cloud/bigquery_connection_v1/services/connection_service/__init__.py similarity index 100% rename from google/cloud/bigquery/connection_v1/services/connection_service/__init__.py rename to google/cloud/bigquery_connection_v1/services/connection_service/__init__.py diff --git a/google/cloud/bigquery/connection_v1/services/connection_service/async_client.py b/google/cloud/bigquery_connection_v1/services/connection_service/async_client.py similarity index 99% rename from google/cloud/bigquery/connection_v1/services/connection_service/async_client.py rename to google/cloud/bigquery_connection_v1/services/connection_service/async_client.py index 5035b81..933c759 100644 --- a/google/cloud/bigquery/connection_v1/services/connection_service/async_client.py +++ b/google/cloud/bigquery_connection_v1/services/connection_service/async_client.py @@ -28,9 +28,9 @@ from google.auth import credentials # type: ignore from google.oauth2 import service_account # type: ignore -from google.cloud.bigquery.connection_v1.services.connection_service import pagers -from google.cloud.bigquery.connection_v1.types import connection -from google.cloud.bigquery.connection_v1.types import connection as gcbc_connection +from google.cloud.bigquery_connection_v1.services.connection_service import pagers +from google.cloud.bigquery_connection_v1.types import connection +from google.cloud.bigquery_connection_v1.types import connection as gcbc_connection from google.iam.v1 import iam_policy_pb2 as iam_policy # type: ignore from google.iam.v1 import policy_pb2 as policy # type: ignore from google.protobuf import field_mask_pb2 as field_mask # type: ignore diff --git a/google/cloud/bigquery/connection_v1/services/connection_service/client.py b/google/cloud/bigquery_connection_v1/services/connection_service/client.py similarity index 99% rename from google/cloud/bigquery/connection_v1/services/connection_service/client.py rename to google/cloud/bigquery_connection_v1/services/connection_service/client.py index 4844ccc..c25aef2 100644 --- a/google/cloud/bigquery/connection_v1/services/connection_service/client.py +++ b/google/cloud/bigquery_connection_v1/services/connection_service/client.py @@ -32,9 +32,9 @@ from google.auth.exceptions import MutualTLSChannelError # type: ignore from google.oauth2 import service_account # type: ignore -from google.cloud.bigquery.connection_v1.services.connection_service import pagers -from google.cloud.bigquery.connection_v1.types import connection -from google.cloud.bigquery.connection_v1.types import connection as gcbc_connection +from google.cloud.bigquery_connection_v1.services.connection_service import pagers +from google.cloud.bigquery_connection_v1.types import connection +from google.cloud.bigquery_connection_v1.types import connection as gcbc_connection from google.iam.v1 import iam_policy_pb2 as iam_policy # type: ignore from google.iam.v1 import policy_pb2 as policy # type: ignore from google.protobuf import field_mask_pb2 as field_mask # type: ignore diff --git a/google/cloud/bigquery/connection_v1/services/connection_service/pagers.py b/google/cloud/bigquery_connection_v1/services/connection_service/pagers.py similarity index 98% rename from google/cloud/bigquery/connection_v1/services/connection_service/pagers.py rename to google/cloud/bigquery_connection_v1/services/connection_service/pagers.py index e6a2948..b9537fc 100644 --- a/google/cloud/bigquery/connection_v1/services/connection_service/pagers.py +++ b/google/cloud/bigquery_connection_v1/services/connection_service/pagers.py @@ -17,7 +17,7 @@ from typing import Any, AsyncIterable, Awaitable, Callable, Iterable, Sequence, Tuple -from google.cloud.bigquery.connection_v1.types import connection +from google.cloud.bigquery_connection_v1.types import connection class ListConnectionsPager: diff --git a/google/cloud/bigquery/connection_v1/services/connection_service/transports/__init__.py b/google/cloud/bigquery_connection_v1/services/connection_service/transports/__init__.py similarity index 100% rename from google/cloud/bigquery/connection_v1/services/connection_service/transports/__init__.py rename to google/cloud/bigquery_connection_v1/services/connection_service/transports/__init__.py diff --git a/google/cloud/bigquery/connection_v1/services/connection_service/transports/base.py b/google/cloud/bigquery_connection_v1/services/connection_service/transports/base.py similarity index 98% rename from google/cloud/bigquery/connection_v1/services/connection_service/transports/base.py rename to google/cloud/bigquery_connection_v1/services/connection_service/transports/base.py index a1cf970..58b35b9 100644 --- a/google/cloud/bigquery/connection_v1/services/connection_service/transports/base.py +++ b/google/cloud/bigquery_connection_v1/services/connection_service/transports/base.py @@ -25,8 +25,8 @@ from google.api_core import retry as retries # type: ignore from google.auth import credentials # type: ignore -from google.cloud.bigquery.connection_v1.types import connection -from google.cloud.bigquery.connection_v1.types import connection as gcbc_connection +from google.cloud.bigquery_connection_v1.types import connection +from google.cloud.bigquery_connection_v1.types import connection as gcbc_connection from google.iam.v1 import iam_policy_pb2 as iam_policy # type: ignore from google.iam.v1 import policy_pb2 as policy # type: ignore from google.protobuf import empty_pb2 as empty # type: ignore diff --git a/google/cloud/bigquery/connection_v1/services/connection_service/transports/grpc.py b/google/cloud/bigquery_connection_v1/services/connection_service/transports/grpc.py similarity index 99% rename from google/cloud/bigquery/connection_v1/services/connection_service/transports/grpc.py rename to google/cloud/bigquery_connection_v1/services/connection_service/transports/grpc.py index aedcbdb..d39c4d1 100644 --- a/google/cloud/bigquery/connection_v1/services/connection_service/transports/grpc.py +++ b/google/cloud/bigquery_connection_v1/services/connection_service/transports/grpc.py @@ -26,8 +26,8 @@ import grpc # type: ignore -from google.cloud.bigquery.connection_v1.types import connection -from google.cloud.bigquery.connection_v1.types import connection as gcbc_connection +from google.cloud.bigquery_connection_v1.types import connection +from google.cloud.bigquery_connection_v1.types import connection as gcbc_connection from google.iam.v1 import iam_policy_pb2 as iam_policy # type: ignore from google.iam.v1 import policy_pb2 as policy # type: ignore from google.protobuf import empty_pb2 as empty # type: ignore diff --git a/google/cloud/bigquery/connection_v1/services/connection_service/transports/grpc_asyncio.py b/google/cloud/bigquery_connection_v1/services/connection_service/transports/grpc_asyncio.py similarity index 99% rename from google/cloud/bigquery/connection_v1/services/connection_service/transports/grpc_asyncio.py rename to google/cloud/bigquery_connection_v1/services/connection_service/transports/grpc_asyncio.py index a091147..a78b085 100644 --- a/google/cloud/bigquery/connection_v1/services/connection_service/transports/grpc_asyncio.py +++ b/google/cloud/bigquery_connection_v1/services/connection_service/transports/grpc_asyncio.py @@ -27,8 +27,8 @@ import grpc # type: ignore from grpc.experimental import aio # type: ignore -from google.cloud.bigquery.connection_v1.types import connection -from google.cloud.bigquery.connection_v1.types import connection as gcbc_connection +from google.cloud.bigquery_connection_v1.types import connection +from google.cloud.bigquery_connection_v1.types import connection as gcbc_connection from google.iam.v1 import iam_policy_pb2 as iam_policy # type: ignore from google.iam.v1 import policy_pb2 as policy # type: ignore from google.protobuf import empty_pb2 as empty # type: ignore diff --git a/google/cloud/bigquery/connection_v1/types/__init__.py b/google/cloud/bigquery_connection_v1/types/__init__.py similarity index 100% rename from google/cloud/bigquery/connection_v1/types/__init__.py rename to google/cloud/bigquery_connection_v1/types/__init__.py diff --git a/google/cloud/bigquery/connection_v1/types/connection.py b/google/cloud/bigquery_connection_v1/types/connection.py similarity index 100% rename from google/cloud/bigquery/connection_v1/types/connection.py rename to google/cloud/bigquery_connection_v1/types/connection.py diff --git a/scripts/fixup_connection_v1_keywords.py b/scripts/fixup_bigquery_connection_v1_keywords.py similarity index 96% rename from scripts/fixup_connection_v1_keywords.py rename to scripts/fixup_bigquery_connection_v1_keywords.py index 719a3b8..64ee3d3 100644 --- a/scripts/fixup_connection_v1_keywords.py +++ b/scripts/fixup_bigquery_connection_v1_keywords.py @@ -38,7 +38,7 @@ def partition( return results[1], results[0] -class connectionCallTransformer(cst.CSTTransformer): +class bigquery_connectionCallTransformer(cst.CSTTransformer): CTRL_PARAMS: Tuple[str] = ('retry', 'timeout', 'metadata') METHOD_TO_PARAMS: Dict[str, Tuple[str]] = { 'create_connection': ('parent', 'connection', 'connection_id', ), @@ -98,7 +98,7 @@ def fix_files( in_dir: pathlib.Path, out_dir: pathlib.Path, *, - transformer=connectionCallTransformer(), + transformer=bigquery_connectionCallTransformer(), ): """Duplicate the input dir to the output dir, fixing file method calls. @@ -131,7 +131,7 @@ def fix_files( if __name__ == '__main__': parser = argparse.ArgumentParser( - description="""Fix up source that uses the connection client library. + description="""Fix up source that uses the bigquery_connection client library. The existing sources are NOT overwritten but are copied to output_dir with changes made. diff --git a/synth.metadata b/synth.metadata index c61cf3e..6162bac 100644 --- a/synth.metadata +++ b/synth.metadata @@ -11,8 +11,8 @@ "git": { "name": "googleapis", "remote": "https://github.com/googleapis/googleapis.git", - "sha": "07d41a7e5cade45aba6f0d277c89722b48f2c956", - "internalRef": "339292950" + "sha": "ae77417a40098bf64d04047760153f47daf2975f", + "internalRef": "339505822" } }, { @@ -92,30 +92,30 @@ "MANIFEST.in", "docs/_static/custom.css", "docs/_templates/layout.html", + "docs/bigquery_connection_v1/services.rst", + "docs/bigquery_connection_v1/types.rst", "docs/conf.py", - "docs/connection_v1/services.rst", - "docs/connection_v1/types.rst", "docs/multiprocessing.rst", - "google/cloud/bigquery/connection/__init__.py", - "google/cloud/bigquery/connection/py.typed", - "google/cloud/bigquery/connection_v1/__init__.py", - "google/cloud/bigquery/connection_v1/py.typed", - "google/cloud/bigquery/connection_v1/services/__init__.py", - "google/cloud/bigquery/connection_v1/services/connection_service/__init__.py", - "google/cloud/bigquery/connection_v1/services/connection_service/async_client.py", - "google/cloud/bigquery/connection_v1/services/connection_service/client.py", - "google/cloud/bigquery/connection_v1/services/connection_service/pagers.py", - "google/cloud/bigquery/connection_v1/services/connection_service/transports/__init__.py", - "google/cloud/bigquery/connection_v1/services/connection_service/transports/base.py", - "google/cloud/bigquery/connection_v1/services/connection_service/transports/grpc.py", - "google/cloud/bigquery/connection_v1/services/connection_service/transports/grpc_asyncio.py", - "google/cloud/bigquery/connection_v1/types/__init__.py", - "google/cloud/bigquery/connection_v1/types/connection.py", + "google/cloud/bigquery_connection/__init__.py", + "google/cloud/bigquery_connection/py.typed", + "google/cloud/bigquery_connection_v1/__init__.py", + "google/cloud/bigquery_connection_v1/py.typed", + "google/cloud/bigquery_connection_v1/services/__init__.py", + "google/cloud/bigquery_connection_v1/services/connection_service/__init__.py", + "google/cloud/bigquery_connection_v1/services/connection_service/async_client.py", + "google/cloud/bigquery_connection_v1/services/connection_service/client.py", + "google/cloud/bigquery_connection_v1/services/connection_service/pagers.py", + "google/cloud/bigquery_connection_v1/services/connection_service/transports/__init__.py", + "google/cloud/bigquery_connection_v1/services/connection_service/transports/base.py", + "google/cloud/bigquery_connection_v1/services/connection_service/transports/grpc.py", + "google/cloud/bigquery_connection_v1/services/connection_service/transports/grpc_asyncio.py", + "google/cloud/bigquery_connection_v1/types/__init__.py", + "google/cloud/bigquery_connection_v1/types/connection.py", "mypy.ini", "noxfile.py", "renovate.json", "scripts/decrypt-secrets.sh", - "scripts/fixup_connection_v1_keywords.py", + "scripts/fixup_bigquery_connection_v1_keywords.py", "scripts/readme-gen/readme_gen.py", "scripts/readme-gen/templates/README.tmpl.rst", "scripts/readme-gen/templates/auth.tmpl.rst", @@ -124,7 +124,7 @@ "scripts/readme-gen/templates/install_portaudio.tmpl.rst", "setup.cfg", "testing/.gitignore", - "tests/unit/gapic/connection_v1/__init__.py", - "tests/unit/gapic/connection_v1/test_connection_service.py" + "tests/unit/gapic/bigquery_connection_v1/__init__.py", + "tests/unit/gapic/bigquery_connection_v1/test_connection_service.py" ] } \ No newline at end of file diff --git a/tests/unit/gapic/connection_v1/__init__.py b/tests/unit/gapic/bigquery_connection_v1/__init__.py similarity index 100% rename from tests/unit/gapic/connection_v1/__init__.py rename to tests/unit/gapic/bigquery_connection_v1/__init__.py diff --git a/tests/unit/gapic/connection_v1/test_connection_service.py b/tests/unit/gapic/bigquery_connection_v1/test_connection_service.py similarity index 99% rename from tests/unit/gapic/connection_v1/test_connection_service.py rename to tests/unit/gapic/bigquery_connection_v1/test_connection_service.py index 7469f9f..d095906 100644 --- a/tests/unit/gapic/connection_v1/test_connection_service.py +++ b/tests/unit/gapic/bigquery_connection_v1/test_connection_service.py @@ -32,16 +32,16 @@ from google.api_core import grpc_helpers_async from google.auth import credentials from google.auth.exceptions import MutualTLSChannelError -from google.cloud.bigquery.connection_v1.services.connection_service import ( +from google.cloud.bigquery_connection_v1.services.connection_service import ( ConnectionServiceAsyncClient, ) -from google.cloud.bigquery.connection_v1.services.connection_service import ( +from google.cloud.bigquery_connection_v1.services.connection_service import ( ConnectionServiceClient, ) -from google.cloud.bigquery.connection_v1.services.connection_service import pagers -from google.cloud.bigquery.connection_v1.services.connection_service import transports -from google.cloud.bigquery.connection_v1.types import connection -from google.cloud.bigquery.connection_v1.types import connection as gcbc_connection +from google.cloud.bigquery_connection_v1.services.connection_service import pagers +from google.cloud.bigquery_connection_v1.services.connection_service import transports +from google.cloud.bigquery_connection_v1.types import connection +from google.cloud.bigquery_connection_v1.types import connection as gcbc_connection from google.iam.v1 import iam_policy_pb2 as iam_policy # type: ignore from google.iam.v1 import options_pb2 as options # type: ignore from google.iam.v1 import policy_pb2 as policy # type: ignore @@ -441,7 +441,7 @@ def test_connection_service_client_client_options_credentials_file( def test_connection_service_client_client_options_from_dict(): with mock.patch( - "google.cloud.bigquery.connection_v1.services.connection_service.transports.ConnectionServiceGrpcTransport.__init__" + "google.cloud.bigquery_connection_v1.services.connection_service.transports.ConnectionServiceGrpcTransport.__init__" ) as grpc_transport: grpc_transport.return_value = None client = ConnectionServiceClient( @@ -2517,7 +2517,7 @@ def test_connection_service_base_transport_error(): def test_connection_service_base_transport(): # Instantiate the base transport. with mock.patch( - "google.cloud.bigquery.connection_v1.services.connection_service.transports.ConnectionServiceTransport.__init__" + "google.cloud.bigquery_connection_v1.services.connection_service.transports.ConnectionServiceTransport.__init__" ) as Transport: Transport.return_value = None transport = transports.ConnectionServiceTransport( @@ -2546,7 +2546,7 @@ def test_connection_service_base_transport_with_credentials_file(): with mock.patch.object( auth, "load_credentials_from_file" ) as load_creds, mock.patch( - "google.cloud.bigquery.connection_v1.services.connection_service.transports.ConnectionServiceTransport._prep_wrapped_messages" + "google.cloud.bigquery_connection_v1.services.connection_service.transports.ConnectionServiceTransport._prep_wrapped_messages" ) as Transport: Transport.return_value = None load_creds.return_value = (credentials.AnonymousCredentials(), None) @@ -2566,7 +2566,7 @@ def test_connection_service_base_transport_with_credentials_file(): def test_connection_service_base_transport_with_adc(): # Test the default credentials are used if credentials and credentials_file are None. with mock.patch.object(auth, "default") as adc, mock.patch( - "google.cloud.bigquery.connection_v1.services.connection_service.transports.ConnectionServiceTransport._prep_wrapped_messages" + "google.cloud.bigquery_connection_v1.services.connection_service.transports.ConnectionServiceTransport._prep_wrapped_messages" ) as Transport: Transport.return_value = None adc.return_value = (credentials.AnonymousCredentials(), None)