googleapis-common-protos-types 1.5.0 → 1.8.0

Sign up to get free protection for your applications and to get access to all the features.
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,21 +1,34 @@
1
+ # frozen_string_literal: true
1
2
  # Generated by the protocol buffer compiler. DO NOT EDIT!
2
3
  # source: google/type/calendar_period.proto
3
4
 
4
5
  require 'google/protobuf'
5
6
 
6
- Google::Protobuf::DescriptorPool.generated_pool.build do
7
- add_file("google/type/calendar_period.proto", :syntax => :proto3) do
8
- add_enum "google.type.CalendarPeriod" do
9
- value :CALENDAR_PERIOD_UNSPECIFIED, 0
10
- value :DAY, 1
11
- value :WEEK, 2
12
- value :FORTNIGHT, 3
13
- value :MONTH, 4
14
- value :QUARTER, 5
15
- value :HALF, 6
16
- value :YEAR, 7
7
+
8
+ descriptor_data = "\n!google/type/calendar_period.proto\x12\x0bgoogle.type*\x7f\n\x0e\x43\x61lendarPeriod\x12\x1f\n\x1b\x43\x41LENDAR_PERIOD_UNSPECIFIED\x10\x00\x12\x07\n\x03\x44\x41Y\x10\x01\x12\x08\n\x04WEEK\x10\x02\x12\r\n\tFORTNIGHT\x10\x03\x12\t\n\x05MONTH\x10\x04\x12\x0b\n\x07QUARTER\x10\x05\x12\x08\n\x04HALF\x10\x06\x12\x08\n\x04YEAR\x10\x07\x42x\n\x0f\x63om.google.typeB\x13\x43\x61lendarPeriodProtoP\x01ZHgoogle.golang.org/genproto/googleapis/type/calendarperiod;calendarperiod\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}"
17
28
  end
18
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."
19
32
  end
20
33
 
21
34
  module Google
@@ -23,3 +36,62 @@ module Google
23
36
  CalendarPeriod = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.type.CalendarPeriod").enummodule
24
37
  end
25
38
  end
39
+
40
+ #### Source proto file: google/type/calendar_period.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/calendarperiod;calendarperiod";
61
+ # option java_multiple_files = true;
62
+ # option java_outer_classname = "CalendarPeriodProto";
63
+ # option java_package = "com.google.type";
64
+ # option objc_class_prefix = "GTP";
65
+ #
66
+ # // A `CalendarPeriod` represents the abstract concept of a time period that has
67
+ # // a canonical start. Grammatically, "the start of the current
68
+ # // `CalendarPeriod`." All calendar times begin at midnight UTC.
69
+ # enum CalendarPeriod {
70
+ # // Undefined period, raises an error.
71
+ # CALENDAR_PERIOD_UNSPECIFIED = 0;
72
+ #
73
+ # // A day.
74
+ # DAY = 1;
75
+ #
76
+ # // A week. Weeks begin on Monday, following
77
+ # // [ISO 8601](https://en.wikipedia.org/wiki/ISO_week_date).
78
+ # WEEK = 2;
79
+ #
80
+ # // A fortnight. The first calendar fortnight of the year begins at the start
81
+ # // of week 1 according to
82
+ # // [ISO 8601](https://en.wikipedia.org/wiki/ISO_week_date).
83
+ # FORTNIGHT = 3;
84
+ #
85
+ # // A month.
86
+ # MONTH = 4;
87
+ #
88
+ # // A quarter. Quarters start on dates 1-Jan, 1-Apr, 1-Jul, and 1-Oct of each
89
+ # // year.
90
+ # QUARTER = 5;
91
+ #
92
+ # // A half-year. Half-years start on dates 1-Jan and 1-Jul.
93
+ # HALF = 6;
94
+ #
95
+ # // A year.
96
+ # YEAR = 7;
97
+ # }
@@ -1,3 +1,4 @@
1
+ # frozen_string_literal: true
1
2
  # Generated by the protocol buffer compiler. DO NOT EDIT!
