Skip to content

Commit 93ed424

Browse files
authored
chore: complete migration of google-cloud-datacatalog-lineage-configmanagement (#16784)
This has more changes than other packages because it hadn't been regenerated with the newest legacylibrarian (that updated the Python version requirements, for example). Fixes googleapis/librarian#5337
1 parent a1f35fe commit 93ed424

17 files changed

Lines changed: 367 additions & 201 deletions

File tree

librarian.yaml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1260,7 +1260,6 @@ libraries:
12601260
version: 0.1.0
12611261
apis:
12621262
- path: google/cloud/datacatalog/lineage/configmanagement/v1
1263-
skip_generate: true
12641263
python:
12651264
opt_args_by_api:
12661265
google/cloud/datacatalog/lineage/configmanagement/v1:
Lines changed: 14 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,15 @@
11
{
2-
"api_description": "",
3-
"api_id": "datalineage.googleapis.com",
4-
"api_shortname": "datalineage",
5-
"client_documentation": "https://cloud.google.com/python/docs/reference/google-cloud-datacatalog-lineage-configmanagement/latest",
6-
"default_version": "v1",
7-
"distribution_name": "google-cloud-datacatalog-lineage-configmanagement",
8-
"issue_tracker": "https://issuetracker.google.com/issues/new?component=1530027",
9-
"language": "python",
10-
"library_type": "GAPIC_AUTO",
11-
"name": "google-cloud-datacatalog-lineage-configmanagement",
12-
"name_pretty": "Data Lineage API",
13-
"product_documentation": "https://cloud.google.com/dataplex/docs/about-data-lineage",
14-
"release_level": "preview",
15-
"repo": "googleapis/google-cloud-python"
16-
}
2+
"api_id": "datalineage.googleapis.com",
3+
"api_shortname": "datalineage",
4+
"client_documentation": "https://cloud.google.com/python/docs/reference/google-cloud-datacatalog-lineage-configmanagement/latest",
5+
"default_version": "v1",
6+
"distribution_name": "google-cloud-datacatalog-lineage-configmanagement",
7+
"issue_tracker": "https://issuetracker.google.com/issues/new?component=1530027",
8+
"language": "python",
9+
"library_type": "GAPIC_AUTO",
10+
"name": "google-cloud-datacatalog-lineage-configmanagement",
11+
"name_pretty": "Data Lineage API",
12+
"product_documentation": "https://cloud.google.com/dataplex/docs/about-data-lineage",
13+
"release_level": "preview",
14+
"repo": "googleapis/google-cloud-python"
15+
}

packages/google-cloud-datacatalog-lineage-configmanagement/README.rst

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

64-
Python >= 3.7, including 3.14
64+
Python >= 3.9, including 3.14
6565

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

6969
Unsupported Python Versions
7070
^^^^^^^^^^^^^^^^^^^^^^^^^^^
71-
Python <= 3.6
71+
Python <= 3.8
7272

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

packages/google-cloud-datacatalog-lineage-configmanagement/docs/README.rst

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

64-
Python >= 3.7, including 3.14
64+
Python >= 3.9, including 3.14
6565

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

6969
Unsupported Python Versions
7070
^^^^^^^^^^^^^^^^^^^^^^^^^^^
71-
Python <= 3.6
71+
Python <= 3.8
7272

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

packages/google-cloud-datacatalog-lineage-configmanagement/google/cloud/datacatalog_lineage_configmanagement_v1/services/config_management_service/async_client.py

Lines changed: 37 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -202,7 +202,7 @@ def transport(self) -> ConfigManagementServiceTransport:
202202
return self._client.transport
203203

