googleapis-common-protos-types 1.7.0 → 1.9.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 +13 -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 -23
  6. data/lib/google/api/billing_pb.rb +104 -8
  7. data/lib/google/api/client_pb.rb +422 -86
  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 -33
  16. data/lib/google/api/field_behavior_pb.rb +131 -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 +375 -66
  40. data/lib/google/rpc/context/audit_context_pb.rb +77 -8
  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 +6 -5
@@ -1,3 +1,4 @@
1
+ # frozen_string_literal: true
1
2
  # Generated by the protocol buffer compiler. DO NOT EDIT!
2
3
  # source: google/api/metric.proto
3
4
 
@@ -7,46 +8,33 @@ require 'google/api/label_pb'
7
8
  require 'google/api/launch_stage_pb'
8
9
  require 'google/protobuf/duration_pb'
9
10
 
10
- Google::Protobuf::DescriptorPool.generated_pool.build do
11
- add_file("google/api/metric.proto", :syntax => :proto3) do
12
- add_message "google.api.MetricDescriptor" do
13
- optional :name, :string, 1
14
- optional :type, :string, 8
15
- repeated :labels, :message, 2, "google.api.LabelDescriptor"
16
- optional :metric_kind, :enum, 3, "google.api.MetricDescriptor.MetricKind"
17
- optional :value_type, :enum, 4, "google.api.MetricDescriptor.ValueType"
18
- optional :unit, :string, 5
19
- optional :description, :string, 6
20
- optional :display_name, :string, 7
21
- optional :metadata, :message, 10, "google.api.MetricDescriptor.MetricDescriptorMetadata"
22
- optional :launch_stage, :enum, 12, "google.api.LaunchStage"
23
- repeated :monitored_resource_types, :string, 13
24
- end
25
- add_message "google.api.MetricDescriptor.MetricDescriptorMetadata" do
26
- optional :launch_stage, :enum, 1, "google.api.LaunchStage"
27
- optional :sample_period, :message, 2, "google.protobuf.Duration"
28
- optional :ingest_delay, :message, 3, "google.protobuf.Duration"
29
- end
30
- add_enum "google.api.MetricDescriptor.MetricKind" do
31
- value :METRIC_KIND_UNSPECIFIED, 0
32
- value :GAUGE, 1
33
- value :DELTA, 2
34
- value :CUMULATIVE, 3
35
- end
36
- add_enum "google.api.MetricDescriptor.ValueType" do
37
- value :VALUE_TYPE_UNSPECIFIED, 0
38
- value :BOOL, 1
39
- value :INT64, 2
40
- value :DOUBLE, 3
41
- value :STRING, 4
42
- value :DISTRIBUTION, 5
43
- value :MONEY, 6
44
- end
45
- add_message "google.api.Metric" do
46
- optional :type, :string, 3
47
- map :labels, :string, :string, 2
11
+
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\"\x9f\x06\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\xb0\x01\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\"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
+
14
+ pool = Google::Protobuf::DescriptorPool.generated_pool
15
+
16
+ begin
17
+ pool.add_serialized_file(descriptor_data)
18
+ rescue TypeError => e
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}"
48
34
  end
49
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."
50
38
  end
51
39
 
52
40
  module Google
@@ -58,3 +46,274 @@ module Google
58
46
  Metric = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.api.Metric").msgclass
59
47
  end
60
48
  end
