googleapis-common-protos-types 1.5.0 → 1.8.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 (62) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +24 -0
  3. data/lib/google/api/annotations_pb.rb +60 -2
  4. data/lib/google/api/auth_pb.rb +264 -34
  5. data/lib/google/api/backend_pb.rb +212 -22
  6. data/lib/google/api/billing_pb.rb +104 -8
  7. data/lib/google/api/client_pb.rb +422 -77
  8. data/lib/google/api/config_change_pb.rb +111 -17
  9. data/lib/google/api/consumer_pb.rb +109 -16
  10. data/lib/google/api/context_pb.rb +117 -11
  11. data/lib/google/api/control_pb.rb +71 -4
  12. data/lib/google/api/distribution_pb.rb +242 -39
  13. data/lib/google/api/documentation_pb.rb +195 -19
  14. data/lib/google/api/endpoint_pb.rb +100 -7
  15. data/lib/google/api/error_reason_pb.rb +597 -31
  16. data/lib/google/api/field_behavior_pb.rb +117 -11
  17. data/lib/google/api/http_pb.rb +406 -23
  18. data/lib/google/api/httpbody_pb.rb +109 -6
  19. data/lib/google/api/label_pb.rb +75 -11
  20. data/lib/google/api/launch_stage_pb.rb +99 -11
  21. data/lib/google/api/log_pb.rb +82 -7
  22. data/lib/google/api/logging_pb.rb +108 -9
  23. data/lib/google/api/metric_pb.rb +297 -38
  24. data/lib/google/api/monitored_resource_pb.rb +159 -17
  25. data/lib/google/api/monitoring_pb.rb +134 -9
  26. data/lib/google/api/policy_pb.rb +129 -0
  27. data/lib/google/api/quota_pb.rb +211 -21
  28. data/lib/google/api/resource_pb.rb +265 -23
  29. data/lib/google/api/routing_pb.rb +488 -8
  30. data/lib/google/api/service_pb.rb +239 -29
  31. data/lib/google/api/source_info_pb.rb +59 -4
  32. data/lib/google/api/system_parameter_pb.rb +123 -13
  33. data/lib/google/api/usage_pb.rb +123 -11
  34. data/lib/google/api/visibility_pb.rb +140 -8
  35. data/lib/google/logging/type/http_request_pb.rb +123 -18
  36. data/lib/google/logging/type/log_severity_pb.rb +98 -12
  37. data/lib/google/longrunning/operations_pb.rb +277 -37
  38. data/lib/google/rpc/code_pb.rb +213 -20
  39. data/lib/google/rpc/context/attribute_context_pb.rb +402 -0
  40. data/lib/google/rpc/context/audit_context_pb.rb +95 -0
  41. data/lib/google/rpc/error_details_pb.rb +313 -56
  42. data/lib/google/rpc/http_pb.rb +91 -17
  43. data/lib/google/rpc/status_pb.rb +77 -6
  44. data/lib/google/type/calendar_period_pb.rb +83 -11
  45. data/lib/google/type/color_pb.rb +202 -7
  46. data/lib/google/type/date_pb.rb +79 -6
  47. data/lib/google/type/datetime_pb.rb +132 -18
  48. data/lib/google/type/dayofweek_pb.rb +77 -11
  49. data/lib/google/type/decimal_pb.rb +122 -4
  50. data/lib/google/type/expr_pb.rb +100 -7
  51. data/lib/google/type/fraction_pb.rb +60 -5
  52. data/lib/google/type/interval_pb.rb +74 -5
  53. data/lib/google/type/latlng_pb.rb +64 -5
  54. data/lib/google/type/localized_text_pb.rb +63 -5
  55. data/lib/google/type/money_pb.rb +69 -6
  56. data/lib/google/type/month_pb.rb +92 -16
  57. data/lib/google/type/phone_number_pb.rb +140 -12
  58. data/lib/google/type/postal_address_pb.rb +161 -14
  59. data/lib/google/type/quaternion_pb.rb +121 -7
  60. data/lib/google/type/timeofday_pb.rb +71 -7
  61. data/lib/googleapis/common/protos/types/version.rb +1 -1
  62. metadata +8 -5
