googleapis-common-protos-types 1.22.0 → 1.24.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (63) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +12 -0
  3. data/lib/google/api/annotations_pb.rb +24 -2
  4. data/lib/google/api/auth_pb.rb +25 -3
  5. data/lib/google/api/backend_pb.rb +36 -4
  6. data/lib/google/api/billing_pb.rb +24 -3
  7. data/lib/google/api/client_pb.rb +194 -56
  8. data/lib/google/api/config_change_pb.rb +24 -3
  9. data/lib/google/api/consumer_pb.rb +23 -2
  10. data/lib/google/api/context_pb.rb +24 -3
  11. data/lib/google/api/control_pb.rb +27 -5
  12. data/lib/google/api/distribution_pb.rb +26 -3
  13. data/lib/google/api/documentation_pb.rb +24 -3
  14. data/lib/google/api/endpoint_pb.rb +24 -3
  15. data/lib/google/api/error_reason_pb.rb +210 -4
  16. data/lib/google/api/field_behavior_pb.rb +24 -3
  17. data/lib/google/api/field_info_pb.rb +24 -3
  18. data/lib/google/api/http_pb.rb +24 -3
  19. data/lib/google/api/httpbody_pb.rb +25 -3
  20. data/lib/google/api/label_pb.rb +24 -3
  21. data/lib/google/api/launch_stage_pb.rb +24 -3
  22. data/lib/google/api/log_pb.rb +25 -3
  23. data/lib/google/api/logging_pb.rb +24 -3
  24. data/lib/google/api/metric_pb.rb +26 -3
  25. data/lib/google/api/monitored_resource_pb.rb +26 -3
  26. data/lib/google/api/monitoring_pb.rb +24 -3
  27. data/lib/google/api/policy_pb.rb +24 -3
  28. data/lib/google/api/quota_pb.rb +24 -3
  29. data/lib/google/api/resource_pb.rb +24 -3
  30. data/lib/google/api/routing_pb.rb +31 -6
  31. data/lib/google/api/service_pb.rb +46 -5
  32. data/lib/google/api/source_info_pb.rb +25 -3
  33. data/lib/google/api/system_parameter_pb.rb +24 -3
  34. data/lib/google/api/usage_pb.rb +30 -29
  35. data/lib/google/api/visibility_pb.rb +24 -3
  36. data/lib/google/logging/type/http_request_pb.rb +24 -2
  37. data/lib/google/logging/type/log_severity_pb.rb +23 -2
  38. data/lib/google/longrunning/operations_pb.rb +26 -2
  39. data/lib/google/rpc/code_pb.rb +24 -3
  40. data/lib/google/rpc/context/attribute_context_pb.rb +35 -5
  41. data/lib/google/rpc/context/audit_context_pb.rb +25 -3
  42. data/lib/google/rpc/error_details_pb.rb +29 -7
  43. data/lib/google/rpc/http_pb.rb +24 -3
  44. data/lib/google/rpc/status_pb.rb +26 -5
  45. data/lib/google/type/calendar_period_pb.rb +24 -3
  46. data/lib/google/type/color_pb.rb +34 -13
  47. data/lib/google/type/date_pb.rb +35 -12
  48. data/lib/google/type/datetime_pb.rb +42 -20
  49. data/lib/google/type/dayofweek_pb.rb +24 -3
  50. data/lib/google/type/decimal_pb.rb +35 -16
  51. data/lib/google/type/expr_pb.rb +24 -3
  52. data/lib/google/type/fraction_pb.rb +24 -3
  53. data/lib/google/type/interval_pb.rb +26 -5
  54. data/lib/google/type/latlng_pb.rb +28 -8
  55. data/lib/google/type/localized_text_pb.rb +27 -6
  56. data/lib/google/type/money_pb.rb +25 -5
  57. data/lib/google/type/month_pb.rb +24 -3
  58. data/lib/google/type/phone_number_pb.rb +44 -18
  59. data/lib/google/type/postal_address_pb.rb +63 -42
  60. data/lib/google/type/quaternion_pb.rb +28 -7
  61. data/lib/google/type/timeofday_pb.rb +35 -11
  62. data/lib/googleapis/common/protos/types/version.rb +1 -1
  63. metadata +2 -2
@@ -9,8 +9,30 @@ require 'google/protobuf/any_pb'
9
9
 
10
10
  descriptor_data = "\n\x19google/api/httpbody.proto\x12\ngoogle.api\x1a\x19google/protobuf/any.proto\"X\n\x08HttpBody\x12\x14\n\x0c\x63ontent_type\x18\x01 \x01(\t\x12\x0c\n\x04\x64\x61ta\x18\x02 \x01(\x0c\x12(\n\nextensions\x18\x03 \x03(\x0b\x32\x14.google.protobuf.AnyBe\n\x0e\x63om.google.apiB\rHttpBodyProtoP\x01Z;google.golang.org/genproto/googleapis/api/httpbody;httpbody\xa2\x02\x04GAPIb\x06proto3"
11
11
 
12
- pool = ::Google::Protobuf::DescriptorPool.generated_pool
13
- pool.add_serialized_file(descriptor_data)
12
+ pool = Google::Protobuf::DescriptorPool.generated_pool
13
+
14
+ begin
15
+ pool.add_serialized_file(descriptor_data)
16
+ rescue TypeError
17
+ # Compatibility code: will be removed in the next major version.
18
+ require 'google/protobuf/descriptor_pb'
19
+ parsed = Google::Protobuf::FileDescriptorProto.decode(descriptor_data)
20
+ parsed.clear_dependency
21
+ serialized = parsed.class.encode(parsed)
22
+ file = pool.add_serialized_file(serialized)
23
+ warn "Warning: Protobuf detected an import path issue while loading generated file #{__FILE__}"
24
+ imports = [
25
+ ["google.protobuf.Any", "google/protobuf/any.proto"],
26
+ ]
27
+ imports.each do |type_name, expected_filename|
28
+ import_file = pool.lookup(type_name).file_descriptor
29
+ if import_file.name != expected_filename
30
+ warn "- #{file.name} imports #{expected_filename}, but that import was loaded as #{import_file.name}"
31
+ end
32
+ end
33
+ warn "Each proto file must use a consistent fully-qualified name."
34
+ warn "This will become an error in the next major version."
35
+ end
14
36
 
15
37
  module Google
16
38
  module Api
@@ -20,7 +42,7 @@ end
20
42
 
21
43
  #### Source proto file: google/api/httpbody.proto ####
22
44
  #
23
- # // Copyright 2025 Google LLC
45
+ # // Copyright 2026 Google LLC
24
46
  # //
25
47
  # // Licensed under the Apache License, Version 2.0 (the "License");
