From aef749eeeb9862597b8a7baf00e0ce0b66676c54 Mon Sep 17 00:00:00 2001 From: Anthonios Partheniou Date: Tue, 4 Nov 2025 14:38:09 +0000 Subject: [PATCH 1/3] chore: add google/gapic/metadata path to googleapis-common-protos --- .librarian/state.yaml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.librarian/state.yaml b/.librarian/state.yaml index b8bdd43763d4..c2149f4e92ab 100644 --- a/.librarian/state.yaml +++ b/.librarian/state.yaml @@ -4680,6 +4680,7 @@ libraries: service_config: serviceconfig.yaml - path: google/cloud/location service_config: cloud.yaml + - path: google/gapic/metadata - path: google/logging/type service_config: "" - path: google/rpc @@ -4692,7 +4693,7 @@ libraries: - packages/googleapis-common-protos preserve_regex: [] remove_regex: - - ^packages/googleapis-common-protos/google/(?:api|cloud|rpc|type)/.*/.*_pb2\.(?:py|pyi)$/ + - ^packages/googleapis-common-protos/google/(?:api|cloud|gapic|rpc|type)/.*/.*_pb2\.(?:py|pyi)$/ tag_format: '{id}-v{version}' - id: grafeas version: 1.16.0 From f73fde6d0f56ba802d83680985d433b8411a1c69 Mon Sep 17 00:00:00 2001 From: Anthonios Partheniou Date: Tue, 4 Nov 2025 14:41:13 +0000 Subject: [PATCH 2/3] feat: add field api_version to message ServiceForTransport --- .librarian/state.yaml | 3 +- .../gapic/metadata/gapic_metadata.proto | 17 +++++++--- .../gapic/metadata/gapic_metadata_pb2.py | 34 +++++++++---------- .../gapic/metadata/gapic_metadata_pb2.pyi | 8 +++-- 4 files changed, 37 insertions(+), 25 deletions(-) diff --git a/.librarian/state.yaml b/.librarian/state.yaml index c2149f4e92ab..fd0f18b6eedc 100644 --- a/.librarian/state.yaml +++ b/.librarian/state.yaml @@ -4674,13 +4674,14 @@ libraries: tag_format: '{id}-v{version}' - id: googleapis-common-protos version: 1.71.0 - last_generated_commit: e8365a7f88fabe8717cb8322b8ce784b03b6daea + last_generated_commit: 91361b6b2df5f7f3bfc0858be061e31fd2b7be98 apis: - path: google/api service_config: serviceconfig.yaml - path: google/cloud/location service_config: cloud.yaml - path: google/gapic/metadata + service_config: "" - path: google/logging/type service_config: "" - path: google/rpc diff --git a/packages/googleapis-common-protos/google/gapic/metadata/gapic_metadata.proto b/packages/googleapis-common-protos/google/gapic/metadata/gapic_metadata.proto index ef11917bf546..0f2855c15a66 100644 --- a/packages/googleapis-common-protos/google/gapic/metadata/gapic_metadata.proto +++ b/packages/googleapis-common-protos/google/gapic/metadata/gapic_metadata.proto @@ -25,8 +25,8 @@ option java_package = "com.google.gapic.metadata"; option php_namespace = "Google\\Gapic\\Metadata"; option ruby_package = "Google::Gapic::Metadata"; -// Metadata about a GAPIC library for a specific combination of API, version, -// and computer language. +// Metadata about a GAPIC library service for a specific combination of API, +// version, and computer language. message GapicMetadata { // Schema version of this proto. Current value: 1.0 string schema = 1; @@ -57,11 +57,18 @@ message GapicMetadata { // A map from a transport name to ServiceAsClient, which allows // listing information about the client objects that implement the // parent RPC service for the specified transport. - // - // The key name is the transport, lower-cased with no separators - // (e.g. "grpc", "rest"). message ServiceForTransport { + // Map of transport name to ServiceAsClient. The key name is the transport, + // lower-cased with no separators (e.g. "grpc", "rest"). map clients = 1; + + // The API version for the interface definition found in the + // `google.api.api_version` annotation of this proto-defined service during + // code generation. + // This is the value populated by the client in the API version request + // parameter as per + // [AIP-4236](https://google.aip.dev/client-libraries/4236). + string api_version = 2; } // Information about a specific client implementing a proto-defined service. diff --git a/packages/googleapis-common-protos/google/gapic/metadata/gapic_metadata_pb2.py b/packages/googleapis-common-protos/google/gapic/metadata/gapic_metadata_pb2.py index 353049fd8ef5..27ae63399a39 100644 --- a/packages/googleapis-common-protos/google/gapic/metadata/gapic_metadata_pb2.py +++ b/packages/googleapis-common-protos/google/gapic/metadata/gapic_metadata_pb2.py @@ -15,7 +15,7 @@ # limitations under the License. # Generated by the protocol buffer compiler. DO NOT EDIT! -# source: gapic/metadata/gapic_metadata.proto +# source: google/gapic/metadata/gapic_metadata.proto # Protobuf Python Version: 4.25.3 """Generated protocol buffer code.""" from google.protobuf import descriptor as _descriptor @@ -29,13 +29,13 @@ DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile( - b'\n#gapic/metadata/gapic_metadata.proto\x12\x15google.gapic.metadata"\xf0\x05\n\rGapicMetadata\x12\x0e\n\x06schema\x18\x01 \x01(\t\x12\x0f\n\x07\x63omment\x18\x02 \x01(\t\x12\x10\n\x08language\x18\x03 \x01(\t\x12\x15\n\rproto_package\x18\x04 \x01(\t\x12\x17\n\x0flibrary_package\x18\x05 \x01(\t\x12\x44\n\x08services\x18\x06 \x03(\x0b\x32\x32.google.gapic.metadata.GapicMetadata.ServicesEntry\x1ai\n\rServicesEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12G\n\x05value\x18\x02 \x01(\x0b\x32\x38.google.gapic.metadata.GapicMetadata.ServiceForTransport:\x02\x38\x01\x1a\xd3\x01\n\x13ServiceForTransport\x12V\n\x07\x63lients\x18\x01 \x03(\x0b\x32\x45.google.gapic.metadata.GapicMetadata.ServiceForTransport.ClientsEntry\x1a\x64\n\x0c\x43lientsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\x43\n\x05value\x18\x02 \x01(\x0b\x32\x34.google.gapic.metadata.GapicMetadata.ServiceAsClient:\x02\x38\x01\x1a\xd5\x01\n\x0fServiceAsClient\x12\x16\n\x0elibrary_client\x18\x01 \x01(\t\x12L\n\x04rpcs\x18\x02 \x03(\x0b\x32>.google.gapic.metadata.GapicMetadata.ServiceAsClient.RpcsEntry\x1a\\\n\tRpcsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12>\n\x05value\x18\x02 \x01(\x0b\x32/.google.gapic.metadata.GapicMetadata.MethodList:\x02\x38\x01\x1a\x1d\n\nMethodList\x12\x0f\n\x07methods\x18\x01 \x03(\tB\xba\x01\n\x19\x63om.google.gapic.metadataB\x12GapicMetadataProtoP\x01Z=google.golang.org/genproto/googleapis/gapic/metadata;metadata\xaa\x02\x15Google.Gapic.Metadata\xca\x02\x15Google\\Gapic\\Metadata\xea\x02\x17Google::Gapic::Metadatab\x06proto3' + b'\n*google/gapic/metadata/gapic_metadata.proto\x12\x15google.gapic.metadata"\x85\x06\n\rGapicMetadata\x12\x0e\n\x06schema\x18\x01 \x01(\t\x12\x0f\n\x07\x63omment\x18\x02 \x01(\t\x12\x10\n\x08language\x18\x03 \x01(\t\x12\x15\n\rproto_package\x18\x04 \x01(\t\x12\x17\n\x0flibrary_package\x18\x05 \x01(\t\x12\x44\n\x08services\x18\x06 \x03(\x0b\x32\x32.google.gapic.metadata.GapicMetadata.ServicesEntry\x1ai\n\rServicesEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12G\n\x05value\x18\x02 \x01(\x0b\x32\x38.google.gapic.metadata.GapicMetadata.ServiceForTransport:\x02\x38\x01\x1a\xe8\x01\n\x13ServiceForTransport\x12V\n\x07\x63lients\x18\x01 \x03(\x0b\x32\x45.google.gapic.metadata.GapicMetadata.ServiceForTransport.ClientsEntry\x12\x13\n\x0b\x61pi_version\x18\x02 \x01(\t\x1a\x64\n\x0c\x43lientsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\x43\n\x05value\x18\x02 \x01(\x0b\x32\x34.google.gapic.metadata.GapicMetadata.ServiceAsClient:\x02\x38\x01\x1a\xd5\x01\n\x0fServiceAsClient\x12\x16\n\x0elibrary_client\x18\x01 \x01(\t\x12L\n\x04rpcs\x18\x02 \x03(\x0b\x32>.google.gapic.metadata.GapicMetadata.ServiceAsClient.RpcsEntry\x1a\\\n\tRpcsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12>\n\x05value\x18\x02 \x01(\x0b\x32/.google.gapic.metadata.GapicMetadata.MethodList:\x02\x38\x01\x1a\x1d\n\nMethodList\x12\x0f\n\x07methods\x18\x01 \x03(\tB\xba\x01\n\x19\x63om.google.gapic.metadataB\x12GapicMetadataProtoP\x01Z=google.golang.org/genproto/googleapis/gapic/metadata;metadata\xaa\x02\x15Google.Gapic.Metadata\xca\x02\x15Google\\Gapic\\Metadata\xea\x02\x17Google::Gapic::Metadatab\x06proto3' ) _globals = globals() _builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals) _builder.BuildTopDescriptorsAndMessages( - DESCRIPTOR, "gapic.metadata.gapic_metadata_pb2", _globals + DESCRIPTOR, "google.gapic.metadata.gapic_metadata_pb2", _globals ) if _descriptor._USE_C_DESCRIPTORS == False: _globals["DESCRIPTOR"]._options = None @@ -50,18 +50,18 @@ ]._serialized_options = b"8\001" _globals["_GAPICMETADATA_SERVICEASCLIENT_RPCSENTRY"]._options = None _globals["_GAPICMETADATA_SERVICEASCLIENT_RPCSENTRY"]._serialized_options = b"8\001" - _globals["_GAPICMETADATA"]._serialized_start = 63 - _globals["_GAPICMETADATA"]._serialized_end = 815 - _globals["_GAPICMETADATA_SERVICESENTRY"]._serialized_start = 249 - _globals["_GAPICMETADATA_SERVICESENTRY"]._serialized_end = 354 - _globals["_GAPICMETADATA_SERVICEFORTRANSPORT"]._serialized_start = 357 - _globals["_GAPICMETADATA_SERVICEFORTRANSPORT"]._serialized_end = 568 - _globals["_GAPICMETADATA_SERVICEFORTRANSPORT_CLIENTSENTRY"]._serialized_start = 468 - _globals["_GAPICMETADATA_SERVICEFORTRANSPORT_CLIENTSENTRY"]._serialized_end = 568 - _globals["_GAPICMETADATA_SERVICEASCLIENT"]._serialized_start = 571 - _globals["_GAPICMETADATA_SERVICEASCLIENT"]._serialized_end = 784 - _globals["_GAPICMETADATA_SERVICEASCLIENT_RPCSENTRY"]._serialized_start = 692 - _globals["_GAPICMETADATA_SERVICEASCLIENT_RPCSENTRY"]._serialized_end = 784 - _globals["_GAPICMETADATA_METHODLIST"]._serialized_start = 786 - _globals["_GAPICMETADATA_METHODLIST"]._serialized_end = 815 + _globals["_GAPICMETADATA"]._serialized_start = 70 + _globals["_GAPICMETADATA"]._serialized_end = 843 + _globals["_GAPICMETADATA_SERVICESENTRY"]._serialized_start = 256 + _globals["_GAPICMETADATA_SERVICESENTRY"]._serialized_end = 361 + _globals["_GAPICMETADATA_SERVICEFORTRANSPORT"]._serialized_start = 364 + _globals["_GAPICMETADATA_SERVICEFORTRANSPORT"]._serialized_end = 596 + _globals["_GAPICMETADATA_SERVICEFORTRANSPORT_CLIENTSENTRY"]._serialized_start = 496 + _globals["_GAPICMETADATA_SERVICEFORTRANSPORT_CLIENTSENTRY"]._serialized_end = 596 + _globals["_GAPICMETADATA_SERVICEASCLIENT"]._serialized_start = 599 + _globals["_GAPICMETADATA_SERVICEASCLIENT"]._serialized_end = 812 + _globals["_GAPICMETADATA_SERVICEASCLIENT_RPCSENTRY"]._serialized_start = 720 + _globals["_GAPICMETADATA_SERVICEASCLIENT_RPCSENTRY"]._serialized_end = 812 + _globals["_GAPICMETADATA_METHODLIST"]._serialized_start = 814 + _globals["_GAPICMETADATA_METHODLIST"]._serialized_end = 843 # @@protoc_insertion_point(module_scope) diff --git a/packages/googleapis-common-protos/google/gapic/metadata/gapic_metadata_pb2.pyi b/packages/googleapis-common-protos/google/gapic/metadata/gapic_metadata_pb2.pyi index 90b91690af17..442b20ff88a0 100644 --- a/packages/googleapis-common-protos/google/gapic/metadata/gapic_metadata_pb2.pyi +++ b/packages/googleapis-common-protos/google/gapic/metadata/gapic_metadata_pb2.pyi @@ -47,7 +47,7 @@ class GapicMetadata(_message.Message): ) -> None: ... class ServiceForTransport(_message.Message): - __slots__ = ("clients",) + __slots__ = ("clients", "api_version") class ClientsEntry(_message.Message): __slots__ = ("key", "value") @@ -61,9 +61,13 @@ class GapicMetadata(_message.Message): value: _Optional[_Union[GapicMetadata.ServiceAsClient, _Mapping]] = ..., ) -> None: ... CLIENTS_FIELD_NUMBER: _ClassVar[int] + API_VERSION_FIELD_NUMBER: _ClassVar[int] clients: _containers.MessageMap[str, GapicMetadata.ServiceAsClient] + api_version: str def __init__( - self, clients: _Optional[_Mapping[str, GapicMetadata.ServiceAsClient]] = ... + self, + clients: _Optional[_Mapping[str, GapicMetadata.ServiceAsClient]] = ..., + api_version: _Optional[str] = ..., ) -> None: ... class ServiceAsClient(_message.Message): From a2ebc4b44f92adebdf9aeb6b255e77a5e7c3b710 Mon Sep 17 00:00:00 2001 From: Anthonios Partheniou Date: Tue, 4 Nov 2025 14:42:17 +0000 Subject: [PATCH 3/3] chore: remove google/gapic/metadata from state.yaml --- .librarian/state.yaml | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/.librarian/state.yaml b/.librarian/state.yaml index fd0f18b6eedc..1a0cd56fbc2c 100644 --- a/.librarian/state.yaml +++ b/.librarian/state.yaml @@ -4680,8 +4680,6 @@ libraries: service_config: serviceconfig.yaml - path: google/cloud/location service_config: cloud.yaml - - path: google/gapic/metadata - service_config: "" - path: google/logging/type service_config: "" - path: google/rpc @@ -4694,7 +4692,7 @@ libraries: - packages/googleapis-common-protos preserve_regex: [] remove_regex: - - ^packages/googleapis-common-protos/google/(?:api|cloud|gapic|rpc|type)/.*/.*_pb2\.(?:py|pyi)$/ + - ^packages/googleapis-common-protos/google/(?:api|cloud|rpc|type)/.*/.*_pb2\.(?:py|pyi)$/ tag_format: '{id}-v{version}' - id: grafeas version: 1.16.0