@@ -1,15 +1,34 @@
1
+ # frozen_string_literal: true
1
2
  # Generated by the protocol buffer compiler. DO NOT EDIT!
2
3
  # source: google/type/localized_text.proto
3
4
 
4
5
  require 'google/protobuf'
5
6
 
6
- Google::Protobuf::DescriptorPool.generated_pool.build do
7
- add_file("google/type/localized_text.proto", :syntax => :proto3) do
8
- add_message "google.type.LocalizedText" do
9
- optional :text, :string, 1
10
- optional :language_code, :string, 2
7
+
8
+ descriptor_data = "\n google/type/localized_text.proto\x12\x0bgoogle.type\"4\n\rLocalizedText\x12\x0c\n\x04text\x18\x01 \x01(\t\x12\x15\n\rlanguage_code\x18\x02 \x01(\tBz\n\x0f\x63om.google.typeB\x12LocalizedTextProtoP\x01ZHgoogle.golang.org/genproto/googleapis/type/localized_text;localized_text\xf8\x01\x01\xa2\x02\x03GTPb\x06proto3"
9
+
10
+ pool = Google::Protobuf::DescriptorPool.generated_pool
11
+
12
+ begin
13
+ pool.add_serialized_file(descriptor_data)
14
+ rescue TypeError => e
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}"
11
28
  end
12
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."
13
32
  end
14
33
 
15
34
  module Google
@@ -17,3 +36,42 @@ module Google
17
36
  LocalizedText = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.type.LocalizedText").msgclass
18
37
  end
19
38
  end
39
+
40
+ #### Source proto file: google/type/localized_text.proto ####
41
+ #
42
+ # // Copyright 2021 Google LLC
43
+ # //
44
+ # // Licensed under the Apache License, Version 2.0 (the "License");
45
+ # // you may not use this file except in compliance with the License.
46
+ # // You may obtain a copy of the License at
47
+ # //
48
+ # // http://www.apache.org/licenses/LICENSE-2.0
49
+ # //
50
+ # // Unless required by applicable law or agreed to in writing, software
51
+ # // distributed under the License is distributed on an "AS IS" BASIS,
52
+ # // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
53
+ # // See the License for the specific language governing permissions and
54
+ # // limitations under the License.
55
+ #
56
+ # syntax = "proto3";
57
+ #
58
+ # package google.type;
59
+ #
60
+ # option cc_enable_arenas = true;
61
+ # option go_package = "google.golang.org/genproto/googleapis/type/localized_text;localized_text";
62
+ # option java_multiple_files = true;
63
+ # option java_outer_classname = "LocalizedTextProto";
64
+ # option java_package = "com.google.type";
65
+ # option objc_class_prefix = "GTP";
66
+ #
67
+ # // Localized variant of a text in a particular language.
68
+ # message LocalizedText {
69
+ # // Localized string in the language corresponding to `language_code' below.
70
+ # string text = 1;
71
+ #
72
+ # // The text's BCP-47 language code, such as "en-US" or "sr-Latn".
73
+ # //
74
+ # // For more information, see
75
+ # // http://www.unicode.org/reports/tr35/#Unicode_locale_identifier.
76
+ # string language_code = 2;
77
+ # }
@@ -1,16 +1,34 @@
1
+ # frozen_string_literal: true
1
2
  # Generated by the protocol buffer compiler. DO NOT EDIT!
2
3
  # source: google/type/money.proto
3
4
 
4
5
  require 'google/protobuf'
5
6
 
6
- Google::Protobuf::DescriptorPool.generated_pool.build do
7
- add_file("google/type/money.proto", :syntax => :proto3) do
8
- add_message "google.type.Money" do
9
- optional :currency_code, :string, 1
10
- optional :units, :int64, 2
11
- optional :nanos, :int32, 3
7
+
8
+ descriptor_data = "\n\x17google/type/money.proto\x12\x0bgoogle.type\"<\n\x05Money\x12\x15\n\rcurrency_code\x18\x01 \x01(\t\x12\r\n\x05units\x18\x02 \x01(\x03\x12\r\n\x05nanos\x18\x03 \x01(\x05\x42`\n\x0f\x63om.google.typeB\nMoneyProtoP\x01Z6google.golang.org/genproto/googleapis/type/money;money\xf8\x01\x01\xa2\x02\x03GTPb\x06proto3"
9
+
10
+ pool = Google::Protobuf::DescriptorPool.generated_pool
11
+
12
+ begin
13
+ pool.add_serialized_file(descriptor_data)
14
+ rescue TypeError => e
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}"
12
28
  end