26
48
  # // you may not use this file except in compliance with the License.
@@ -7,8 +7,29 @@ require 'google/protobuf'
7
7
 
8
8
  descriptor_data = "\n\x16google/api/label.proto\x12\ngoogle.api\"\x9c\x01\n\x0fLabelDescriptor\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\x39\n\nvalue_type\x18\x02 \x01(\x0e\x32%.google.api.LabelDescriptor.ValueType\x12\x13\n\x0b\x64\x65scription\x18\x03 \x01(\t\",\n\tValueType\x12\n\n\x06STRING\x10\x00\x12\x08\n\x04\x42OOL\x10\x01\x12\t\n\x05INT64\x10\x02\x42\\\n\x0e\x63om.google.apiB\nLabelProtoP\x01Z5google.golang.org/genproto/googleapis/api/label;label\xa2\x02\x04GAPIb\x06proto3"
9
9
 
10
- pool = ::Google::Protobuf::DescriptorPool.generated_pool
11
- pool.add_serialized_file(descriptor_data)
10
+ pool = Google::Protobuf::DescriptorPool.generated_pool
11
+
12
+ begin
13
+ pool.add_serialized_file(descriptor_data)
14
+ rescue TypeError
15
+ # Compatibility code: will be removed in the next major version.
16
+ require 'google/protobuf/descriptor_pb'
17
+ parsed = Google::Protobuf::FileDescriptorProto.decode(descriptor_data)
18
+ parsed.clear_dependency
19
+ serialized = parsed.class.encode(parsed)
20
+ file = pool.add_serialized_file(serialized)
21
+ warn "Warning: Protobuf detected an import path issue while loading generated file #{__FILE__}"
22
+ imports = [
23
+ ]
24
+ imports.each do |type_name, expected_filename|
25
+ import_file = pool.lookup(type_name).file_descriptor
26
+ if import_file.name != expected_filename
27
+ warn "- #{file.name} imports #{expected_filename}, but that import was loaded as #{import_file.name}"
28
+ end
29
+ end
30
+ warn "Each proto file must use a consistent fully-qualified name."
31
+ warn "This will become an error in the next major version."
32
+ end
12
33
 
13
34
  module Google
14
35
  module Api
@@ -19,7 +40,7 @@ end
19
40
 
20
41
  #### Source proto file: google/api/label.proto ####
21
42
  #
22
- # // Copyright 2025 Google LLC
43
+ # // Copyright 2026 Google LLC
23
44
  # //
24
45
  # // Licensed under the Apache License, Version 2.0 (the "License");
25
46
  # // you may not use this file except in compliance with the License.
@@ -7,8 +7,29 @@ require 'google/protobuf'
7
7
 
8
8
  descriptor_data = "\n\x1dgoogle/api/launch_stage.proto\x12\ngoogle.api*\x8c\x01\n\x0bLaunchStage\x12\x1c\n\x18LAUNCH_STAGE_UNSPECIFIED\x10\x00\x12\x11\n\rUNIMPLEMENTED\x10\x06\x12\r\n\tPRELAUNCH\x10\x07\x12\x10\n\x0c\x45\x41RLY_ACCESS\x10\x01\x12\t\n\x05\x41LPHA\x10\x02\x12\x08\n\x04\x42\x45TA\x10\x03\x12\x06\n\x02GA\x10\x04\x12\x0e\n\nDEPRECATED\x10\x05\x42Z\n\x0e\x63om.google.apiB\x10LaunchStageProtoP\x01Z-google.golang.org/genproto/googleapis/api;api\xa2\x02\x04GAPIb\x06proto3"
9
9
 
10
- pool = ::Google::Protobuf::DescriptorPool.generated_pool
11
- pool.add_serialized_file(descriptor_data)
10
+ pool = Google::Protobuf::DescriptorPool.generated_pool
11
+
12
+ begin
13
+ pool.add_serialized_file(descriptor_data)
14
+ rescue TypeError
15
+ # Compatibility code: will be removed in the next major version.
16
+ require 'google/protobuf/descriptor_pb'
17
+ parsed = Google::Protobuf::FileDescriptorProto.decode(descriptor_data)
18
+ parsed.clear_dependency
19
+ serialized = parsed.class.encode(parsed)
20
+ file = pool.add_serialized_file(serialized)
21
+ warn "Warning: Protobuf detected an import path issue while loading generated file #{__FILE__}"
22
+ imports = [
23
+ ]
24
+ imports.each do |type_name, expected_filename|
25
+ import_file = pool.lookup(type_name).file_descriptor
26
+ if import_file.name != expected_filename
27
+ warn "- #{file.name} imports #{expected_filename}, but that import was loaded as #{import_file.name}"
28
+ end
29
+ end
30
+ warn "Each proto file must use a consistent fully-qualified name."
31
+ warn "This will become an error in the next major version."
32
+ end
12
33
 
13
34
  module Google
14
35
  module Api
@@ -18,7 +39,7 @@ end
18
39
 
19
40
  #### Source proto file: google/api/launch_stage.proto ####
20
41
  #
21
- # // Copyright 2025 Google LLC
42
+ # // Copyright 2026 Google LLC
22
43
  # //
23
44
  # // Licensed under the Apache License, Version 2.0 (the "License");
24
45
  # // you may not use this file except in compliance with the License.
@@ -9,8 +9,30 @@ require 'google/api/label_pb'
9
9
 
10
10
  descriptor_data = "\n\x14google/api/log.proto\x12\ngoogle.api\x1a\x16google/api/label.proto\"u\n\rLogDescriptor\x12\x0c\n\x04name\x18\x01 \x01(\t\x12+\n\x06labels\x18\x02 \x03(\x0b\x32\x1b.google.api.LabelDescriptor\x12\x13\n\x0b\x64\x65scription\x18\x03 \x01(\t\x12\x14\n\x0c\x64isplay_name\x18\x04 \x01(\tBj\n\x0e\x63om.google.apiB\x08LogProtoP\x01ZEgoogle.golang.org/genproto/googleapis/api/serviceconfig;serviceconfig\xa2\x02\x04GAPIb\x06proto3"
11
11
 