2
3
  # source: google/type/color.proto
3
4
 
@@ -5,15 +6,32 @@ require 'google/protobuf'
5
6
 
6
7
  require 'google/protobuf/wrappers_pb'
7
8
 
8
- Google::Protobuf::DescriptorPool.generated_pool.build do
9
- add_file("google/type/color.proto", :syntax => :proto3) do
10
- add_message "google.type.Color" do
11
- optional :red, :float, 1
12
- optional :green, :float, 2
13
- optional :blue, :float, 3
14
- optional :alpha, :message, 4, "google.protobuf.FloatValue"
9
+
10
+ descriptor_data = "\n\x17google/type/color.proto\x12\x0bgoogle.type\x1a\x1egoogle/protobuf/wrappers.proto\"]\n\x05\x43olor\x12\x0b\n\x03red\x18\x01 \x01(\x02\x12\r\n\x05green\x18\x02 \x01(\x02\x12\x0c\n\x04\x62lue\x18\x03 \x01(\x02\x12*\n\x05\x61lpha\x18\x04 \x01(\x0b\x32\x1b.google.protobuf.FloatValueB`\n\x0f\x63om.google.typeB\nColorProtoP\x01Z6google.golang.org/genproto/googleapis/type/color;color\xf8\x01\x01\xa2\x02\x03GTPb\x06proto3"
11
+
12
+ pool = Google::Protobuf::DescriptorPool.generated_pool
13
+
14
+ begin
15
+ pool.add_serialized_file(descriptor_data)
16
+ rescue TypeError => e
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.FloatValue", "google/protobuf/wrappers.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}"
15
31
  end
16
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."
17
35
  end
18
36
 
19
37
  module Google
@@ -21,3 +39,180 @@ module Google
21
39
  Color = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.type.Color").msgclass
22
40
  end
23
41
  end