13
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."
14
32
  end
15
33
 
16
34
  module Google
@@ -18,3 +36,48 @@ module Google
18
36
  Money = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.type.Money").msgclass
19
37
  end
20
38
  end
39
+
40
+ #### Source proto file: google/type/money.proto ####
41
+ #
42
+ # // Copyright 2021 Google LLC
43
+ # //
44
+ # // Licensed under the Apache License, Version 2.0 (the "License");
45
+ # // you may not use this file except in compliance with the License.
46
+ # // You may obtain a copy of the License at
47
+ # //
48
+ # // http://www.apache.org/licenses/LICENSE-2.0
49
+ # //
50
+ # // Unless required by applicable law or agreed to in writing, software
51
+ # // distributed under the License is distributed on an "AS IS" BASIS,
52
+ # // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
53
+ # // See the License for the specific language governing permissions and
54
+ # // limitations under the License.
55
+ #
56
+ # syntax = "proto3";
57
+ #
58
+ # package google.type;
59
+ #
60
+ # option cc_enable_arenas = true;
61
+ # option go_package = "google.golang.org/genproto/googleapis/type/money;money";
62
+ # option java_multiple_files = true;
63
+ # option java_outer_classname = "MoneyProto";
64
+ # option java_package = "com.google.type";
65
+ # option objc_class_prefix = "GTP";
66
+ #
67
+ # // Represents an amount of money with its currency type.
68
+ # message Money {
69
+ # // The three-letter currency code defined in ISO 4217.
70
+ # string currency_code = 1;
71
+ #
72
+ # // The whole units of the amount.
73
+ # // For example if `currencyCode` is `"USD"`, then 1 unit is one US dollar.
74
+ # int64 units = 2;
75
+ #
76
+ # // Number of nano (10^-9) units of the amount.
77
+ # // The value must be between -999,999,999 and +999,999,999 inclusive.
78
+ # // If `units` is positive, `nanos` must be positive or zero.
79
+ # // If `units` is zero, `nanos` can be positive, zero, or negative.
80
+ # // If `units` is negative, `nanos` must be negative or zero.
81
+ # // For example $-1.75 is represented as `units`=-1 and `nanos`=-750,000,000.
82
+ # int32 nanos = 3;
83
+ # }
@@ -1,26 +1,34 @@
1
+ # frozen_string_literal: true
1
2
  # Generated by the protocol buffer compiler. DO NOT EDIT!
2
3
  # source: google/type/month.proto
3
4
 
4
5
  require 'google/protobuf'
5
6
 
6
- Google::Protobuf::DescriptorPool.generated_pool.build do
7
- add_file("google/type/month.proto", :syntax => :proto3) do
8
- add_enum "google.type.Month" do
9
- value :MONTH_UNSPECIFIED, 0
10
- value :JANUARY, 1
11
- value :FEBRUARY, 2
12
- value :MARCH, 3
13
- value :APRIL, 4
14
- value :MAY, 5
15
- value :JUNE, 6
16
- value :JULY, 7
17
- value :AUGUST, 8
18
- value :SEPTEMBER, 9
19
- value :OCTOBER, 10
20
- value :NOVEMBER, 11
21
- value :DECEMBER, 12
7
+
8
+ descriptor_data = "\n\x17google/type/month.proto\x12\x0bgoogle.type*\xb0\x01\n\x05Month\x12\x15\n\x11MONTH_UNSPECIFIED\x10\x00\x12\x0b\n\x07JANUARY\x10\x01\x12\x0c\n\x08\x46\x45\x42RUARY\x10\x02\x12\t\n\x05MARCH\x10\x03\x12\t\n\x05\x41PRIL\x10\x04\x12\x07\n\x03MAY\x10\x05\x12\x08\n\x04JUNE\x10\x06\x12\x08\n\x04JULY\x10\x07\x12\n\n\x06\x41UGUST\x10\x08\x12\r\n\tSEPTEMBER\x10\t\x12\x0b\n\x07OCTOBER\x10\n\x12\x0c\n\x08NOVEMBER\x10\x0b\x12\x0c\n\x08\x44\x45\x43\x45MBER\x10\x0c\x42]\n\x0f\x63om.google.typeB\nMonthProtoP\x01Z6google.golang.org/genproto/googleapis/type/month;month\xa2\x02\x03GTPb\x06proto3"
9
+
10
+ pool = Google::Protobuf::DescriptorPool.generated_pool
11
+
12
+ begin
13
+ pool.add_serialized_file(descriptor_data)
14
+ rescue TypeError => e
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}"
22
28
  end
