Skip to content

Commit 320a409

Browse files
jskeetchalmerlowe
authored andcommitted
chore: complete migration of google-cloud-biglake-hive (#16684)
The code changes here are due to the package not having been regenerated with the latest version of legacylibrarian. Fixes googleapis/librarian#5336
1 parent c347ab3 commit 320a409

File tree

17 files changed

+418
-371
lines changed

17 files changed

+418
-371
lines changed

librarian.yaml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -819,7 +819,6 @@ libraries:
819819
keep:
820820
- CHANGELOG.md
821821
- docs/CHANGELOG.md
822-
skip_generate: true
823822
python:
824823
opt_args_by_api:
825824
google/cloud/biglake/hive/v1beta:
Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
11
{
2-
"api_description": "The BigLake API provides access to BigLake Metastore, a serverless, fully\nmanaged, and highly available metastore for open-source data that can be\nused for querying Apache Iceberg tables in BigQuery.",
3-
"api_id": "biglake.googleapis.com",
4-
"api_shortname": "biglake",
5-
"client_documentation": "https://cloud.google.com/python/docs/reference/google-cloud-biglake-hive/latest",
6-
"default_version": "v1beta",
7-
"distribution_name": "google-cloud-biglake-hive",
8-
"issue_tracker": "https://issuetracker.google.com/issues/new?component=187149&template=1019829",
9-
"language": "python",
10-
"library_type": "GAPIC_AUTO",
11-
"name": "google-cloud-biglake-hive",
12-
"name_pretty": "BigLake API",
13-
"product_documentation": "https://cloud.google.com/bigquery/docs/iceberg-tables#create-using-biglake-metastore",
14-
"release_level": "preview",
15-
"repo": "googleapis/google-cloud-python"
16-
}
2+
"api_description": "The BigLake API provides access to BigLake Metastore, a serverless, fully\nmanaged, and highly available metastore for open-source data that can be\nused for querying Apache Iceberg tables in BigQuery.",
3+
"api_id": "biglake.googleapis.com",
4+
"api_shortname": "biglake",
5+
"client_documentation": "https://cloud.google.com/python/docs/reference/google-cloud-biglake-hive/latest",
6+
"default_version": "v1beta",
7+
"distribution_name": "google-cloud-biglake-hive",
8+
"issue_tracker": "https://issuetracker.google.com/issues/new?component=187149\u0026template=1019829",
9+
"language": "python",
10+
"library_type": "GAPIC_AUTO",
11+
"name": "google-cloud-biglake-hive",
12+
"name_pretty": "BigLake API",
13+
"product_documentation": "https://cloud.google.com/bigquery/docs/iceberg-tables#create-using-biglake-metastore",
14+
"release_level": "preview",
15+
"repo": "googleapis/google-cloud-python"
16+
}

packages/google-cloud-biglake-hive/README.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,14 +63,14 @@ Supported Python Versions
6363
Our client libraries are compatible with all current `active`_ and `maintenance`_ versions of
6464
Python.
6565

66-
Python >= 3.7, including 3.14
66+
Python >= 3.9, including 3.14
6767

6868
.. _active: https://devguide.python.org/devcycle/#in-development-main-branch
6969
.. _maintenance: https://devguide.python.org/devcycle/#maintenance-branches
7070

7171
Unsupported Python Versions
7272
^^^^^^^^^^^^^^^^^^^^^^^^^^^
73-
Python <= 3.6
73+
Python <= 3.8
7474

7575
If you are using an `end-of-life`_
7676
version of Python, we recommend that you update as soon as possible to an actively supported version.

packages/google-cloud-biglake-hive/docs/README.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,14 +63,14 @@ Supported Python Versions
6363
Our client libraries are compatible with all current `active`_ and `maintenance`_ versions of
6464
Python.
6565

66-
Python >= 3.7, including 3.14
66+
Python >= 3.9, including 3.14
6767

6868
.. _active: https://devguide.python.org/devcycle/#in-development-main-branch
6969
.. _maintenance: https://devguide.python.org/devcycle/#maintenance-branches
7070

7171
Unsupported Python Versions
7272
^^^^^^^^^^^^^^^^^^^^^^^^^^^
73-
Python <= 3.6
73+
Python <= 3.8
7474

7575
If you are using an `end-of-life`_
7676
version of Python, we recommend that you update as soon as possible to an actively supported version.