42
+
43
+ #### Source proto file: google/type/color.proto ####
44
+ #
45
+ # // Copyright 2021 Google LLC
46
+ # //
47
+ # // Licensed under the Apache License, Version 2.0 (the "License");
48
+ # // you may not use this file except in compliance with the License.
49
+ # // You may obtain a copy of the License at
50
+ # //
51
+ # // http://www.apache.org/licenses/LICENSE-2.0
52
+ # //
53
+ # // Unless required by applicable law or agreed to in writing, software
54
+ # // distributed under the License is distributed on an "AS IS" BASIS,
55
+ # // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
56
+ # // See the License for the specific language governing permissions and
57
+ # // limitations under the License.
58
+ #
59
+ # syntax = "proto3";
60
+ #
61
+ # package google.type;
62
+ #
63
+ # import "google/protobuf/wrappers.proto";
64
+ #
65
+ # option cc_enable_arenas = true;
66
+ # option go_package = "google.golang.org/genproto/googleapis/type/color;color";
67
+ # option java_multiple_files = true;
68
+ # option java_outer_classname = "ColorProto";
69
+ # option java_package = "com.google.type";
70
+ # option objc_class_prefix = "GTP";
71
+ #
72
+ # // Represents a color in the RGBA color space. This representation is designed
73
+ # // for simplicity of conversion to/from color representations in various
74
+ # // languages over compactness. For example, the fields of this representation
75
+ # // can be trivially provided to the constructor of `java.awt.Color` in Java; it
76
+ # // can also be trivially provided to UIColor's `+colorWithRed:green:blue:alpha`
77
+ # // method in iOS; and, with just a little work, it can be easily formatted into
78
+ # // a CSS `rgba()` string in JavaScript.
79
+ # //
80
+ # // This reference page doesn't carry information about the absolute color
81
+ # // space
82
+ # // that should be used to interpret the RGB value (e.g. sRGB, Adobe RGB,
83
+ # // DCI-P3, BT.2020, etc.). By default, applications should assume the sRGB color
84
+ # // space.
85
+ # //
86
+ # // When color equality needs to be decided, implementations, unless
87
+ # // documented otherwise, treat two colors as equal if all their red,
88
+ # // green, blue, and alpha values each differ by at most 1e-5.
89
+ # //
90
+ # // Example (Java):
91
+ # //
92
+ # // import com.google.type.Color;
93
+ # //
94
+ # // // ...
95
+ # // public static java.awt.Color fromProto(Color protocolor) {
96
+ # // float alpha = protocolor.hasAlpha()
97
+ # // ? protocolor.getAlpha().getValue()
98
+ # // : 1.0;
99
+ # //
100
+ # // return new java.awt.Color(
101
+ # // protocolor.getRed(),
102
+ # // protocolor.getGreen(),
103
+ # // protocolor.getBlue(),
104
+ # // alpha);
105
+ # // }
106
+ # //
107
+ # // public static Color toProto(java.awt.Color color) {
108
+ # // float red = (float) color.getRed();
109
+ # // float green = (float) color.getGreen();
110
+ # // float blue = (float) color.getBlue();
111
+ # // float denominator = 255.0;
112
+ # // Color.Builder resultBuilder =
113
+ # // Color
114
+ # // .newBuilder()
115
+ # // .setRed(red / denominator)
116
+ # // .setGreen(green / denominator)
117
+ # // .setBlue(blue / denominator);
118
+ # // int alpha = color.getAlpha();
119
+ # // if (alpha != 255) {
120
+ # // result.setAlpha(
121
+ # // FloatValue
122
+ # // .newBuilder()
123
+ # // .setValue(((float) alpha) / denominator)
124
+ # // .build());
125
+ # // }
126
+ # // return resultBuilder.build();
127
+ # // }
128
+ # // // ...
129
+ # //
130
+ # // Example (iOS / Obj-C):
131
+ # //
132
+ # // // ...
133
+ # // static UIColor* fromProto(Color* protocolor) {
134
+ # // float red = [protocolor red];
135
+ # // float green = [protocolor green];
136
+ # // float blue = [protocolor blue];
137
+ # // FloatValue* alpha_wrapper = [protocolor alpha];
138
+ # // float alpha = 1.0;
139
+ # // if (alpha_wrapper != nil) {
140
+ # // alpha = [alpha_wrapper value];
141
+ # // }
142
+ # // return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
143
+ # // }
144
+ # //
145
+ # // static Color* toProto(UIColor* color) {
146
+ # // CGFloat red, green, blue, alpha;
147
+ # // if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
148
+ # // return nil;
149
+ # // }
150
+ # // Color* result = [[Color alloc] init];
151
+ # // [result setRed:red];
152
+ # // [result setGreen:green];
153
+ # // [result setBlue:blue];
154
+ # // if (alpha <= 0.9999) {
155
+ # // [result setAlpha:floatWrapperWithValue(alpha)];
156
+ # // }
157
+ # // [result autorelease];
158
+ # // return result;
159
+ # // }
160
+ # // // ...
161
+ # //
162
+ # // Example (JavaScript):
163
+ # //
164
+ # // // ...
165
+ # //
166
+ # // var protoToCssColor = function(rgb_color) {
167
+ # // var redFrac = rgb_color.red || 0.0;
168
+ # // var greenFrac = rgb_color.green || 0.0;
169
+ # // var blueFrac = rgb_color.blue || 0.0;
170
+ # // var red = Math.floor(redFrac * 255);
171
+ # // var green = Math.floor(greenFrac * 255);
172
+ # // var blue = Math.floor(blueFrac * 255);
173
+ # //
174
+ # // if (!('alpha' in rgb_color)) {
175
+ # // return rgbToCssColor(red, green, blue);
176
+ # // }
177
+ # //
178
+ # // var alphaFrac = rgb_color.alpha.value || 0.0;
179
+ # // var rgbParams = [red, green, blue].join(',');
180
+ # // return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
181
+ # // };
182
+ # //
183
+ # // var rgbToCssColor = function(red, green, blue) {
184
+ # // var rgbNumber = new Number((red << 16) | (green << 8) | blue);
185
+ # // var hexString = rgbNumber.toString(16);
186
+ # // var missingZeros = 6 - hexString.length;
187
+ # // var resultBuilder = ['#'];
188
+ # // for (var i = 0; i < missingZeros; i++) {
189
+ # // resultBuilder.push('0');
190
+ # // }
191
+ # // resultBuilder.push(hexString);
192
+ # // return resultBuilder.join('');
193
+ # // };
194
+ # //
195
+ # // // ...
196
+ # message Color {
197
+ # // The amount of red in the color as a value in the interval [0, 1].
198
+ # float red = 1;
199
+ #
200
+ # // The amount of green in the color as a value in the interval [0, 1].
201
+ # float green = 2;
202
+ #
203
+ # // The amount of blue in the color as a value in the interval [0, 1].
204
+ # float blue = 3;
205
+ #
206
+ # // The fraction of this color that should be applied to the pixel. That is,
207
+ # // the final pixel color is defined by the equation:
208
+ # //
209
+ # // `pixel color = alpha * (this color) + (1.0 - alpha) * (background color)`
210
+ # //
211
+ # // This means that a value of 1.0 corresponds to a solid color, whereas
212
+ # // a value of 0.0 corresponds to a completely transparent color. This
213
+ # // uses a wrapper message rather than a simple float scalar so that it is
214
+ # // possible to distinguish between a default value and the value being unset.
215
+ # // If omitted, this color object is rendered as a solid color
216
+ # // (as if the alpha value had been explicitly given a value of 1.0).
217
+ # google.protobuf.FloatValue alpha = 4;
218
+ # }
@@ -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/date.proto
3
4
 