23
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."
24
32
  end
25
33
 
26
34
  module Google
@@ -28,3 +36,71 @@ module Google
28
36
  Month = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.type.Month").enummodule
29
37
  end
30
38
  end
39
+
40
+ #### Source proto file: google/type/month.proto ####
41
+ #
42
+ # // Copyright 2021 Google LLC
43
+ # //
44
+ # // Licensed under the Apache License, Version 2.0 (the "License");
45
+ # // you may not use this file except in compliance with the License.
46
+ # // You may obtain a copy of the License at
47
+ # //
48
+ # // http://www.apache.org/licenses/LICENSE-2.0
49
+ # //
50
+ # // Unless required by applicable law or agreed to in writing, software
51
+ # // distributed under the License is distributed on an "AS IS" BASIS,
52
+ # // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
53
+ # // See the License for the specific language governing permissions and
54
+ # // limitations under the License.
55
+ #
56
+ # syntax = "proto3";
57
+ #
58
+ # package google.type;
59
+ #
60
+ # option go_package = "google.golang.org/genproto/googleapis/type/month;month";
61
+ # option java_multiple_files = true;
62
+ # option java_outer_classname = "MonthProto";
63
+ # option java_package = "com.google.type";
64
+ # option objc_class_prefix = "GTP";
65
+ #
66
+ # // Represents a month in the Gregorian calendar.
67
+ # enum Month {
68
+ # // The unspecified month.
69
+ # MONTH_UNSPECIFIED = 0;
70
+ #
71
+ # // The month of January.
72
+ # JANUARY = 1;
73
+ #
74
+ # // The month of February.
75
+ # FEBRUARY = 2;
76
+ #
77
+ # // The month of March.
78
+ # MARCH = 3;
79
+ #
80
+ # // The month of April.
81
+ # APRIL = 4;
82
+ #
83
+ # // The month of May.
84
+ # MAY = 5;
85
+ #
86
+ # // The month of June.
87
+ # JUNE = 6;
88
+ #
89
+ # // The month of July.
90
+ # JULY = 7;
91
+ #
92
+ # // The month of August.
93
+ # AUGUST = 8;
94
+ #
95
+ # // The month of September.
96
+ # SEPTEMBER = 9;
97
+ #
98
+ # // The month of October.
99
+ # OCTOBER = 10;
100
+ #
101
+ # // The month of November.
102
+ # NOVEMBER = 11;
103
+ #
104
+ # // The month of December.
105
+ # DECEMBER = 12;
106
+ # }
@@ -1,22 +1,34 @@
1
+ # frozen_string_literal: true
1
2
  # Generated by the protocol buffer compiler. DO NOT EDIT!
2
3
  # source: google/type/phone_number.proto
3
4
 
4
5
  require 'google/protobuf'
5
6
 