49
+
50
+ #### Source proto file: google/api/metric.proto ####
51
+ #
52
+ # // Copyright 2023 Google LLC
53
+ # //
54
+ # // Licensed under the Apache License, Version 2.0 (the "License");
55
+ # // you may not use this file except in compliance with the License.
56
+ # // You may obtain a copy of the License at
57
+ # //
58
+ # // http://www.apache.org/licenses/LICENSE-2.0
59
+ # //
60
+ # // Unless required by applicable law or agreed to in writing, software
61
+ # // distributed under the License is distributed on an "AS IS" BASIS,
62
+ # // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
63
+ # // See the License for the specific language governing permissions and
64
+ # // limitations under the License.
65
+ #
66
+ # syntax = "proto3";
67
+ #
68
+ # package google.api;
69
+ #
70
+ # import "google/api/label.proto";
71
+ # import "google/api/launch_stage.proto";
72
+ # import "google/protobuf/duration.proto";
73
+ #
74
+ # option go_package = "google.golang.org/genproto/googleapis/api/metric;metric";
75
+ # option java_multiple_files = true;
76
+ # option java_outer_classname = "MetricProto";
77
+ # option java_package = "com.google.api";
78
+ # option objc_class_prefix = "GAPI";
79
+ #
80
+ # // Defines a metric type and its schema. Once a metric descriptor is created,
81
+ # // deleting or altering it stops data collection and makes the metric type's
82
+ # // existing data unusable.
83
+ # //
84
+ # message MetricDescriptor {
85
+ # // The kind of measurement. It describes how the data is reported.
86
+ # // For information on setting the start time and end time based on
87
+ # // the MetricKind, see [TimeInterval][google.monitoring.v3.TimeInterval].
88
+ # enum MetricKind {
89
+ # // Do not use this default value.
90
+ # METRIC_KIND_UNSPECIFIED = 0;
91
+ #
92
+ # // An instantaneous measurement of a value.
93
+ # GAUGE = 1;
94
+ #
95
+ # // The change in a value during a time interval.
96
+ # DELTA = 2;
97
+ #
98
+ # // A value accumulated over a time interval. Cumulative
99
+ # // measurements in a time series should have the same start time
100
+ # // and increasing end times, until an event resets the cumulative
101
+ # // value to zero and sets a new start time for the following
102
+ # // points.
103
+ # CUMULATIVE = 3;
104
+ # }
105
+ #
106
+ # // The value type of a metric.
107
+ # enum ValueType {
108
+ # // Do not use this default value.
109
+ # VALUE_TYPE_UNSPECIFIED = 0;
110
+ #
111
+ # // The value is a boolean.
112
+ # // This value type can be used only if the metric kind is `GAUGE`.
113
+ # BOOL = 1;
114
+ #
115
+ # // The value is a signed 64-bit integer.
116
+ # INT64 = 2;
117
+ #
118
+ # // The value is a double precision floating point number.
119
+ # DOUBLE = 3;
120
+ #
121
+ # // The value is a text string.
122
+ # // This value type can be used only if the metric kind is `GAUGE`.
123
+ # STRING = 4;
124
+ #
125
+ # // The value is a [`Distribution`][google.api.Distribution].
126
+ # DISTRIBUTION = 5;
127
+ #
128
+ # // The value is money.
129
+ # MONEY = 6;
130
+ # }
131
+ #
132
+ # // Additional annotations that can be used to guide the usage of a metric.
133
+ # message MetricDescriptorMetadata {
134
+ # // Deprecated. Must use the
135
+ # // [MetricDescriptor.launch_stage][google.api.MetricDescriptor.launch_stage]
136
+ # // instead.
137
+ # LaunchStage launch_stage = 1 [deprecated = true];
138
+ #
139
+ # // The sampling period of metric data points. For metrics which are written
140
+ # // periodically, consecutive data points are stored at this time interval,
141
+ # // excluding data loss due to errors. Metrics with a higher granularity have
142
+ # // a smaller sampling period.
143
+ # google.protobuf.Duration sample_period = 2;
144
+ #
145
+ # // The delay of data points caused by ingestion. Data points older than this
146
+ # // age are guaranteed to be ingested and available to be read, excluding
147
+ # // data loss due to errors.
148
+ # google.protobuf.Duration ingest_delay = 3;
149
+ # }
150
+ #
151
+ # // The resource name of the metric descriptor.
152
+ # string name = 1;
153
+ #
154
+ # // The metric type, including its DNS name prefix. The type is not
155
+ # // URL-encoded. All user-defined metric types have the DNS name
156
+ # // `custom.googleapis.com` or `external.googleapis.com`. Metric types should
157
+ # // use a natural hierarchical grouping. For example:
158
+ # //
159
+ # // "custom.googleapis.com/invoice/paid/amount"
160
+ # // "external.googleapis.com/prometheus/up"
161
+ # // "appengine.googleapis.com/http/server/response_latencies"
162
+ # string type = 8;
163
+ #
164
+ # // The set of labels that can be used to describe a specific
165
+ # // instance of this metric type. For example, the
166
+ # // `appengine.googleapis.com/http/server/response_latencies` metric
167
+ # // type has a label for the HTTP response code, `response_code`, so
168
+ # // you can look at latencies for successful responses or just
169
+ # // for responses that failed.
170
+ # repeated LabelDescriptor labels = 2;
171
+ #
172
+ # // Whether the metric records instantaneous values, changes to a value, etc.
173
+ # // Some combinations of `metric_kind` and `value_type` might not be supported.
174
+ # MetricKind metric_kind = 3;
175
+ #
176
+ # // Whether the measurement is an integer, a floating-point number, etc.
177
+ # // Some combinations of `metric_kind` and `value_type` might not be supported.
178
+ # ValueType value_type = 4;
179
+ #
180
+ # // The units in which the metric value is reported. It is only applicable
181
+ # // if the `value_type` is `INT64`, `DOUBLE`, or `DISTRIBUTION`. The `unit`
182
+ # // defines the representation of the stored metric values.
183
+ # //
184
+ # // Different systems might scale the values to be more easily displayed (so a
185
+ # // value of `0.02kBy` _might_ be displayed as `20By`, and a value of
186
+ # // `3523kBy` _might_ be displayed as `3.5MBy`). However, if the `unit` is
187
+ # // `kBy`, then the value of the metric is always in thousands of bytes, no
188
+ # // matter how it might be displayed.
189
+ # //
190
+ # // If you want a custom metric to record the exact number of CPU-seconds used
191
+ # // by a job, you can create an `INT64 CUMULATIVE` metric whose `unit` is
192
+ # // `s{CPU}` (or equivalently `1s{CPU}` or just `s`). If the job uses 12,005
193
+ # // CPU-seconds, then the value is written as `12005`.
194
+ # //
195
+ # // Alternatively, if you want a custom metric to record data in a more
196
+ # // granular way, you can create a `DOUBLE CUMULATIVE` metric whose `unit` is
197
+ # // `ks{CPU}`, and then write the value `12.005` (which is `12005/1000`),
198
+ # // or use `Kis{CPU}` and write `11.723` (which is `12005/1024`).
199
+ # //
200
+ # // The supported units are a subset of [The Unified Code for Units of
201
+ # // Measure](https://unitsofmeasure.org/ucum.html) standard:
202
+ # //
203
+ # // **Basic units (UNIT)**
204
+ # //
205
+ # // * `bit` bit
206
+ # // * `By` byte
207
+ # // * `s` second
208
+ # // * `min` minute
209
+ # // * `h` hour
210
+ # // * `d` day
211
+ # // * `1` dimensionless
212
+ # //
213
+ # // **Prefixes (PREFIX)**
214
+ # //
215
+ # // * `k` kilo (10^3)
216
+ # // * `M` mega (10^6)
217
+ # // * `G` giga (10^9)
218
+ # // * `T` tera (10^12)
219
+ # // * `P` peta (10^15)
220
+ # // * `E` exa (10^18)
221
+ # // * `Z` zetta (10^21)
222
+ # // * `Y` yotta (10^24)
223
+ # //
224
+ # // * `m` milli (10^-3)
225
+ # // * `u` micro (10^-6)
226
+ # // * `n` nano (10^-9)
227
+ # // * `p` pico (10^-12)
228
+ # // * `f` femto (10^-15)
229
+ # // * `a` atto (10^-18)
230
+ # // * `z` zepto (10^-21)
231
+ # // * `y` yocto (10^-24)
232
+ # //
233
+ # // * `Ki` kibi (2^10)
234
+ # // * `Mi` mebi (2^20)
235
+ # // * `Gi` gibi (2^30)
236
+ # // * `Ti` tebi (2^40)
237
+ # // * `Pi` pebi (2^50)
238
+ # //
239
+ # // **Grammar**
240
+ # //
241
+ # // The grammar also includes these connectors:
242
+ # //
243
+ # // * `/` division or ratio (as an infix operator). For examples,
244
+ # // `kBy/{email}` or `MiBy/10ms` (although you should almost never
245
+ # // have `/s` in a metric `unit`; rates should always be computed at
246
+ # // query time from the underlying cumulative or delta value).
247
+ # // * `.` multiplication or composition (as an infix operator). For
248
+ # // examples, `GBy.d` or `k{watt}.h`.
249
+ # //
250
+ # // The grammar for a unit is as follows:
251
+ # //
252
+ # // Expression = Component { "." Component } { "/" Component } ;
253
+ # //
254
+ # // Component = ( [ PREFIX ] UNIT | "%" ) [ Annotation ]
255
+ # // | Annotation
256
+ # // | "1"
257
+ # // ;
258
+ # //
259
+ # // Annotation = "{" NAME "}" ;
260
+ # //
261
+ # // Notes:
262
+ # //
263
+ # // * `Annotation` is just a comment if it follows a `UNIT`. If the annotation
264
+ # // is used alone, then the unit is equivalent to `1`. For examples,
265
+ # // `{request}/s == 1/s`, `By{transmitted}/s == By/s`.
266
+ # // * `NAME` is a sequence of non-blank printable ASCII characters not
267
+ # // containing `{` or `}`.
268
+ # // * `1` represents a unitary [dimensionless
269
+ # // unit](https://en.wikipedia.org/wiki/Dimensionless_quantity) of 1, such
270
+ # // as in `1/s`. It is typically used when none of the basic units are
271
+ # // appropriate. For example, "new users per day" can be represented as
272
+ # // `1/d` or `{new-users}/d` (and a metric value `5` would mean "5 new
273
+ # // users). Alternatively, "thousands of page views per day" would be
274
+ # // represented as `1000/d` or `k1/d` or `k{page_views}/d` (and a metric
275
+ # // value of `5.3` would mean "5300 page views per day").
276
+ # // * `%` represents dimensionless value of 1/100, and annotates values giving
277
+ # // a percentage (so the metric values are typically in the range of 0..100,
278
+ # // and a metric value `3` means "3 percent").
279
+ # // * `10^2.%` indicates a metric contains a ratio, typically in the range
280
+ # // 0..1, that will be multiplied by 100 and displayed as a percentage
281
+ # // (so a metric value `0.03` means "3 percent").
282
+ # string unit = 5;
283
+ #
284
+ # // A detailed description of the metric, which can be used in documentation.
285
+ # string description = 6;
286
+ #
287
+ # // A concise name for the metric, which can be displayed in user interfaces.
288
+ # // Use sentence case without an ending period, for example "Request count".
289
+ # // This field is optional but it is recommended to be set for any metrics
290
+ # // associated with user-visible concepts, such as Quota.
291
+ # string display_name = 7;
292
+ #
293
+ # // Optional. Metadata which can be used to guide usage of the metric.
294
+ # MetricDescriptorMetadata metadata = 10;
295
+ #
296
+ # // Optional. The launch stage of the metric definition.
297
+ # LaunchStage launch_stage = 12;
298
+ #
299
+ # // Read-only. If present, then a [time
300
+ # // series][google.monitoring.v3.TimeSeries], which is identified partially by
301
+ # // a metric type and a
302
+ # // [MonitoredResourceDescriptor][google.api.MonitoredResourceDescriptor], that
303
+ # // is associated with this metric type can only be associated with one of the
304
+ # // monitored resource types listed here.
305
+ # repeated string monitored_resource_types = 13;
306
+ # }
307
+ #
308
+ # // A specific metric, identified by specifying values for all of the
309
+ # // labels of a [`MetricDescriptor`][google.api.MetricDescriptor].
310
+ # message Metric {
311
+ # // An existing metric type, see
312
+ # // [google.api.MetricDescriptor][google.api.MetricDescriptor]. For example,
313
+ # // `custom.googleapis.com/invoice/paid/amount`.
314
+ # string type = 3;
315
+ #
316
+ # // The set of label values that uniquely identify this metric. All
317
+ # // labels listed in the `MetricDescriptor` must be assigned values.
318
+ # map<string, string> labels = 2;
319
+ # }
@@ -1,3 +1,4 @@
1
+ # frozen_string_literal: true
1
2
  # Generated by the protocol buffer compiler. DO NOT EDIT!