4
5
  require 'google/protobuf'
5
6
 
6
- Google::Protobuf::DescriptorPool.generated_pool.build do
7
- add_file("google/type/date.proto", :syntax => :proto3) do
8
- add_message "google.type.Date" do
9
- optional :year, :int32, 1
10
- optional :month, :int32, 2
11
- optional :day, :int32, 3
7
+
8
+ descriptor_data = "\n\x16google/type/date.proto\x12\x0bgoogle.type\"0\n\x04\x44\x61te\x12\x0c\n\x04year\x18\x01 \x01(\x05\x12\r\n\x05month\x18\x02 \x01(\x05\x12\x0b\n\x03\x64\x61y\x18\x03 \x01(\x05\x42]\n\x0f\x63om.google.typeB\tDateProtoP\x01Z4google.golang.org/genproto/googleapis/type/date;date\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,58 @@ module Google
18
36
  Date = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.type.Date").msgclass
19
37
  end
20
38
  end
39
+
40
+ #### Source proto file: google/type/date.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/date;date";
62
+ # option java_multiple_files = true;
63
+ # option java_outer_classname = "DateProto";
64
+ # option java_package = "com.google.type";
65
+ # option objc_class_prefix = "GTP";
66
+ #
67
+ # // Represents a whole or partial calendar date, such as a birthday. The time of
68
+ # // day and time zone are either specified elsewhere or are insignificant. The
69
+ # // date is relative to the Gregorian Calendar. This can represent one of the
70
+ # // following:
71
+ # //
72
+ # // * A full date, with non-zero year, month, and day values
73
+ # // * A month and day value, with a zero year, such as an anniversary
74
+ # // * A year on its own, with zero month and day values
75
+ # // * A year and month value, with a zero day, such as a credit card expiration
76
+ # // date
77
+ # //
78
+ # // Related types are [google.type.TimeOfDay][google.type.TimeOfDay] and
79
+ # // `google.protobuf.Timestamp`.
80
+ # message Date {
81
+ # // Year of the date. Must be from 1 to 9999, or 0 to specify a date without
82
+ # // a year.
83
+ # int32 year = 1;
84
+ #
85
+ # // Month of a year. Must be from 1 to 12, or 0 to specify a year without a
86
+ # // month and day.
87
+ # int32 month = 2;
88
+ #
89
+ # // Day of a month. Must be from 1 to 31 and valid for the year and month, or 0
90
+ # // to specify a year by itself or a year and month where the day isn't
91
+ # // significant.
92
+ # int32 day = 3;
93
+ # }
@@ -1,3 +1,4 @@
1
+ # frozen_string_literal: true
1
2
  # Generated by the protocol buffer compiler. DO NOT EDIT!