packages/google-cloud-biglake-hive/google/cloud/biglake_hive_v1beta/services/hive_metastore_service/async_client.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -210,7 +210,7 @@ def transport(self) -> HiveMetastoreServiceTransport:
210210
return self._client.transport
211211

212212
@property
213-
def api_endpoint(self):
213+
def api_endpoint(self) -> str:
214214
"""Return the API endpoint used by the client instance.
215215
216216
Returns:

packages/google-cloud-biglake-hive/google/cloud/biglake_hive_v1beta/services/hive_metastore_service/client.py

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -127,15 +127,15 @@ class HiveMetastoreServiceClient(metaclass=HiveMetastoreServiceClientMeta):
127127
"""
128128

129129
@staticmethod
130-
def _get_default_mtls_endpoint(api_endpoint):
130+
def _get_default_mtls_endpoint(api_endpoint) -> Optional[str]:
131131
"""Converts api endpoint to mTLS endpoint.
132132
133133
Convert "*.sandbox.googleapis.com" and "*.googleapis.com" to
134134
"*.mtls.sandbox.googleapis.com" and "*.mtls.googleapis.com" respectively.
135135
Args:
136136
api_endpoint (Optional[str]): the api endpoint to convert.
137137
Returns:
138-
str: converted mTLS api endpoint.
138+
Optional[str]: converted mTLS api endpoint.
139139
"""
140140
if not api_endpoint:
141141
return api_endpoint
@@ -145,6 +145,10 @@ def _get_default_mtls_endpoint(api_endpoint):
145145
)
146146