204204
@property
205-
def api_endpoint(self):
205+
def api_endpoint(self) -> str:
206206
"""Return the API endpoint used by the client instance.
207207
208208
Returns:
@@ -546,7 +546,7 @@ async def sample_update_config():
546546

547547
async def list_operations(
548548
self,
549-
request: Optional[operations_pb2.ListOperationsRequest] = None,
549+
request: Optional[Union[operations_pb2.ListOperationsRequest, dict]] = None,
550550
*,
551551
retry: OptionalRetry = gapic_v1.method.DEFAULT,
552552
timeout: Union[float, object] = gapic_v1.method.DEFAULT,
@@ -572,8 +572,12 @@ async def list_operations(
572572
# Create or coerce a protobuf request object.
573573
# The request isn't a proto-plus wrapped type,
574574
# so it must be constructed via keyword expansion.
575-
if isinstance(request, dict):
576-
request = operations_pb2.ListOperationsRequest(**request)
575+
if request is None:
576+
request_pb = operations_pb2.ListOperationsRequest()
577+
elif isinstance(request, dict):
578+
request_pb = operations_pb2.ListOperationsRequest(**request)
579+
else:
580+
request_pb = request
577581

578582
# Wrap the RPC method; this adds retry and timeout information,
579583
# and friendly error handling.
@@ -582,15 +586,15 @@ async def list_operations(
582586
# Certain fields should be provided within the metadata header;
583587
# add these here.
584588
metadata = tuple(metadata) + (
585-
gapic_v1.routing_header.to_grpc_metadata((("name", request.name),)),
589+
gapic_v1.routing_header.to_grpc_metadata((("name", request_pb.name),)),
586590
)
587591

588592
# Validate the universe domain.
589593
self._client._validate_universe_domain()
590594

591595
# Send the request.
592596
response = await rpc(
593-
request,
597+
request_pb,
594598
retry=retry,
595599
timeout=timeout,
596600
metadata=metadata,
@@ -601,7 +605,7 @@ async def list_operations(
601605

602606
async def get_operation(
603607
self,
604-
request: Optional[operations_pb2.GetOperationRequest] = None,
608+
request: Optional[Union[operations_pb2.GetOperationRequest, dict]] = None,
605609
*,
606610
retry: OptionalRetry = gapic_v1.method.DEFAULT,
607611
timeout: Union[float, object] = gapic_v1.method.DEFAULT,
@@ -627,8 +631,12 @@ async def get_operation(
627631
# Create or coerce a protobuf request object.
628632
# The request isn't a proto-plus wrapped type,
629633
# so it must be constructed via keyword expansion.
630-
if isinstance(request, dict):
631-
request = operations_pb2.GetOperationRequest(**request)
634+
if request is None:
635+
request_pb = operations_pb2.GetOperationRequest()
636+
elif isinstance(request, dict):
637+
request_pb = operations_pb2.GetOperationRequest(**request)
638+
else:
639+
request_pb = request
632640

633641
# Wrap the RPC method; this adds retry and timeout information,
634642
# and friendly error handling.
@@ -637,15 +645,15 @@ async def get_operation(
637645
# Certain fields should be provided within the metadata header;
638646
# add these here.
639647
metadata = tuple(metadata) + (
640-
gapic_v1.routing_header.to_grpc_metadata((("name", request.name),)),
648+
gapic_v1.routing_header.to_grpc_metadata((("name", request_pb.name),)),
641649
)
642650

643651
# Validate the universe domain.
644652
self._client._validate_universe_domain()
645653

646654
# Send the request.
647655
response = await rpc(
648-
request,
656+
request_pb,
649657
retry=retry,
650658
timeout=timeout,
651659
metadata=metadata,
@@ -656,7 +664,7 @@ async def get_operation(
656664

657665
async def delete_operation(
658666
self,
659-
request: Optional[operations_pb2.DeleteOperationRequest] = None,
667+
request: Optional[Union[operations_pb2.DeleteOperationRequest, dict]] = None,
660668
*,
661669
retry: OptionalRetry = gapic_v1.method.DEFAULT,
662670
timeout: Union[float, object] = gapic_v1.method.DEFAULT,
@@ -686,8 +694,12 @@ async def delete_operation(
686694
# Create or coerce a protobuf request object.
687695
# The request isn't a proto-plus wrapped type,
688696
# so it must be constructed via keyword expansion.
689-
if isinstance(request, dict):
690-
request = operations_pb2.DeleteOperationRequest(**request)
697+
if request is None:
698+
request_pb = operations_pb2.DeleteOperationRequest()
699+
elif isinstance(request, dict):
700+
request_pb = operations_pb2.DeleteOperationRequest(**request)
701+
else:
702+
request_pb = request
691703

692704
# Wrap the RPC method; this adds retry and timeout information,
693705
# and friendly error handling.
@@ -696,23 +708,23 @@ async def delete_operation(
696708
# Certain fields should be provided within the metadata header;
697709
# add these here.
698710
metadata = tuple(metadata) + (
699-
gapic_v1.routing_header.to_grpc_metadata((("name", request.name),)),
711+
gapic_v1.routing_header.to_grpc_metadata((("name", request_pb.name),)),
700712
)
701713

702714
# Validate the universe domain.
703715
self._client._validate_universe_domain()
704716

705717
# Send the request.
706718
await rpc(
707-
request,
719+
request_pb,
708720
retry=retry,
709721
timeout=timeout,
710722
metadata=metadata,
711723
)
712724

713725
async def cancel_operation(
714726
self,
715-
request: Optional[operations_pb2.CancelOperationRequest] = None,
727+
request: Optional[Union[operations_pb2.CancelOperationRequest, dict]] = None,
716728
*,
717729
retry: OptionalRetry = gapic_v1.method.DEFAULT,
718730
timeout: Union[float, object] = gapic_v1.method.DEFAULT,
@@ -741,8 +753,12 @@ async def cancel_operation(
741753
# Create or coerce a protobuf request object.
742754
# The request isn't a proto-plus wrapped type,
743755
# so it must be constructed via keyword expansion.
744-
if isinstance(request, dict):
745-
request = operations_pb2.CancelOperationRequest(**request)
756+
if request is None:
757+
request_pb = operations_pb2.CancelOperationRequest()
758+
elif isinstance(request, dict):
759+
request_pb = operations_pb2.CancelOperationRequest(**request)
760+
else:
761+
request_pb = request
746762

747763
# Wrap the RPC method; this adds retry and timeout information,
748764
# and friendly error handling.
@@ -751,15 +767,15 @@ async def cancel_operation(
751767
# Certain fields should be provided within the metadata header;
752768
# add these here.
753769
metadata = tuple(metadata) + (
754-
gapic_v1.routing_header.to_grpc_metadata((("name", request.name),)),
770+
gapic_v1.routing_header.to_grpc_metadata((("name", request_pb.name),)),
755771
)
756772

757773
# Validate the universe domain.
758774
self._client._validate_universe_domain()
759775

760776
# Send the request.
761777
await rpc(
762-
request,
778+
request_pb,
763779
retry=retry,
764780
timeout=timeout,
765781
metadata=metadata,

0 commit comments

Comments
 (0)