2
3
  # source: google/type/datetime.proto
3
4
 
@@ -5,26 +6,32 @@ require 'google/protobuf'
5
6
 
6
7
  require 'google/protobuf/duration_pb'
7
8
 
8
- Google::Protobuf::DescriptorPool.generated_pool.build do
9
- add_file("google/type/datetime.proto", :syntax => :proto3) do
10
- add_message "google.type.DateTime" do
11
- optional :year, :int32, 1
12
- optional :month, :int32, 2
13
- optional :day, :int32, 3
14
- optional :hours, :int32, 4
15
- optional :minutes, :int32, 5
16
- optional :seconds, :int32, 6
17
- optional :nanos, :int32, 7
18
- oneof :time_offset do
19
- optional :utc_offset, :message, 8, "google.protobuf.Duration"
20
- optional :time_zone, :message, 9, "google.type.TimeZone"
21
- end
22
- end
23
- add_message "google.type.TimeZone" do
24
- optional :id, :string, 1
25
- optional :version, :string, 2
9
+
10
+ descriptor_data = "\n\x1agoogle/type/datetime.proto\x12\x0bgoogle.type\x1a\x1egoogle/protobuf/duration.proto\"\xe0\x01\n\x08\x44\x61teTime\x12\x0c\n\x04year\x18\x01 \x01(\x05\x12\r\n\x05month\x18\x02 \x01(\x05\x12\x0b\n\x03\x64\x61y\x18\x03 \x01(\x05\x12\r\n\x05hours\x18\x04 \x01(\x05\x12\x0f\n\x07minutes\x18\x05 \x01(\x05\x12\x0f\n\x07seconds\x18\x06 \x01(\x05\x12\r\n\x05nanos\x18\x07 \x01(\x05\x12/\n\nutc_offset\x18\x08 \x01(\x0b\x32\x19.google.protobuf.DurationH\x00\x12*\n\ttime_zone\x18\t \x01(\x0b\x32\x15.google.type.TimeZoneH\x00\x42\r\n\x0btime_offset\"\'\n\x08TimeZone\x12\n\n\x02id\x18\x01 \x01(\t\x12\x0f\n\x07version\x18\x02 \x01(\tBi\n\x0f\x63om.google.typeB\rDateTimeProtoP\x01Z<google.golang.org/genproto/googleapis/type/datetime;datetime\xf8\x01\x01\xa2\x02\x03GTPb\x06proto3"
11
+
12
+ pool = Google::Protobuf::DescriptorPool.generated_pool
13
+
14
+ begin
15
+ pool.add_serialized_file(descriptor_data)
16
+ rescue TypeError => e
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.Duration", "google/protobuf/duration.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}"
26
31
  end
27
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."
28
35
  end
29
36
 
30
37
  module Google
@@ -33,3 +40,110 @@ module Google
33
40
  TimeZone = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.type.TimeZone").msgclass
34
41
  end
35
42
  end