12
- pool = ::Google::Protobuf::DescriptorPool.generated_pool
13
- pool.add_serialized_file(descriptor_data)
12
+ pool = Google::Protobuf::DescriptorPool.generated_pool
13
+
14
+ begin
15
+ pool.add_serialized_file(descriptor_data)
16
+ rescue TypeError
17
+ # Compatibility code: will be removed in the next major version.
18
+ require 'google/protobuf/descriptor_pb'
19
+ parsed = Google::Protobuf::FileDescriptorProto.decode(descriptor_data)
20
+ parsed.clear_dependency
21
+ serialized = parsed.class.encode(parsed)
22
+ file = pool.add_serialized_file(serialized)
23
+ warn "Warning: Protobuf detected an import path issue while loading generated file #{__FILE__}"
24
+ imports = [
25
+ ["google.api.LabelDescriptor", "google/api/label.proto"],
26
+ ]
27
+ imports.each do |type_name, expected_filename|
28
+ import_file = pool.lookup(type_name).file_descriptor
29
+ if import_file.name != expected_filename
30
+ warn "- #{file.name} imports #{expected_filename}, but that import was loaded as #{import_file.name}"
31
+ end
32
+ end
33
+ warn "Each proto file must use a consistent fully-qualified name."
34
+ warn "This will become an error in the next major version."
35
+ end
14
36
 
15
37
  module Google
16
38
  module Api
@@ -20,7 +42,7 @@ end
20
42
 
21
43
  #### Source proto file: google/api/log.proto ####
22
44
  #
23
- # // Copyright 2025 Google LLC
45
+ # // Copyright 2026 Google LLC
24
46
  # //
25
47
  # // Licensed under the Apache License, Version 2.0 (the "License");
26
48
  # // you may not use this file except in compliance with the License.
@@ -7,8 +7,29 @@ require 'google/protobuf'
7
7
 
8
8
  descriptor_data = "\n\x18google/api/logging.proto\x12\ngoogle.api\"\xd7\x01\n\x07Logging\x12\x45\n\x15producer_destinations\x18\x01 \x03(\x0b\x32&.google.api.Logging.LoggingDestination\x12\x45\n\x15\x63onsumer_destinations\x18\x02 \x03(\x0b\x32&.google.api.Logging.LoggingDestination\x1a>\n\x12LoggingDestination\x12\x1a\n\x12monitored_resource\x18\x03 \x01(\t\x12\x0c\n\x04logs\x18\x01 \x03(\tBn\n\x0e\x63om.google.apiB\x0cLoggingProtoP\x01ZEgoogle.golang.org/genproto/googleapis/api/serviceconfig;serviceconfig\xa2\x02\x04GAPIb\x06proto3"
9
9
 
10
- pool = ::Google::Protobuf::DescriptorPool.generated_pool
11
- pool.add_serialized_file(descriptor_data)
10
+ pool = Google::Protobuf::DescriptorPool.generated_pool
11
+
12
+ begin
13
+ pool.add_serialized_file(descriptor_data)
14
+ rescue TypeError
15
+ # Compatibility code: will be removed in the next major version.
16
+ require 'google/protobuf/descriptor_pb'
17
+ parsed = Google::Protobuf::FileDescriptorProto.decode(descriptor_data)
18
+ parsed.clear_dependency
19
+ serialized = parsed.class.encode(parsed)
20
+ file = pool.add_serialized_file(serialized)
21
+ warn "Warning: Protobuf detected an import path issue while loading generated file #{__FILE__}"
22
+ imports = [
23
+ ]
24
+ imports.each do |type_name, expected_filename|
25
+ import_file = pool.lookup(type_name).file_descriptor
26
+ if import_file.name != expected_filename
27
+ warn "- #{file.name} imports #{expected_filename}, but that import was loaded as #{import_file.name}"
28
+ end
29
+ end
30
+ warn "Each proto file must use a consistent fully-qualified name."
31
+ warn "This will become an error in the next major version."
32
+ end
12
33
 
13
34
  module Google
14
35
  module Api
@@ -19,7 +40,7 @@ end
19
40
 
20
41
  #### Source proto file: google/api/logging.proto ####
21
42
  #
22
- # // Copyright 2025 Google LLC
43
+ # // Copyright 2026 Google LLC
23
44
  # //
24
45
  # // Licensed under the Apache License, Version 2.0 (the "License");
25
46
  # // you may not use this file except in compliance with the License.
@@ -11,8 +11,31 @@ require 'google/protobuf/duration_pb'
11
11
 
12
12
  descriptor_data = "\n\x17google/api/metric.proto\x12\ngoogle.api\x1a\x16google/api/label.proto\x1a\x1dgoogle/api/launch_stage.proto\x1a\x1egoogle/protobuf/duration.proto\"\xac\x08\n\x10MetricDescriptor\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x0c\n\x04type\x18\x08 \x01(\t\x12+\n\x06labels\x18\x02 \x03(\x0b\x32\x1b.google.api.LabelDescriptor\x12<\n\x0bmetric_kind\x18\x03 \x01(\x0e\x32\'.google.api.MetricDescriptor.MetricKind\x12:\n\nvalue_type\x18\x04 \x01(\x0e\x32&.google.api.MetricDescriptor.ValueType\x12\x0c\n\x04unit\x18\x05 \x01(\t\x12\x13\n\x0b\x64\x65scription\x18\x06 \x01(\t\x12\x14\n\x0c\x64isplay_name\x18\x07 \x01(\t\x12G\n\x08metadata\x18\n \x01(\x0b\x32\x35.google.api.MetricDescriptor.MetricDescriptorMetadata\x12-\n\x0claunch_stage\x18\x0c \x01(\x0e\x32\x17.google.api.LaunchStage\x12 \n\x18monitored_resource_types\x18\r \x03(\t\x1a\xbd\x03\n\x18MetricDescriptorMetadata\x12\x31\n\x0claunch_stage\x18\x01 \x01(\x0e\x32\x17.google.api.LaunchStageB\x02\x18\x01\x12\x30\n\rsample_period\x18\x02 \x01(\x0b\x32\x19.google.protobuf.Duration\x12/\n\x0cingest_delay\x18\x03 \x01(\x0b\x32\x19.google.protobuf.Duration\x12\x84\x01\n$time_series_resource_hierarchy_level\x18\x04 \x03(\x0e\x32V.google.api.MetricDescriptor.MetricDescriptorMetadata.TimeSeriesResourceHierarchyLevel\"\x83\x01\n TimeSeriesResourceHierarchyLevel\x12\x34\n0TIME_SERIES_RESOURCE_HIERARCHY_LEVEL_UNSPECIFIED\x10\x00\x12\x0b\n\x07PROJECT\x10\x01\x12\x10\n\x0cORGANIZATION\x10\x02\x12\n\n\x06\x46OLDER\x10\x03\"O\n\nMetricKind\x12\x1b\n\x17METRIC_KIND_UNSPECIFIED\x10\x00\x12\t\n\x05GAUGE\x10\x01\x12\t\n\x05\x44\x45LTA\x10\x02\x12\x0e\n\nCUMULATIVE\x10\x03\"q\n\tValueType\x12\x1a\n\x16VALUE_TYPE_UNSPECIFIED\x10\x00\x12\x08\n\x04\x42OOL\x10\x01\x12\t\n\x05INT64\x10\x02\x12\n\n\x06\x44OUBLE\x10\x03\x12\n\n\x06STRING\x10\x04\x12\x10\n\x0c\x44ISTRIBUTION\x10\x05\x12\t\n\x05MONEY\x10\x06\"u\n\x06Metric\x12\x0c\n\x04type\x18\x03 \x01(\t\x12.\n\x06labels\x18\x02 \x03(\x0b\x32\x1e.google.api.Metric.LabelsEntry\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x42_\n\x0e\x63om.google.apiB\x0bMetricProtoP\x01Z7google.golang.org/genproto/googleapis/api/metric;metric\xa2\x02\x04GAPIb\x06proto3"