2
3
  # source: google/api/monitored_resource.proto
3
4
 
@@ -7,25 +8,33 @@ require 'google/api/label_pb'
7
8
  require 'google/api/launch_stage_pb'
8
9
  require 'google/protobuf/struct_pb'
9
10
 
10
- Google::Protobuf::DescriptorPool.generated_pool.build do
11
- add_file("google/api/monitored_resource.proto", :syntax => :proto3) do
12
- add_message "google.api.MonitoredResourceDescriptor" do
13
- optional :name, :string, 5
14
- optional :type, :string, 1
15
- optional :display_name, :string, 2
16
- optional :description, :string, 3
17
- repeated :labels, :message, 4, "google.api.LabelDescriptor"
18
- optional :launch_stage, :enum, 7, "google.api.LaunchStage"
19
- end
20
- add_message "google.api.MonitoredResource" do
21
- optional :type, :string, 1
22
- map :labels, :string, :string, 2
23
- end
24
- add_message "google.api.MonitoredResourceMetadata" do
25
- optional :system_labels, :message, 1, "google.protobuf.Struct"
26
- map :user_labels, :string, :string, 2
11
+
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\x42y\n\x0e\x63om.google.apiB\x16MonitoredResourceProtoP\x01ZCgoogle.golang.org/genproto/googleapis/api/monitoredres;monitoredres\xf8\x01\x01\xa2\x02\x04GAPIb\x06proto3"
13
+
14
+ pool = Google::Protobuf::DescriptorPool.generated_pool
15
+
16
+ begin
17
+ pool.add_serialized_file(descriptor_data)
18
+ rescue TypeError => e
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}"
27
34
  end