6
- Google::Protobuf::DescriptorPool.generated_pool.build do
7
- add_file("google/type/phone_number.proto", :syntax => :proto3) do
8
- add_message "google.type.PhoneNumber" do
9
- optional :extension, :string, 3
10
- oneof :kind do
11
- optional :e164_number, :string, 1
12
- optional :short_code, :message, 2, "google.type.PhoneNumber.ShortCode"
13
- end
14
- end
15
- add_message "google.type.PhoneNumber.ShortCode" do
16
- optional :region_code, :string, 1
17
- optional :number, :string, 2
7
+
8
+ descriptor_data = "\n\x1egoogle/type/phone_number.proto\x12\x0bgoogle.type\"\xab\x01\n\x0bPhoneNumber\x12\x15\n\x0b\x65\x31\x36\x34_number\x18\x01 \x01(\tH\x00\x12\x38\n\nshort_code\x18\x02 \x01(\x0b\x32\".google.type.PhoneNumber.ShortCodeH\x00\x12\x11\n\textension\x18\x03 \x01(\t\x1a\x30\n\tShortCode\x12\x13\n\x0bregion_code\x18\x01 \x01(\t\x12\x0e\n\x06number\x18\x02 \x01(\tB\x06\n\x04kindBt\n\x0f\x63om.google.typeB\x10PhoneNumberProtoP\x01ZDgoogle.golang.org/genproto/googleapis/type/phone_number;phone_number\xf8\x01\x01\xa2\x02\x03GTPb\x06proto3"
9
+
10
+ pool = Google::Protobuf::DescriptorPool.generated_pool
11
+
12
+ begin
13
+ pool.add_serialized_file(descriptor_data)
14
+ rescue TypeError => e
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}"
18
28
  end
19
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."
20
32
  end
21
33
 
22
34
  module Google
@@ -25,3 +37,119 @@ module Google
25
37
  PhoneNumber::ShortCode = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.type.PhoneNumber.ShortCode").msgclass
26
38
  end
27
39
  end