13
13
 
14
- pool = ::Google::Protobuf::DescriptorPool.generated_pool
15
- pool.add_serialized_file(descriptor_data)
14
+ pool = Google::Protobuf::DescriptorPool.generated_pool
15
+
16
+ begin
17
+ pool.add_serialized_file(descriptor_data)
18
+ rescue TypeError
19
+ # Compatibility code: will be removed in the next major version.
20
+ require 'google/protobuf/descriptor_pb'
21
+ parsed = Google::Protobuf::FileDescriptorProto.decode(descriptor_data)
22
+ parsed.clear_dependency
23
+ serialized = parsed.class.encode(parsed)
24
+ file = pool.add_serialized_file(serialized)
25
+ warn "Warning: Protobuf detected an import path issue while loading generated file #{__FILE__}"
26
+ imports = [
27
+ ["google.api.LabelDescriptor", "google/api/label.proto"],
28
+ ["google.protobuf.Duration", "google/protobuf/duration.proto"],
29
+ ]
30
+ imports.each do |type_name, expected_filename|
31
+ import_file = pool.lookup(type_name).file_descriptor
32
+ if import_file.name != expected_filename
33
+ warn "- #{file.name} imports #{expected_filename}, but that import was loaded as #{import_file.name}"
34
+ end
35
+ end
36
+ warn "Each proto file must use a consistent fully-qualified name."
37
+ warn "This will become an error in the next major version."
38
+ end
16
39
 
17
40
  module Google
18
41
  module Api
@@ -27,7 +50,7 @@ end
27
50
 
28
51
  #### Source proto file: google/api/metric.proto ####
29
52
  #
30
- # // Copyright 2025 Google LLC
53
+ # // Copyright 2026 Google LLC
31
54
  # //
32
55
  # // Licensed under the Apache License, Version 2.0 (the "License");
33
56
  # // you may not use this file except in compliance with the License.
@@ -11,8 +11,31 @@ require 'google/protobuf/struct_pb'
11
11
 