43
+
44
+ #### Source proto file: google/type/datetime.proto ####
45
+ #
46
+ # // Copyright 2021 Google LLC
47
+ # //
48
+ # // Licensed under the Apache License, Version 2.0 (the "License");
49
+ # // you may not use this file except in compliance with the License.
50
+ # // You may obtain a copy of the License at
51
+ # //
52
+ # // http://www.apache.org/licenses/LICENSE-2.0
53
+ # //
54
+ # // Unless required by applicable law or agreed to in writing, software
55
+ # // distributed under the License is distributed on an "AS IS" BASIS,
56
+ # // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
57
+ # // See the License for the specific language governing permissions and
58
+ # // limitations under the License.
59
+ #
60
+ # syntax = "proto3";
61
+ #
62
+ # package google.type;
63
+ #
64
+ # import "google/protobuf/duration.proto";
65
+ #
66
+ # option cc_enable_arenas = true;
67
+ # option go_package = "google.golang.org/genproto/googleapis/type/datetime;datetime";
68
+ # option java_multiple_files = true;
69
+ # option java_outer_classname = "DateTimeProto";
70
+ # option java_package = "com.google.type";
71
+ # option objc_class_prefix = "GTP";
72
+ #
73
+ # // Represents civil time (or occasionally physical time).
74
+ # //
75
+ # // This type can represent a civil time in one of a few possible ways:
76
+ # //
77
+ # // * When utc_offset is set and time_zone is unset: a civil time on a calendar
78
+ # // day with a particular offset from UTC.
79
+ # // * When time_zone is set and utc_offset is unset: a civil time on a calendar
80
+ # // day in a particular time zone.
81
+ # // * When neither time_zone nor utc_offset is set: a civil time on a calendar
82
+ # // day in local time.
83
+ # //
84
+ # // The date is relative to the Proleptic Gregorian Calendar.
85
+ # //
86
+ # // If year is 0, the DateTime is considered not to have a specific year. month
87
+ # // and day must have valid, non-zero values.
88
+ # //
89
+ # // This type may also be used to represent a physical time if all the date and
90
+ # // time fields are set and either case of the `time_offset` oneof is set.
91
+ # // Consider using `Timestamp` message for physical time instead. If your use
92
+ # // case also would like to store the user's timezone, that can be done in
93
+ # // another field.
94
+ # //
95
+ # // This type is more flexible than some applications may want. Make sure to
96
+ # // document and validate your application's limitations.
97
+ # message DateTime {
98
+ # // Optional. Year of date. Must be from 1 to 9999, or 0 if specifying a
99
+ # // datetime without a year.
100
+ # int32 year = 1;
101
+ #
102
+ # // Required. Month of year. Must be from 1 to 12.
103
+ # int32 month = 2;
104
+ #
105
+ # // Required. Day of month. Must be from 1 to 31 and valid for the year and
106
+ # // month.
107
+ # int32 day = 3;
108
+ #
109
+ # // Required. Hours of day in 24 hour format. Should be from 0 to 23. An API
110
+ # // may choose to allow the value "24:00:00" for scenarios like business
111
+ # // closing time.
112
+ # int32 hours = 4;
113
+ #
114
+ # // Required. Minutes of hour of day. Must be from 0 to 59.
115
+ # int32 minutes = 5;
116
+ #
117
+ # // Required. Seconds of minutes of the time. Must normally be from 0 to 59. An
118
+ # // API may allow the value 60 if it allows leap-seconds.
119
+ # int32 seconds = 6;
120
+ #
121
+ # // Required. Fractions of seconds in nanoseconds. Must be from 0 to
122
+ # // 999,999,999.
123
+ # int32 nanos = 7;
124
+ #
125
+ # // Optional. Specifies either the UTC offset or the time zone of the DateTime.
126
+ # // Choose carefully between them, considering that time zone data may change
127
+ # // in the future (for example, a country modifies their DST start/end dates,
128
+ # // and future DateTimes in the affected range had already been stored).
129
+ # // If omitted, the DateTime is considered to be in local time.
130
+ # oneof time_offset {
131
+ # // UTC offset. Must be whole seconds, between -18 hours and +18 hours.
132
+ # // For example, a UTC offset of -4:00 would be represented as
133
+ # // { seconds: -14400 }.
134
+ # google.protobuf.Duration utc_offset = 8;
135
+ #
136
+ # // Time zone.
137
+ # TimeZone time_zone = 9;
138
+ # }
139
+ # }
140
+ #
141
+ # // Represents a time zone from the
142
+ # // [IANA Time Zone Database](https://www.iana.org/time-zones).
143
+ # message TimeZone {
144
+ # // IANA Time Zone Database time zone, e.g. "America/New_York".
145
+ # string id = 1;
146
+ #
147
+ # // Optional. IANA Time Zone Database version number, e.g. "2019a".
148
+ # string version = 2;
149
+ # }