40
+
41
+ #### Source proto file: google/type/phone_number.proto ####
42
+ #
43
+ # // Copyright 2021 Google LLC
44
+ # //
45
+ # // Licensed under the Apache License, Version 2.0 (the "License");
46
+ # // you may not use this file except in compliance with the License.
47
+ # // You may obtain a copy of the License at
48
+ # //
49
+ # // http://www.apache.org/licenses/LICENSE-2.0
50
+ # //
51
+ # // Unless required by applicable law or agreed to in writing, software
52
+ # // distributed under the License is distributed on an "AS IS" BASIS,
53
+ # // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
54
+ # // See the License for the specific language governing permissions and
55
+ # // limitations under the License.
56
+ #
57
+ # syntax = "proto3";
58
+ #
59
+ # package google.type;
60
+ #
61
+ # option cc_enable_arenas = true;
62
+ # option go_package = "google.golang.org/genproto/googleapis/type/phone_number;phone_number";
63
+ # option java_multiple_files = true;
64
+ # option java_outer_classname = "PhoneNumberProto";
65
+ # option java_package = "com.google.type";
66
+ # option objc_class_prefix = "GTP";
67
+ #
68
+ # // An object representing a phone number, suitable as an API wire format.
69
+ # //
70
+ # // This representation:
71
+ # //
72
+ # // - should not be used for locale-specific formatting of a phone number, such
73
+ # // as "+1 (650) 253-0000 ext. 123"
74
+ # //
75
+ # // - is not designed for efficient storage
76
+ # // - may not be suitable for dialing - specialized libraries (see references)
77
+ # // should be used to parse the number for that purpose
78
+ # //
79
+ # // To do something meaningful with this number, such as format it for various
80
+ # // use-cases, convert it to an `i18n.phonenumbers.PhoneNumber` object first.
81
+ # //
82
+ # // For instance, in Java this would be:
83
+ # //
84
+ # // com.google.type.PhoneNumber wireProto =
85
+ # // com.google.type.PhoneNumber.newBuilder().build();
86
+ # // com.google.i18n.phonenumbers.Phonenumber.PhoneNumber phoneNumber =
87
+ # // PhoneNumberUtil.getInstance().parse(wireProto.getE164Number(), "ZZ");
88
+ # // if (!wireProto.getExtension().isEmpty()) {
89
+ # // phoneNumber.setExtension(wireProto.getExtension());
90
+ # // }
91
+ # //
92
+ # // Reference(s):
93
+ # // - https://github.com/google/libphonenumber
94
+ # message PhoneNumber {
95
+ # // An object representing a short code, which is a phone number that is
96
+ # // typically much shorter than regular phone numbers and can be used to
97
+ # // address messages in MMS and SMS systems, as well as for abbreviated dialing
98
+ # // (e.g. "Text 611 to see how many minutes you have remaining on your plan.").
99
+ # //
100
+ # // Short codes are restricted to a region and are not internationally
101
+ # // dialable, which means the same short code can exist in different regions,
102
+ # // with different usage and pricing, even if those regions share the same
103
+ # // country calling code (e.g. US and CA).
104
+ # message ShortCode {
105
+ # // Required. The BCP-47 region code of the location where calls to this
106
+ # // short code can be made, such as "US" and "BB".
107
+ # //
108
+ # // Reference(s):
109
+ # // - http://www.unicode.org/reports/tr35/#unicode_region_subtag
110
+ # string region_code = 1;
111
+ #
112
+ # // Required. The short code digits, without a leading plus ('+') or country
113
+ # // calling code, e.g. "611".
114
+ # string number = 2;
115
+ # }
116
+ #
117
+ # // Required. Either a regular number, or a short code. New fields may be
118
+ # // added to the oneof below in the future, so clients should ignore phone
119
+ # // numbers for which none of the fields they coded against are set.
120
+ # oneof kind {
121
+ # // The phone number, represented as a leading plus sign ('+'), followed by a
122
+ # // phone number that uses a relaxed ITU E.164 format consisting of the
123
+ # // country calling code (1 to 3 digits) and the subscriber number, with no
124
+ # // additional spaces or formatting, e.g.:
125
+ # // - correct: "+15552220123"
126
+ # // - incorrect: "+1 (555) 222-01234 x123".
127
+ # //
128
+ # // The ITU E.164 format limits the latter to 12 digits, but in practice not
129
+ # // all countries respect that, so we relax that restriction here.
130
+ # // National-only numbers are not allowed.
131
+ # //
132
+ # // References:
133
+ # // - https://www.itu.int/rec/T-REC-E.164-201011-I
134
+ # // - https://en.wikipedia.org/wiki/E.164.
135
+ # // - https://en.wikipedia.org/wiki/List_of_country_calling_codes
136
+ # string e164_number = 1;
137
+ #
138
+ # // A short code.
139
+ # //
140
+ # // Reference(s):
141
+ # // - https://en.wikipedia.org/wiki/Short_code
142
+ # ShortCode short_code = 2;
143
+ # }
144
+ #
145
+ # // The phone number's extension. The extension is not standardized in ITU
146
+ # // recommendations, except for being defined as a series of numbers with a
147
+ # // maximum length of 40 digits. Other than digits, some other dialing
148
+ # // characters such as ',' (indicating a wait) or '#' may be stored here.
149
+ # //
150
+ # // Note that no regions currently use extensions with short codes, so this
151
+ # // field is normally only set in conjunction with an E.164 number. It is held
152
+ # // separately from the E.164 number to allow for short code extensions in the
153
+ # // future.
154
+ # string extension = 3;
155
+ # }
@@ -1,24 +1,34 @@
1
+ # frozen_string_literal: true
1
2
  # Generated by the protocol buffer compiler. DO NOT EDIT!
2
3
  # source: google/type/postal_address.proto
3
4
 
4
5
  require 'google/protobuf'
5
6
 