147147
m = mtls_endpoint_re.match(api_endpoint)
148+
if m is None:
149+
# Could not parse api_endpoint; return as-is.
150+
return api_endpoint
151+
148152
name, mtls, sandbox, googledomain = m.groups()
149153
if mtls or not googledomain:
150154
return api_endpoint
@@ -493,7 +497,7 @@ def _get_client_cert_source(provided_cert_source, use_cert_flag):
493497
@staticmethod
494498
def _get_api_endpoint(
495499
api_override, client_cert_source, universe_domain, use_mtls_endpoint
496-
):
500+
) -> str:
497501
"""Return the API endpoint used by the client.
498502
499503
Args:
@@ -590,7 +594,7 @@ def _add_cred_info_for_auth_errors(
590594
error._details.append(json.dumps(cred_info))
591595

592596
@property
593-
def api_endpoint(self):
597+
def api_endpoint(self) -> str:
594598
"""Return the API endpoint used by the client instance.
595599
596600
Returns:
@@ -690,7 +694,7 @@ def __init__(
690694
self._universe_domain = HiveMetastoreServiceClient._get_universe_domain(
691695
universe_domain_opt, self._universe_domain_env
692696
)
693-
self._api_endpoint = None # updated below, depending on `transport`
697+
self._api_endpoint: str = "" # updated below, depending on `transport`
694698

695699
# Initialize the universe domain validation.
696700
self._is_universe_domain_valid = False

packages/google-cloud-biglake-hive/google/cloud/biglake_hive_v1beta/services/hive_metastore_service/transports/README.rst

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,9 @@
22
transport inheritance structure
33
_______________________________
44

5-
`HiveMetastoreServiceTransport` is the ABC for all transports.
6-
- public child `HiveMetastoreServiceGrpcTransport` for sync gRPC transport (defined in `grpc.py`).
7-
- public child `HiveMetastoreServiceGrpcAsyncIOTransport` for async gRPC transport (defined in `grpc_asyncio.py`).
8-
- private child `_BaseHiveMetastoreServiceRestTransport` for base REST transport with inner classes `_BaseMETHOD` (defined in `rest_base.py`).
9-
- public child `HiveMetastoreServiceRestTransport` for sync REST transport with inner classes `METHOD` derived from the parent's corresponding `_BaseMETHOD` classes (defined in `rest.py`).
5+
``HiveMetastoreServiceTransport`` is the ABC for all transports.
6+
7+
- public child ``HiveMetastoreServiceGrpcTransport`` for sync gRPC transport (defined in ``grpc.py``).
8+
- public child ``HiveMetastoreServiceGrpcAsyncIOTransport`` for async gRPC transport (defined in ``grpc_asyncio.py``).
9+
- private child ``_BaseHiveMetastoreServiceRestTransport`` for base REST transport with inner classes ``_BaseMETHOD`` (defined in ``rest_base.py``).
10+
- public child ``HiveMetastoreServiceRestTransport`` for sync REST transport with inner classes ``METHOD`` derived from the parent's corresponding ``_BaseMETHOD`` classes (defined in ``rest.py``).

packages/google-cloud-biglake-hive/google/cloud/biglake_hive_v1beta/services/hive_metastore_service/transports/base.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,10 @@ def __init__(
8484
your own client library.
8585
always_use_jwt_access (Optional[bool]): Whether self signed JWT should
8686
be used for service account credentials.
87+
api_audience (Optional[str]): The intended audience for the API calls
88+
to the service that will be set when using certain 3rd party
89+
authentication flows. Audience is typically a resource identifier.
90+
If not set, the host value will be used as a default.
8791
"""
8892

8993
# Save the scopes.
@@ -133,6 +137,8 @@ def __init__(
133137
host += ":443"
134138
self._host = host
135139

140+
self._wrapped_methods: Dict[Callable, Callable] = {}
141+
136142
@property
137143
def host(self):
138144
return self._host

packages/google-cloud-biglake-hive/google/cloud/biglake_hive_v1beta/services/hive_metastore_service/transports/grpc.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ def intercept_unary_unary(self, continuation, client_call_details, request):
5555
elif isinstance(request, google.protobuf.message.Message):
5656
request_payload = MessageToJson(request)
5757
else:
58-
request_payload = f"{type(request).__name__}: {pickle.dumps(request)}"
58+
request_payload = f"{type(request).__name__}: {pickle.dumps(request)!r}"
5959

6060
request_metadata = {
6161
key: value.decode("utf-8") if isinstance(value, bytes) else value
@@ -90,7 +90,7 @@ def intercept_unary_unary(self, continuation, client_call_details, request):
9090
elif isinstance(result, google.protobuf.message.Message):
9191
response_payload = MessageToJson(result)
9292
else:
93-
response_payload = f"{type(result).__name__}: {pickle.dumps(result)}"
93+
response_payload = f"{type(result).__name__}: {pickle.dumps(result)!r}"
9494
grpc_response = {
9595
"payload": response_payload,
9696
"metadata": metadata,
@@ -198,6 +198,10 @@ def __init__(
198198
your own client library.
199199
always_use_jwt_access (Optional[bool]): Whether self signed JWT should
200200
be used for service account credentials.
201+
api_audience (Optional[str]): The intended audience for the API calls
202+
to the service that will be set when using certain 3rd party
203+
authentication flows. Audience is typically a resource identifier.
204+
If not set, the host value will be used as a default.
201205
202206
Raises:
203207
google.auth.exceptions.MutualTLSChannelError: If mutual TLS transport

packages/google-cloud-biglake-hive/google/cloud/biglake_hive_v1beta/services/hive_metastore_service/transports/grpc_asyncio.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ async def intercept_unary_unary(self, continuation, client_call_details, request
6161
elif isinstance(request, google.protobuf.message.Message):
6262
request_payload = MessageToJson(request)
6363
else:
64-
request_payload = f"{type(request).__name__}: {pickle.dumps(request)}"
64+
request_payload = f"{type(request).__name__}: {pickle.dumps(request)!r}"
6565

6666
request_metadata = {
6767
key: value.decode("utf-8") if isinstance(value, bytes) else value
@@ -96,7 +96,7 @@ async def intercept_unary_unary(self, continuation, client_call_details, request
9696
elif isinstance(result, google.protobuf.message.Message):
9797
response_payload = MessageToJson(result)
9898
else:
99-
response_payload = f"{type(result).__name__}: {pickle.dumps(result)}"
99+
response_payload = f"{type(result).__name__}: {pickle.dumps(result)!r}"
100100
grpc_response = {
101101
"payload": response_payload,
102102
"metadata": metadata,
@@ -249,6 +249,10 @@ def __init__(
249249
your own client library.
250250
always_use_jwt_access (Optional[bool]): Whether self signed JWT should
251251
be used for service account credentials.
252+
api_audience (Optional[str]): The intended audience for the API calls
253+
to the service that will be set when using certain 3rd party
254+
authentication flows. Audience is typically a resource identifier.
255+
If not set, the host value will be used as a default.
252256
253257
Raises:
254258
google.auth.exceptions.MutualTlsChannelError: If mutual TLS transport

0 commit comments

Comments
 (0)