28
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."
29
38
  end
30
39
 
31
40
  module Google
@@ -35,3 +44,136 @@ module Google
35
44
  MonitoredResourceMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.api.MonitoredResourceMetadata").msgclass
36
45
  end
37
46
  end
47
+
48
+ #### Source proto file: google/api/monitored_resource.proto ####
49
+ #
50
+ # // Copyright 2023 Google LLC
51
+ # //
52
+ # // Licensed under the Apache License, Version 2.0 (the "License");
53
+ # // you may not use this file except in compliance with the License.
54
+ # // You may obtain a copy of the License at
55
+ # //
56
+ # // http://www.apache.org/licenses/LICENSE-2.0
57
+ # //
58
+ # // Unless required by applicable law or agreed to in writing, software
59
+ # // distributed under the License is distributed on an "AS IS" BASIS,
60
+ # // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
61
+ # // See the License for the specific language governing permissions and
62
+ # // limitations under the License.
63
+ #
64
+ # syntax = "proto3";
65
+ #
66
+ # package google.api;
67
+ #
68
+ # import "google/api/label.proto";
69
+ # import "google/api/launch_stage.proto";
70
+ # import "google/protobuf/struct.proto";
71
+ #
72
+ # option cc_enable_arenas = true;
73
+ # option go_package = "google.golang.org/genproto/googleapis/api/monitoredres;monitoredres";
74
+ # option java_multiple_files = true;
75
+ # option java_outer_classname = "MonitoredResourceProto";
76
+ # option java_package = "com.google.api";
77
+ # option objc_class_prefix = "GAPI";
78
+ #
79
+ # // An object that describes the schema of a
80
+ # // [MonitoredResource][google.api.MonitoredResource] object using a type name
81
+ # // and a set of labels. For example, the monitored resource descriptor for
82
+ # // Google Compute Engine VM instances has a type of
83
+ # // `"gce_instance"` and specifies the use of the labels `"instance_id"` and
84
+ # // `"zone"` to identify particular VM instances.
85
+ # //
86
+ # // Different APIs can support different monitored resource types. APIs generally
87
+ # // provide a `list` method that returns the monitored resource descriptors used
88
+ # // by the API.
89
+ # //
90
+ # message MonitoredResourceDescriptor {
91
+ # // Optional. The resource name of the monitored resource descriptor:
92
+ # // `"projects/{project_id}/monitoredResourceDescriptors/{type}"` where
93
+ # // {type} is the value of the `type` field in this object and
94
+ # // {project_id} is a project ID that provides API-specific context for
95
+ # // accessing the type. APIs that do not use project information can use the
96
+ # // resource name format `"monitoredResourceDescriptors/{type}"`.
97
+ # string name = 5;
98
+ #
99
+ # // Required. The monitored resource type. For example, the type
100
+ # // `"cloudsql_database"` represents databases in Google Cloud SQL.
101
+ # // For a list of types, see [Monitoring resource
102
+ # // types](https://cloud.google.com/monitoring/api/resources)
103
+ # // and [Logging resource
104
+ # // types](https://cloud.google.com/logging/docs/api/v2/resource-list).
105
+ # string type = 1;
106
+ #
107
+ # // Optional. A concise name for the monitored resource type that might be
108
+ # // displayed in user interfaces. It should be a Title Cased Noun Phrase,
109
+ # // without any article or other determiners. For example,
110
+ # // `"Google Cloud SQL Database"`.
111
+ # string display_name = 2;
112
+ #
113
+ # // Optional. A detailed description of the monitored resource type that might
114
+ # // be used in documentation.
115
+ # string description = 3;
116
+ #
117
+ # // Required. A set of labels used to describe instances of this monitored
118
+ # // resource type. For example, an individual Google Cloud SQL database is
119
+ # // identified by values for the labels `"database_id"` and `"zone"`.
120
+ # repeated LabelDescriptor labels = 4;
121
+ #
122
+ # // Optional. The launch stage of the monitored resource definition.
123
+ # LaunchStage launch_stage = 7;
124
+ # }
125
+ #
126
+ # // An object representing a resource that can be used for monitoring, logging,
127
+ # // billing, or other purposes. Examples include virtual machine instances,
128
+ # // databases, and storage devices such as disks. The `type` field identifies a
129
+ # // [MonitoredResourceDescriptor][google.api.MonitoredResourceDescriptor] object
130
+ # // that describes the resource's schema. Information in the `labels` field
131
+ # // identifies the actual resource and its attributes according to the schema.
132
+ # // For example, a particular Compute Engine VM instance could be represented by
133
+ # // the following object, because the
134
+ # // [MonitoredResourceDescriptor][google.api.MonitoredResourceDescriptor] for
135
+ # // `"gce_instance"` has labels
136
+ # // `"project_id"`, `"instance_id"` and `"zone"`:
137
+ # //
138
+ # // { "type": "gce_instance",
139
+ # // "labels": { "project_id": "my-project",
140
+ # // "instance_id": "12345678901234",
141
+ # // "zone": "us-central1-a" }}
142
+ # message MonitoredResource {
143
+ # // Required. The monitored resource type. This field must match
144
+ # // the `type` field of a
145
+ # // [MonitoredResourceDescriptor][google.api.MonitoredResourceDescriptor]
146
+ # // object. For example, the type of a Compute Engine VM instance is
147
+ # // `gce_instance`. Some descriptors include the service name in the type; for
148
+ # // example, the type of a Datastream stream is
149
+ # // `datastream.googleapis.com/Stream`.
150
+ # string type = 1;
151
+ #
152
+ # // Required. Values for all of the labels listed in the associated monitored
153
+ # // resource descriptor. For example, Compute Engine VM instances use the
154
+ # // labels `"project_id"`, `"instance_id"`, and `"zone"`.
155
+ # map<string, string> labels = 2;
156
+ # }
157
+ #
158
+ # // Auxiliary metadata for a [MonitoredResource][google.api.MonitoredResource]
159
+ # // object. [MonitoredResource][google.api.MonitoredResource] objects contain the
160
+ # // minimum set of information to uniquely identify a monitored resource
161
+ # // instance. There is some other useful auxiliary metadata. Monitoring and
162
+ # // Logging use an ingestion pipeline to extract metadata for cloud resources of
163
+ # // all types, and store the metadata in this message.
164
+ # message MonitoredResourceMetadata {
165
+ # // Output only. Values for predefined system metadata labels.
166
+ # // System labels are a kind of metadata extracted by Google, including
167
+ # // "machine_image", "vpc", "subnet_id",
168
+ # // "security_group", "name", etc.
169
+ # // System label values can be only strings, Boolean values, or a list of
170
+ # // strings. For example:
171
+ # //
172
+ # // { "name": "my-test-instance",
173
+ # // "security_group": ["a", "b", "c"],
174
+ # // "spot_instance": false }
175
+ # google.protobuf.Struct system_labels = 1;
176
+ #
177
+ # // Output only. A map of user-defined metadata labels.
178
+ # map<string, string> user_labels = 2;
179
+ # }