6
- Google::Protobuf::DescriptorPool.generated_pool.build do
7
- add_file("google/type/postal_address.proto", :syntax => :proto3) do
8
- add_message "google.type.PostalAddress" do
9
- optional :revision, :int32, 1
10
- optional :region_code, :string, 2
11
- optional :language_code, :string, 3
12
- optional :postal_code, :string, 4
13
- optional :sorting_code, :string, 5
14
- optional :administrative_area, :string, 6
15
- optional :locality, :string, 7
16
- optional :sublocality, :string, 8
17
- repeated :address_lines, :string, 9
18
- repeated :recipients, :string, 10
19
- optional :organization, :string, 11
7
+
8
+ descriptor_data = "\n google/type/postal_address.proto\x12\x0bgoogle.type\"\xfd\x01\n\rPostalAddress\x12\x10\n\x08revision\x18\x01 \x01(\x05\x12\x13\n\x0bregion_code\x18\x02 \x01(\t\x12\x15\n\rlanguage_code\x18\x03 \x01(\t\x12\x13\n\x0bpostal_code\x18\x04 \x01(\t\x12\x14\n\x0csorting_code\x18\x05 \x01(\t\x12\x1b\n\x13\x61\x64ministrative_area\x18\x06 \x01(\t\x12\x10\n\x08locality\x18\x07 \x01(\t\x12\x13\n\x0bsublocality\x18\x08 \x01(\t\x12\x15\n\raddress_lines\x18\t \x03(\t\x12\x12\n\nrecipients\x18\n \x03(\t\x12\x14\n\x0corganization\x18\x0b \x01(\tBx\n\x0f\x63om.google.typeB\x12PostalAddressProtoP\x01ZFgoogle.golang.org/genproto/googleapis/type/postaladdress;postaladdress\xf8\x01\x01\xa2\x02\x03GTPb\x06proto3"
9
+
10
+ pool = Google::Protobuf::DescriptorPool.generated_pool
11
+
12
+ begin
13
+ pool.add_serialized_file(descriptor_data)
14
+ rescue TypeError => e
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}"
20
28
  end
21
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."
22
32
  end
23
33
 
24
34
  module Google
@@ -26,3 +36,140 @@ module Google
26
36
  PostalAddress = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.type.PostalAddress").msgclass
27
37
  end
28
38
  end