12
12
  descriptor_data = "\n#google/api/monitored_resource.proto\x12\ngoogle.api\x1a\x16google/api/label.proto\x1a\x1dgoogle/api/launch_stage.proto\x1a\x1cgoogle/protobuf/struct.proto\"\xc0\x01\n\x1bMonitoredResourceDescriptor\x12\x0c\n\x04name\x18\x05 \x01(\t\x12\x0c\n\x04type\x18\x01 \x01(\t\x12\x14\n\x0c\x64isplay_name\x18\x02 \x01(\t\x12\x13\n\x0b\x64\x65scription\x18\x03 \x01(\t\x12+\n\x06labels\x18\x04 \x03(\x0b\x32\x1b.google.api.LabelDescriptor\x12-\n\x0claunch_stage\x18\x07 \x01(\x0e\x32\x17.google.api.LaunchStage\"\x8b\x01\n\x11MonitoredResource\x12\x0c\n\x04type\x18\x01 \x01(\t\x12\x39\n\x06labels\x18\x02 \x03(\x0b\x32).google.api.MonitoredResource.LabelsEntry\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"\xca\x01\n\x19MonitoredResourceMetadata\x12.\n\rsystem_labels\x18\x01 \x01(\x0b\x32\x17.google.protobuf.Struct\x12J\n\x0buser_labels\x18\x02 \x03(\x0b\x32\x35.google.api.MonitoredResourceMetadata.UserLabelsEntry\x1a\x31\n\x0fUserLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x42v\n\x0e\x63om.google.apiB\x16MonitoredResourceProtoP\x01ZCgoogle.golang.org/genproto/googleapis/api/monitoredres;monitoredres\xa2\x02\x04GAPIb\x06proto3"
13
13
 
14
- pool = ::Google::Protobuf::DescriptorPool.generated_pool
15
- pool.add_serialized_file(descriptor_data)
14
+ pool = Google::Protobuf::DescriptorPool.generated_pool
15
+
16
+ begin
17
+ pool.add_serialized_file(descriptor_data)
18
+ rescue TypeError
19
+ # Compatibility code: will be removed in the next major version.
20
+ require 'google/protobuf/descriptor_pb'
21
+ parsed = Google::Protobuf::FileDescriptorProto.decode(descriptor_data)
22
+ parsed.clear_dependency
23
+ serialized = parsed.class.encode(parsed)
24
+ file = pool.add_serialized_file(serialized)
25
+ warn "Warning: Protobuf detected an import path issue while loading generated file #{__FILE__}"
26
+ imports = [
27
+ ["google.api.LabelDescriptor", "google/api/label.proto"],
28
+ ["google.protobuf.Struct", "google/protobuf/struct.proto"],
29
+ ]
30
+ imports.each do |type_name, expected_filename|
31
+ import_file = pool.lookup(type_name).file_descriptor
32
+ if import_file.name != expected_filename
33
+ warn "- #{file.name} imports #{expected_filename}, but that import was loaded as #{import_file.name}"
34
+ end
35
+ end
36
+ warn "Each proto file must use a consistent fully-qualified name."
37
+ warn "This will become an error in the next major version."
38
+ end
16
39
 
17
40
  module Google
18
41
  module Api
@@ -24,7 +47,7 @@ end
24
47
 
25
48
  #### Source proto file: google/api/monitored_resource.proto ####
26
49
  #
27
- # // Copyright 2025 Google LLC
50
+ # // Copyright 2026 Google LLC
28
51
  # //
29
52
  # // Licensed under the Apache License, Version 2.0 (the "License");
30
53
  # // you may not use this file except in compliance with the License.
@@ -7,8 +7,29 @@ require 'google/protobuf'
7
7
 
8
8
  descriptor_data = "\n\x1bgoogle/api/monitoring.proto\x12\ngoogle.api\"\xec\x01\n\nMonitoring\x12K\n\x15producer_destinations\x18\x01 \x03(\x0b\x32,.google.api.Monitoring.MonitoringDestination\x12K\n\x15\x63onsumer_destinations\x18\x02 \x03(\x0b\x32,.google.api.Monitoring.MonitoringDestination\x1a\x44\n\x15MonitoringDestination\x12\x1a\n\x12monitored_resource\x18\x01 \x01(\t\x12\x0f\n\x07metrics\x18\x02 \x03(\tBq\n\x0e\x63om.google.apiB\x0fMonitoringProtoP\x01ZEgoogle.golang.org/genproto/googleapis/api/serviceconfig;serviceconfig\xa2\x02\x04GAPIb\x06proto3"
9
9
 
10
- pool = ::Google::Protobuf::DescriptorPool.generated_pool
11
- pool.add_serialized_file(descriptor_data)
10
+ pool = Google::Protobuf::DescriptorPool.generated_pool
11
+
12
+ begin
13
+ pool.add_serialized_file(descriptor_data)
14
+ rescue TypeError
15
+ # Compatibility code: will be removed in the next major version.
16
+ require 'google/protobuf/descriptor_pb'
17
+ parsed = Google::Protobuf::FileDescriptorProto.decode(descriptor_data)
18
+ parsed.clear_dependency
19
+ serialized = parsed.class.encode(parsed)
20
+ file = pool.add_serialized_file(serialized)
21
+ warn "Warning: Protobuf detected an import path issue while loading generated file #{__FILE__}"
22
+ imports = [
23
+ ]
24
+ imports.each do |type_name, expected_filename|
25
+ import_file = pool.lookup(type_name).file_descriptor
26
+ if import_file.name != expected_filename
27
+ warn "- #{file.name} imports #{expected_filename}, but that import was loaded as #{import_file.name}"
28
+ end
29
+ end
30
+ warn "Each proto file must use a consistent fully-qualified name."
31
+ warn "This will become an error in the next major version."
32
+ end
12
33
 
13
34
  module Google
14
35
  module Api
@@ -19,7 +40,7 @@ end
19
40
 
20
41
  #### Source proto file: google/api/monitoring.proto ####
21
42
  #
22
- # // Copyright 2025 Google LLC
43
+ # // Copyright 2026 Google LLC
23
44
  # //
24
45
  # // Licensed under the Apache License, Version 2.0 (the "License");
25
46
  # // you may not use this file except in compliance with the License.
@@ -9,8 +9,29 @@ require 'google/protobuf/descriptor_pb'
9
9
 
10
10
  descriptor_data = "\n\x17google/api/policy.proto\x12\ngoogle.api\x1a google/protobuf/descriptor.proto\"S\n\x0b\x46ieldPolicy\x12\x10\n\x08selector\x18\x01 \x01(\t\x12\x1b\n\x13resource_permission\x18\x02 \x01(\t\x12\x15\n\rresource_type\x18\x03 \x01(\t\"S\n\x0cMethodPolicy\x12\x10\n\x08selector\x18\t \x01(\t\x12\x31\n\x10request_policies\x18\x02 \x03(\x0b\x32\x17.google.api.FieldPolicy:O\n\x0c\x66ield_policy\x12\x1d.google.protobuf.FieldOptions\x18\xe8\xce\xc1K \x01(\x0b\x32\x17.google.api.FieldPolicy:R\n\rmethod_policy\x12\x1e.google.protobuf.MethodOptions\x18\xb5\x97\x99M \x01(\x0b\x32\x18.google.api.MethodPolicyBm\n\x0e\x63om.google.apiB\x0bPolicyProtoP\x01ZEgoogle.golang.org/genproto/googleapis/api/serviceconfig;serviceconfig\xa2\x02\x04GAPIb\x06proto3"
11
11
 
12
- pool = ::Google::Protobuf::DescriptorPool.generated_pool
13
- pool.add_serialized_file(descriptor_data)
12
+ pool = Google::Protobuf::DescriptorPool.generated_pool
13
+
14
+ begin
15
+ pool.add_serialized_file(descriptor_data)
16
+ rescue TypeError
17
+ # Compatibility code: will be removed in the next major version.
18
+ require 'google/protobuf/descriptor_pb'
19
+ parsed = Google::Protobuf::FileDescriptorProto.decode(descriptor_data)
20
+ parsed.clear_dependency
21
+ serialized = parsed.class.encode(parsed)
22
+ file = pool.add_serialized_file(serialized)
23
+ warn "Warning: Protobuf detected an import path issue while loading generated file #{__FILE__}"
24
+ imports = [
25
+ ]
26
+ imports.each do |type_name, expected_filename|
27
+ import_file = pool.lookup(type_name).file_descriptor
28
+ if import_file.name != expected_filename
29
+ warn "- #{file.name} imports #{expected_filename}, but that import was loaded as #{import_file.name}"
30
+ end
31
+ end
32
+ warn "Each proto file must use a consistent fully-qualified name."
33
+ warn "This will become an error in the next major version."
34
+ end
14
35
 
15
36
  module Google
16
37
  module Api
@@ -21,7 +42,7 @@ end
21
42
 
22
43
  #### Source proto file: google/api/policy.proto ####
23
44
  #
24
- # // Copyright 2025 Google LLC
45
+ # // Copyright 2026 Google LLC
25
46
  # //
26
47
  # // Licensed under the Apache License, Version 2.0 (the "License");
27
48
  # // you may not use this file except in compliance with the License.
@@ -7,8 +7,29 @@ require 'google/protobuf'
7
7
 
8
8
  descriptor_data = "\n\x16google/api/quota.proto\x12\ngoogle.api\"]\n\x05Quota\x12&\n\x06limits\x18\x03 \x03(\x0b\x32\x16.google.api.QuotaLimit\x12,\n\x0cmetric_rules\x18\x04 \x03(\x0b\x32\x16.google.api.MetricRule\"\x91\x01\n\nMetricRule\x12\x10\n\x08selector\x18\x01 \x01(\t\x12=\n\x0cmetric_costs\x18\x02 \x03(\x0b\x32\'.google.api.MetricRule.MetricCostsEntry\x1a\x32\n\x10MetricCostsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\x03:\x02\x38\x01\"\x95\x02\n\nQuotaLimit\x12\x0c\n\x04name\x18\x06 \x01(\t\x12\x13\n\x0b\x64\x65scription\x18\x02 \x01(\t\x12\x15\n\rdefault_limit\x18\x03 \x01(\x03\x12\x11\n\tmax_limit\x18\x04 \x01(\x03\x12\x11\n\tfree_tier\x18\x07 \x01(\x03\x12\x10\n\x08\x64uration\x18\x05 \x01(\t\x12\x0e\n\x06metric\x18\x08 \x01(\t\x12\x0c\n\x04unit\x18\t \x01(\t\x12\x32\n\x06values\x18\n \x03(\x0b\x32\".google.api.QuotaLimit.ValuesEntry\x12\x14\n\x0c\x64isplay_name\x18\x0c \x01(\t\x1a-\n\x0bValuesEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\x03:\x02\x38\x01\x42l\n\x0e\x63om.google.apiB\nQuotaProtoP\x01ZEgoogle.golang.org/genproto/googleapis/api/serviceconfig;serviceconfig\xa2\x02\x04GAPIb\x06proto3"
9
9
 
10
- pool = ::Google::Protobuf::DescriptorPool.generated_pool
11
- pool.add_serialized_file(descriptor_data)
10
+ pool = Google::Protobuf::DescriptorPool.generated_pool
11
+
12
+ begin
13
+ pool.add_serialized_file(descriptor_data)
14
+ rescue TypeError
15
+ # Compatibility code: will be removed in the next major version.
16
+ require 'google/protobuf/descriptor_pb'
17
+ parsed = Google::Protobuf::FileDescriptorProto.decode(descriptor_data)
18
+ parsed.clear_dependency
19
+ serialized = parsed.class.encode(parsed)
20
+ file = pool.add_serialized_file(serialized)
21
+ warn "Warning: Protobuf detected an import path issue while loading generated file #{__FILE__}"
22
+ imports = [
23
+ ]
24
+ imports.each do |type_name, expected_filename|
25
+ import_file = pool.lookup(type_name).file_descriptor
26
+ if import_file.name != expected_filename
27
+ warn "- #{file.name} imports #{expected_filename}, but that import was loaded as #{import_file.name}"
28
+ end
29
+ end
30
+ warn "Each proto file must use a consistent fully-qualified name."
31
+ warn "This will become an error in the next major version."
32
+ end
12
33
 
13
34
  module Google
14
35
  module Api
@@ -20,7 +41,7 @@ end
20
41
 
21
42
  #### Source proto file: google/api/quota.proto ####
22
43
  #
23
- # // Copyright 2025 Google LLC
44
+ # // Copyright 2026 Google LLC
24
45
  # //
25
46
  # // Licensed under the Apache License, Version 2.0 (the "License");
26
47
  # // you may not use this file except in compliance with the License.
@@ -9,8 +9,29 @@ require 'google/protobuf/descriptor_pb'
9
9
 
10
10
  descriptor_data = "\n\x19google/api/resource.proto\x12\ngoogle.api\x1a google/protobuf/descriptor.proto\"\xee\x02\n\x12ResourceDescriptor\x12\x0c\n\x04type\x18\x01 \x01(\t\x12\x0f\n\x07pattern\x18\x02 \x03(\t\x12\x12\n\nname_field\x18\x03 \x01(\t\x12\x37\n\x07history\x18\x04 \x01(\x0e\x32&.google.api.ResourceDescriptor.History\x12\x0e\n\x06plural\x18\x05 \x01(\t\x12\x10\n\x08singular\x18\x06 \x01(\t\x12\x33\n\x05style\x18\n \x03(\x0e\x32$.google.api.ResourceDescriptor.Style\"[\n\x07History\x12\x17\n\x13HISTORY_UNSPECIFIED\x10\x00\x12\x1d\n\x19ORIGINALLY_SINGLE_PATTERN\x10\x01\x12\x18\n\x14\x46UTURE_MULTI_PATTERN\x10\x02\"8\n\x05Style\x12\x15\n\x11STYLE_UNSPECIFIED\x10\x00\x12\x18\n\x14\x44\x45\x43LARATIVE_FRIENDLY\x10\x01\"5\n\x11ResourceReference\x12\x0c\n\x04type\x18\x01 \x01(\t\x12\x12\n\nchild_type\x18\x02 \x01(\t:Y\n\x12resource_reference\x12\x1d.google.protobuf.FieldOptions\x18\x9f\x08 \x01(\x0b\x32\x1d.google.api.ResourceReference:Z\n\x13resource_definition\x12\x1c.google.protobuf.FileOptions\x18\x9d\x08 \x03(\x0b\x32\x1e.google.api.ResourceDescriptor:R\n\x08resource\x12\x1f.google.protobuf.MessageOptions\x18\x9d\x08 \x01(\x0b\x32\x1e.google.api.ResourceDescriptorBk\n\x0e\x63om.google.apiB\rResourceProtoP\x01ZAgoogle.golang.org/genproto/googleapis/api/annotations;annotations\xa2\x02\x04GAPIb\x06proto3"
11
11
 
12
- pool = ::Google::Protobuf::DescriptorPool.generated_pool
13
- pool.add_serialized_file(descriptor_data)
12
+ pool = Google::Protobuf::DescriptorPool.generated_pool
13
+
14
+ begin
15
+ pool.add_serialized_file(descriptor_data)
16
+ rescue TypeError
17
+ # Compatibility code: will be removed in the next major version.
18
+ require 'google/protobuf/descriptor_pb'
19
+ parsed = Google::Protobuf::FileDescriptorProto.decode(descriptor_data)
20
+ parsed.clear_dependency
21
+ serialized = parsed.class.encode(parsed)
22
+ file = pool.add_serialized_file(serialized)
23
+ warn "Warning: Protobuf detected an import path issue while loading generated file #{__FILE__}"
24
+ imports = [
25
+ ]
26
+ imports.each do |type_name, expected_filename|
27
+ import_file = pool.lookup(type_name).file_descriptor
28
+ if import_file.name != expected_filename
29
+ warn "- #{file.name} imports #{expected_filename}, but that import was loaded as #{import_file.name}"
30
+ end
31
+ end
32
+ warn "Each proto file must use a consistent fully-qualified name."
33
+ warn "This will become an error in the next major version."
34
+ end
14
35
 
15
36
  module Google
16
37
  module Api
@@ -23,7 +44,7 @@ end
23
44
 
24
45
  #### Source proto file: google/api/resource.proto ####
25
46
  #
26
- # // Copyright 2025 Google LLC
47
+ # // Copyright 2026 Google LLC
27
48
  # //
28
49
  # // Licensed under the Apache License, Version 2.0 (the "License");
29
50
  # // you may not use this file except in compliance with the License.
@@ -9,8 +9,29 @@ require 'google/protobuf/descriptor_pb'
9
9
 
10
10
  descriptor_data = "\n\x18google/api/routing.proto\x12\ngoogle.api\x1a google/protobuf/descriptor.proto\"G\n\x0bRoutingRule\x12\x38\n\x12routing_parameters\x18\x02 \x03(\x0b\x32\x1c.google.api.RoutingParameter\"8\n\x10RoutingParameter\x12\r\n\x05\x66ield\x18\x01 \x01(\t\x12\x15\n\rpath_template\x18\x02 \x01(\t:K\n\x07routing\x12\x1e.google.protobuf.MethodOptions\x18\xb1\xca\xbc\" \x01(\x0b\x32\x17.google.api.RoutingRuleBj\n\x0e\x63om.google.apiB\x0cRoutingProtoP\x01ZAgoogle.golang.org/genproto/googleapis/api/annotations;annotations\xa2\x02\x04GAPIb\x06proto3"
11
11
 
12
- pool = ::Google::Protobuf::DescriptorPool.generated_pool
13
- pool.add_serialized_file(descriptor_data)
12
+ pool = Google::Protobuf::DescriptorPool.generated_pool
13
+
14
+ begin
15
+ pool.add_serialized_file(descriptor_data)
16
+ rescue TypeError
17
+ # Compatibility code: will be removed in the next major version.
18
+ require 'google/protobuf/descriptor_pb'
19
+ parsed = Google::Protobuf::FileDescriptorProto.decode(descriptor_data)
20
+ parsed.clear_dependency
21
+ serialized = parsed.class.encode(parsed)
22
+ file = pool.add_serialized_file(serialized)
23
+ warn "Warning: Protobuf detected an import path issue while loading generated file #{__FILE__}"
24
+ imports = [
25
+ ]
26
+ imports.each do |type_name, expected_filename|
27
+ import_file = pool.lookup(type_name).file_descriptor
28
+ if import_file.name != expected_filename
29
+ warn "- #{file.name} imports #{expected_filename}, but that import was loaded as #{import_file.name}"
30
+ end
31
+ end
32
+ warn "Each proto file must use a consistent fully-qualified name."
33
+ warn "This will become an error in the next major version."
34
+ end
14
35
 
15
36
  module Google
16
37
  module Api
@@ -21,7 +42,7 @@ end
21
42
 
22
43
  #### Source proto file: google/api/routing.proto ####
23
44
  #
24
- # // Copyright 2025 Google LLC
45
+ # // Copyright 2026 Google LLC
25
46
  # //
26
47
  # // Licensed under the Apache License, Version 2.0 (the "License");
27
48
  # // you may not use this file except in compliance with the License.
@@ -82,9 +103,13 @@ end
82
103
  # // app_profile_id: profiles/prof_qux
83
104
  # // }
84
105
  # //
85
- # // The routing header consists of one or multiple key-value pairs. Every key
86
- # // and value must be percent-encoded, and joined together in the format of
87
- # // `key1=value1&key2=value2`.
106
+ # // The routing header consists of one or multiple key-value pairs. The order of
107
+ # // the key-value pairs is undefined, the order of the `routing_parameters` in
108
+ # // the `RoutingRule` only matters for the evaluation order of the path
109
+ # // templates when `field` is the same. See the examples below for more details.
110
+ # //
111
+ # // Every key and value in the routing header must be percent-encoded,
112
+ # // and joined together in the following format: `key1=value1&key2=value2`.
88
113
  # // The examples below skip the percent-encoding for readability.
89
114
  # //
90
115
  # // Example 1
@@ -29,8 +29,50 @@ require 'google/protobuf/wrappers_pb'
29
29
 
30
30
  descriptor_data = "\n\x18google/api/service.proto\x12\ngoogle.api\x1a\x15google/api/auth.proto\x1a\x18google/api/backend.proto\x1a\x18google/api/billing.proto\x1a\x17google/api/client.proto\x1a\x18google/api/context.proto\x1a\x18google/api/control.proto\x1a\x1egoogle/api/documentation.proto\x1a\x19google/api/endpoint.proto\x1a\x15google/api/http.proto\x1a\x14google/api/log.proto\x1a\x18google/api/logging.proto\x1a\x17google/api/metric.proto\x1a#google/api/monitored_resource.proto\x1a\x1bgoogle/api/monitoring.proto\x1a\x16google/api/quota.proto\x1a\x1cgoogle/api/source_info.proto\x1a!google/api/system_parameter.proto\x1a\x16google/api/usage.proto\x1a\x19google/protobuf/api.proto\x1a\x1agoogle/protobuf/type.proto\x1a\x1egoogle/protobuf/wrappers.proto\"\x82\x08\n\x07Service\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\r\n\x05title\x18\x02 \x01(\t\x12\x1b\n\x13producer_project_id\x18\x16 \x01(\t\x12\n\n\x02id\x18! \x01(\t\x12\"\n\x04\x61pis\x18\x03 \x03(\x0b\x32\x14.google.protobuf.Api\x12$\n\x05types\x18\x04 \x03(\x0b\x32\x15.google.protobuf.Type\x12$\n\x05\x65nums\x18\x05 \x03(\x0b\x32\x15.google.protobuf.Enum\x12\x30\n\rdocumentation\x18\x06 \x01(\x0b\x32\x19.google.api.Documentation\x12$\n\x07\x62\x61\x63kend\x18\x08 \x01(\x0b\x32\x13.google.api.Backend\x12\x1e\n\x04http\x18\t \x01(\x0b\x32\x10.google.api.Http\x12 \n\x05quota\x18\n \x01(\x0b\x32\x11.google.api.Quota\x12\x32\n\x0e\x61uthentication\x18\x0b \x01(\x0b\x32\x1a.google.api.Authentication\x12$\n\x07\x63ontext\x18\x0c \x01(\x0b\x32\x13.google.api.Context\x12 \n\x05usage\x18\x0f \x01(\x0b\x32\x11.google.api.Usage\x12\'\n\tendpoints\x18\x12 \x03(\x0b\x32\x14.google.api.Endpoint\x12$\n\x07\x63ontrol\x18\x15 \x01(\x0b\x32\x13.google.api.Control\x12\'\n\x04logs\x18\x17 \x03(\x0b\x32\x19.google.api.LogDescriptor\x12-\n\x07metrics\x18\x18 \x03(\x0b\x32\x1c.google.api.MetricDescriptor\x12\x44\n\x13monitored_resources\x18\x19 \x03(\x0b\x32\'.google.api.MonitoredResourceDescriptor\x12$\n\x07\x62illing\x18\x1a \x01(\x0b\x32\x13.google.api.Billing\x12$\n\x07logging\x18\x1b \x01(\x0b\x32\x13.google.api.Logging\x12*\n\nmonitoring\x18\x1c \x01(\x0b\x32\x16.google.api.Monitoring\x12\x37\n\x11system_parameters\x18\x1d \x01(\x0b\x32\x1c.google.api.SystemParameters\x12+\n\x0bsource_info\x18% \x01(\x0b\x32\x16.google.api.SourceInfo\x12*\n\npublishing\x18- \x01(\x0b\x32\x16.google.api.Publishing\x12\x34\n\x0e\x63onfig_version\x18\x14 \x01(\x0b\x32\x1c.google.protobuf.UInt32ValueBn\n\x0e\x63om.google.apiB\x0cServiceProtoP\x01ZEgoogle.golang.org/genproto/googleapis/api/serviceconfig;serviceconfig\xa2\x02\x04GAPIb\x06proto3"
31
31
 
32
- pool = ::Google::Protobuf::DescriptorPool.generated_pool
33
- pool.add_serialized_file(descriptor_data)
32
+ pool = Google::Protobuf::DescriptorPool.generated_pool
33
+
34
+ begin
35
+ pool.add_serialized_file(descriptor_data)
36
+ rescue TypeError
37
+ # Compatibility code: will be removed in the next major version.
38
+ require 'google/protobuf/descriptor_pb'
39
+ parsed = Google::Protobuf::FileDescriptorProto.decode(descriptor_data)
40
+ parsed.clear_dependency
41
+ serialized = parsed.class.encode(parsed)
42
+ file = pool.add_serialized_file(serialized)
43
+ warn "Warning: Protobuf detected an import path issue while loading generated file #{__FILE__}"
44
+ imports = [
45
+ ["google.protobuf.Api", "google/protobuf/api.proto"],
46
+ ["google.protobuf.Type", "google/protobuf/type.proto"],
47
+ ["google.api.Documentation", "google/api/documentation.proto"],
48
+ ["google.api.Backend", "google/api/backend.proto"],
49
+ ["google.api.Http", "google/api/http.proto"],
50
+ ["google.api.Quota", "google/api/quota.proto"],
51
+ ["google.api.Authentication", "google/api/auth.proto"],
52
+ ["google.api.Context", "google/api/context.proto"],
53
+ ["google.api.Usage", "google/api/usage.proto"],
54
+ ["google.api.Endpoint", "google/api/endpoint.proto"],
55
+ ["google.api.Control", "google/api/control.proto"],
56
+ ["google.api.LogDescriptor", "google/api/log.proto"],
57
+ ["google.api.MetricDescriptor", "google/api/metric.proto"],
58
+ ["google.api.MonitoredResourceDescriptor", "google/api/monitored_resource.proto"],
59
+ ["google.api.Billing", "google/api/billing.proto"],
60
+ ["google.api.Logging", "google/api/logging.proto"],
61
+ ["google.api.Monitoring", "google/api/monitoring.proto"],
62
+ ["google.api.SystemParameters", "google/api/system_parameter.proto"],
63
+ ["google.api.SourceInfo", "google/api/source_info.proto"],
64
+ ["google.api.Publishing", "google/api/client.proto"],
65
+ ["google.protobuf.UInt32Value", "google/protobuf/wrappers.proto"],
66
+ ]
67
+ imports.each do |type_name, expected_filename|
68
+ import_file = pool.lookup(type_name).file_descriptor
69
+ if import_file.name != expected_filename
70
+ warn "- #{file.name} imports #{expected_filename}, but that import was loaded as #{import_file.name}"
71
+ end
72
+ end
73
+ warn "Each proto file must use a consistent fully-qualified name."
74
+ warn "This will become an error in the next major version."
75
+ end
34
76
 
35
77
  module Google
36
78
  module Api
@@ -40,7 +82,7 @@ end
40
82
 
41
83
  #### Source proto file: google/api/service.proto ####
42
84
  #
43
- # // Copyright 2025 Google LLC
85
+ # // Copyright 2026 Google LLC
44
86
  # //
45
87
  # // Licensed under the Apache License, Version 2.0 (the "License");
46
88
  # // you may not use this file except in compliance with the License.
@@ -201,8 +243,7 @@ end
201
243
  # repeated MetricDescriptor metrics = 24;
202
244
  #
203
245
  # // Defines the monitored resources used by this service. This is required
204
- # // by the [Service.monitoring][google.api.Service.monitoring] and
205
- # // [Service.logging][google.api.Service.logging] configurations.
246
+ # // by the `Service.monitoring` and `Service.logging` configurations.
206
247
  # repeated MonitoredResourceDescriptor monitored_resources = 25;
207
248
  #
208
249
  # // Billing configuration.
@@ -9,8 +9,30 @@ require 'google/protobuf/any_pb'
9
9
 
10
10
  descriptor_data = "\n\x1cgoogle/api/source_info.proto\x12\ngoogle.api\x1a\x19google/protobuf/any.proto\"8\n\nSourceInfo\x12*\n\x0csource_files\x18\x01 \x03(\x0b\x32\x14.google.protobuf.AnyBq\n\x0e\x63om.google.apiB\x0fSourceInfoProtoP\x01ZEgoogle.golang.org/genproto/googleapis/api/serviceconfig;serviceconfig\xa2\x02\x04GAPIb\x06proto3"
11
11
 
12
- pool = ::Google::Protobuf::DescriptorPool.generated_pool
13
- pool.add_serialized_file(descriptor_data)
12
+ pool = Google::Protobuf::DescriptorPool.generated_pool
13
+
14
+ begin
15
+ pool.add_serialized_file(descriptor_data)
16
+ rescue TypeError
17
+ # Compatibility code: will be removed in the next major version.
18
+ require 'google/protobuf/descriptor_pb'
19
+ parsed = Google::Protobuf::FileDescriptorProto.decode(descriptor_data)
20
+ parsed.clear_dependency
21
+ serialized = parsed.class.encode(parsed)
22
+ file = pool.add_serialized_file(serialized)
23
+ warn "Warning: Protobuf detected an import path issue while loading generated file #{__FILE__}"
24
+ imports = [
25
+ ["google.protobuf.Any", "google/protobuf/any.proto"],
26
+ ]
27
+ imports.each do |type_name, expected_filename|
28
+ import_file = pool.lookup(type_name).file_descriptor
29
+ if import_file.name != expected_filename
30
+ warn "- #{file.name} imports #{expected_filename}, but that import was loaded as #{import_file.name}"
31
+ end
32
+ end
33
+ warn "Each proto file must use a consistent fully-qualified name."
34
+ warn "This will become an error in the next major version."
35
+ end
14
36
 
15
37
  module Google
16
38
  module Api
@@ -20,7 +42,7 @@ end
20
42
 
21
43
  #### Source proto file: google/api/source_info.proto ####
22
44
  #
23
- # // Copyright 2025 Google LLC
45
+ # // Copyright 2026 Google LLC
24
46
  # //
25
47
  # // Licensed under the Apache License, Version 2.0 (the "License");
26
48
  # // you may not use this file except in compliance with the License.