39
+
40
+ #### Source proto file: google/type/postal_address.proto ####
41
+ #
42
+ # // Copyright 2021 Google LLC
43
+ # //
44
+ # // Licensed under the Apache License, Version 2.0 (the "License");
45
+ # // you may not use this file except in compliance with the License.
46
+ # // You may obtain a copy of the License at
47
+ # //
48
+ # // http://www.apache.org/licenses/LICENSE-2.0
49
+ # //
50
+ # // Unless required by applicable law or agreed to in writing, software
51
+ # // distributed under the License is distributed on an "AS IS" BASIS,
52
+ # // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
53
+ # // See the License for the specific language governing permissions and
54
+ # // limitations under the License.
55
+ #
56
+ # syntax = "proto3";
57
+ #
58
+ # package google.type;
59
+ #
60
+ # option cc_enable_arenas = true;
61
+ # option go_package = "google.golang.org/genproto/googleapis/type/postaladdress;postaladdress";
62
+ # option java_multiple_files = true;
63
+ # option java_outer_classname = "PostalAddressProto";
64
+ # option java_package = "com.google.type";
65
+ # option objc_class_prefix = "GTP";
66
+ #
67
+ # // Represents a postal address, e.g. for postal delivery or payments addresses.
68
+ # // Given a postal address, a postal service can deliver items to a premise, P.O.
69
+ # // Box or similar.
70
+ # // It is not intended to model geographical locations (roads, towns,
71
+ # // mountains).
72
+ # //
73
+ # // In typical usage an address would be created via user input or from importing
74
+ # // existing data, depending on the type of process.
75
+ # //
76
+ # // Advice on address input / editing:
77
+ # // - Use an i18n-ready address widget such as
78
+ # // https://github.com/google/libaddressinput)
79
+ # // - Users should not be presented with UI elements for input or editing of
80
+ # // fields outside countries where that field is used.
81
+ # //
82
+ # // For more guidance on how to use this schema, please see:
83
+ # // https://support.google.com/business/answer/6397478
84
+ # message PostalAddress {
85
+ # // The schema revision of the `PostalAddress`. This must be set to 0, which is
86
+ # // the latest revision.
87
+ # //
88
+ # // All new revisions **must** be backward compatible with old revisions.
89
+ # int32 revision = 1;
90
+ #
91
+ # // Required. CLDR region code of the country/region of the address. This
92
+ # // is never inferred and it is up to the user to ensure the value is
93
+ # // correct. See http://cldr.unicode.org/ and
94
+ # // http://www.unicode.org/cldr/charts/30/supplemental/territory_information.html
95
+ # // for details. Example: "CH" for Switzerland.
96
+ # string region_code = 2;
97
+ #
98
+ # // Optional. BCP-47 language code of the contents of this address (if
99
+ # // known). This is often the UI language of the input form or is expected
100
+ # // to match one of the languages used in the address' country/region, or their
101
+ # // transliterated equivalents.
102
+ # // This can affect formatting in certain countries, but is not critical
103
+ # // to the correctness of the data and will never affect any validation or
104
+ # // other non-formatting related operations.
105
+ # //
106
+ # // If this value is not known, it should be omitted (rather than specifying a
107
+ # // possibly incorrect default).
108
+ # //
109
+ # // Examples: "zh-Hant", "ja", "ja-Latn", "en".
110
+ # string language_code = 3;
111
+ #
112
+ # // Optional. Postal code of the address. Not all countries use or require
113
+ # // postal codes to be present, but where they are used, they may trigger
114
+ # // additional validation with other parts of the address (e.g. state/zip
115
+ # // validation in the U.S.A.).
116
+ # string postal_code = 4;
117
+ #
118
+ # // Optional. Additional, country-specific, sorting code. This is not used
119
+ # // in most regions. Where it is used, the value is either a string like
120
+ # // "CEDEX", optionally followed by a number (e.g. "CEDEX 7"), or just a number
121
+ # // alone, representing the "sector code" (Jamaica), "delivery area indicator"
122
+ # // (Malawi) or "post office indicator" (e.g. Côte d'Ivoire).
123
+ # string sorting_code = 5;
124
+ #
125
+ # // Optional. Highest administrative subdivision which is used for postal
126
+ # // addresses of a country or region.
127
+ # // For example, this can be a state, a province, an oblast, or a prefecture.
128
+ # // Specifically, for Spain this is the province and not the autonomous
129
+ # // community (e.g. "Barcelona" and not "Catalonia").
130
+ # // Many countries don't use an administrative area in postal addresses. E.g.
131
+ # // in Switzerland this should be left unpopulated.
132
+ # string administrative_area = 6;
133
+ #
134
+ # // Optional. Generally refers to the city/town portion of the address.
135
+ # // Examples: US city, IT comune, UK post town.
136
+ # // In regions of the world where localities are not well defined or do not fit
137
+ # // into this structure well, leave locality empty and use address_lines.
138
+ # string locality = 7;
139
+ #
140
+ # // Optional. Sublocality of the address.
141
+ # // For example, this can be neighborhoods, boroughs, districts.
142
+ # string sublocality = 8;
143
+ #
144
+ # // Unstructured address lines describing the lower levels of an address.
145
+ # //
146
+ # // Because values in address_lines do not have type information and may
147
+ # // sometimes contain multiple values in a single field (e.g.
148
+ # // "Austin, TX"), it is important that the line order is clear. The order of
149
+ # // address lines should be "envelope order" for the country/region of the
150
+ # // address. In places where this can vary (e.g. Japan), address_language is
151
+ # // used to make it explicit (e.g. "ja" for large-to-small ordering and
152
+ # // "ja-Latn" or "en" for small-to-large). This way, the most specific line of
153
+ # // an address can be selected based on the language.
154
+ # //
155
+ # // The minimum permitted structural representation of an address consists
156
+ # // of a region_code with all remaining information placed in the
157
+ # // address_lines. It would be possible to format such an address very
158
+ # // approximately without geocoding, but no semantic reasoning could be
159
+ # // made about any of the address components until it was at least
160
+ # // partially resolved.
161
+ # //
162
+ # // Creating an address only containing a region_code and address_lines, and
163
+ # // then geocoding is the recommended way to handle completely unstructured
164
+ # // addresses (as opposed to guessing which parts of the address should be
165
+ # // localities or administrative areas).
166
+ # repeated string address_lines = 9;
167
+ #
168
+ # // Optional. The recipient at the address.
169
+ # // This field may, under certain circumstances, contain multiline information.
170
+ # // For example, it might contain "care of" information.
171
+ # repeated string recipients = 10;
172
+ #
173
+ # // Optional. The name of the organization at the address.
174
+ # string organization = 11;
175
+ # }