googleapis-common-protos-types 1.0.2 → 1.18.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 (64) hide show
  1. checksums.yaml +5 -5
  2. data/CHANGELOG.md +173 -0
  3. data/README.md +19 -0
  4. data/lib/google/api/annotations_pb.rb +63 -1
  5. data/lib/google/api/auth_pb.rb +271 -30
  6. data/lib/google/api/backend_pb.rb +216 -11
  7. data/lib/google/api/billing_pb.rb +107 -11
  8. data/lib/google/api/client_pb.rb +534 -0
  9. data/lib/google/api/config_change_pb.rb +115 -19
  10. data/lib/google/api/consumer_pb.rb +113 -18
  11. data/lib/google/api/context_pb.rb +122 -10
  12. data/lib/google/api/control_pb.rb +73 -4
  13. data/lib/google/api/distribution_pb.rb +250 -38
  14. data/lib/google/api/documentation_pb.rb +199 -20
  15. data/lib/google/api/endpoint_pb.rb +98 -9
  16. data/lib/google/api/error_reason_pb.rb +663 -0
  17. data/lib/google/api/field_behavior_pb.rb +147 -0
  18. data/lib/google/api/field_info_pb.rb +151 -0
  19. data/lib/google/api/http_pb.rb +401 -23
  20. data/lib/google/api/httpbody_pb.rb +111 -6
  21. data/lib/google/api/label_pb.rb +78 -12
  22. data/lib/google/api/launch_stage_pb.rb +113 -0
  23. data/lib/google/api/log_pb.rb +85 -7
  24. data/lib/google/api/logging_pb.rb +111 -11
  25. data/lib/google/api/metric_pb.rb +326 -33
  26. data/lib/google/api/monitored_resource_pb.rb +165 -18
  27. data/lib/google/api/monitoring_pb.rb +137 -11
  28. data/lib/google/api/policy_pb.rb +127 -0
  29. data/lib/google/api/quota_pb.rb +215 -24
  30. data/lib/google/api/resource_pb.rb +289 -0
  31. data/lib/google/api/routing_pb.rb +505 -0
  32. data/lib/google/api/service_pb.rb +243 -33
  33. data/lib/google/api/source_info_pb.rb +62 -4
  34. data/lib/google/api/system_parameter_pb.rb +127 -15
  35. data/lib/google/api/usage_pb.rb +126 -13
  36. data/lib/google/api/visibility_pb.rb +157 -0
  37. data/lib/google/logging/type/http_request_pb.rb +136 -19
  38. data/lib/google/logging/type/log_severity_pb.rb +110 -13
  39. data/lib/google/longrunning/operations_pb.rb +288 -33
  40. data/lib/google/rpc/code_pb.rb +215 -20
  41. data/lib/google/rpc/context/attribute_context_pb.rb +403 -0
  42. data/lib/google/rpc/context/audit_context_pb.rb +94 -0
  43. data/lib/google/rpc/error_details_pb.rb +342 -63
  44. data/lib/google/rpc/http_pb.rb +107 -0
  45. data/lib/google/rpc/status_pb.rb +80 -6
  46. data/lib/google/type/calendar_period_pb.rb +97 -0
  47. data/lib/google/type/color_pb.rb +205 -7
  48. data/lib/google/type/date_pb.rb +81 -6
  49. data/lib/google/type/datetime_pb.rb +149 -0
  50. data/lib/google/type/dayofweek_pb.rb +79 -11
  51. data/lib/google/type/decimal_pb.rb +136 -0
  52. data/lib/google/type/expr_pb.rb +114 -0
  53. data/lib/google/type/fraction_pb.rb +74 -0
  54. data/lib/google/type/interval_pb.rb +90 -0
  55. data/lib/google/type/latlng_pb.rb +66 -5
  56. data/lib/google/type/localized_text_pb.rb +77 -0
  57. data/lib/google/type/money_pb.rb +71 -6
  58. data/lib/google/type/month_pb.rb +106 -0
  59. data/lib/google/type/phone_number_pb.rb +155 -0
  60. data/lib/google/type/postal_address_pb.rb +163 -14
  61. data/lib/google/type/quaternion_pb.rb +135 -0
  62. data/lib/google/type/timeofday_pb.rb +73 -7
  63. data/lib/googleapis/common/protos/types/version.rb +23 -0
  64. metadata +43 -43
@@ -1,46 +1,339 @@
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
 
4
5
  require 'google/protobuf'
5
6
 
6
7
  require 'google/api/label_pb'
7
- Google::Protobuf::DescriptorPool.generated_pool.build do
8
- add_message "google.api.MetricDescriptor" do
9
- optional :name, :string, 1
10
- optional :type, :string, 8
11
- repeated :labels, :message, 2, "google.api.LabelDescriptor"
12
- optional :metric_kind, :enum, 3, "google.api.MetricDescriptor.MetricKind"
13
- optional :value_type, :enum, 4, "google.api.MetricDescriptor.ValueType"
14
- optional :unit, :string, 5
15
- optional :description, :string, 6
16
- optional :display_name, :string, 7
17
- end
18
- add_enum "google.api.MetricDescriptor.MetricKind" do
19
- value :METRIC_KIND_UNSPECIFIED, 0
20
- value :GAUGE, 1
21
- value :DELTA, 2
22
- value :CUMULATIVE, 3
23
- end
24
- add_enum "google.api.MetricDescriptor.ValueType" do
25
- value :VALUE_TYPE_UNSPECIFIED, 0
26
- value :BOOL, 1
27
- value :INT64, 2
28
- value :DOUBLE, 3
29
- value :STRING, 4
30
- value :DISTRIBUTION, 5
31
- value :MONEY, 6
32
- end
33
- add_message "google.api.Metric" do
34
- optional :type, :string, 3
35
- map :labels, :string, :string, 2
8
+ require 'google/api/launch_stage_pb'
9
+ require 'google/protobuf/duration_pb'
10
+
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\"\xac\x08\n\x10MetricDescriptor\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x0c\n\x04type\x18\x08 \x01(\t\x12+\n\x06labels\x18\x02 \x03(\x0b\x32\x1b.google.api.LabelDescriptor\x12<\n\x0bmetric_kind\x18\x03 \x01(\x0e\x32\'.google.api.MetricDescriptor.MetricKind\x12:\n\nvalue_type\x18\x04 \x01(\x0e\x32&.google.api.MetricDescriptor.ValueType\x12\x0c\n\x04unit\x18\x05 \x01(\t\x12\x13\n\x0b\x64\x65scription\x18\x06 \x01(\t\x12\x14\n\x0c\x64isplay_name\x18\x07 \x01(\t\x12G\n\x08metadata\x18\n \x01(\x0b\x32\x35.google.api.MetricDescriptor.MetricDescriptorMetadata\x12-\n\x0claunch_stage\x18\x0c \x01(\x0e\x32\x17.google.api.LaunchStage\x12 \n\x18monitored_resource_types\x18\r \x03(\t\x1a\xbd\x03\n\x18MetricDescriptorMetadata\x12\x31\n\x0claunch_stage\x18\x01 \x01(\x0e\x32\x17.google.api.LaunchStageB\x02\x18\x01\x12\x30\n\rsample_period\x18\x02 \x01(\x0b\x32\x19.google.protobuf.Duration\x12/\n\x0cingest_delay\x18\x03 \x01(\x0b\x32\x19.google.protobuf.Duration\x12\x84\x01\n$time_series_resource_hierarchy_level\x18\x04 \x03(\x0e\x32V.google.api.MetricDescriptor.MetricDescriptorMetadata.TimeSeriesResourceHierarchyLevel\"\x83\x01\n TimeSeriesResourceHierarchyLevel\x12\x34\n0TIME_SERIES_RESOURCE_HIERARCHY_LEVEL_UNSPECIFIED\x10\x00\x12\x0b\n\x07PROJECT\x10\x01\x12\x10\n\x0cORGANIZATION\x10\x02\x12\n\n\x06\x46OLDER\x10\x03\"O\n\nMetricKind\x12\x1b\n\x17METRIC_KIND_UNSPECIFIED\x10\x00\x12\t\n\x05GAUGE\x10\x01\x12\t\n\x05\x44\x45LTA\x10\x02\x12\x0e\n\nCUMULATIVE\x10\x03\"q\n\tValueType\x12\x1a\n\x16VALUE_TYPE_UNSPECIFIED\x10\x00\x12\x08\n\x04\x42OOL\x10\x01\x12\t\n\x05INT64\x10\x02\x12\n\n\x06\x44OUBLE\x10\x03\x12\n\n\x06STRING\x10\x04\x12\x10\n\x0c\x44ISTRIBUTION\x10\x05\x12\t\n\x05MONEY\x10\x06\"u\n\x06Metric\x12\x0c\n\x04type\x18\x03 \x01(\t\x12.\n\x06labels\x18\x02 \x03(\x0b\x32\x1e.google.api.Metric.LabelsEntry\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x42_\n\x0e\x63om.google.apiB\x0bMetricProtoP\x01Z7google.golang.org/genproto/googleapis/api/metric;metric\xa2\x02\x04GAPIb\x06proto3"
13
+
14
+ pool = Google::Protobuf::DescriptorPool.generated_pool
15
+
16
+ begin
17
+ pool.add_serialized_file(descriptor_data)
18
+ rescue TypeError
19
+ # Compatibility code: will be removed in the next major version.
20
+ require 'google/protobuf/descriptor_pb'
21
+ parsed = Google::Protobuf::FileDescriptorProto.decode(descriptor_data)
22
+ parsed.clear_dependency
23
+ serialized = parsed.class.encode(parsed)
24
+ file = pool.add_serialized_file(serialized)
25
+ warn "Warning: Protobuf detected an import path issue while loading generated file #{__FILE__}"
26
+ imports = [
27
+ ["google.api.LabelDescriptor", "google/api/label.proto"],
28
+ ["google.protobuf.Duration", "google/protobuf/duration.proto"],
29
+ ]
30
+ imports.each do |type_name, expected_filename|
31
+ import_file = pool.lookup(type_name).file_descriptor
32
+ if import_file.name != expected_filename
33
+ warn "- #{file.name} imports #{expected_filename}, but that import was loaded as #{import_file.name}"
34
+ end
36
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."
37
38
  end
38
39
 
39
40
  module Google
40
41
  module Api
41
- MetricDescriptor = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.api.MetricDescriptor").msgclass
42
- MetricDescriptor::MetricKind = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.api.MetricDescriptor.MetricKind").enummodule
43
- MetricDescriptor::ValueType = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.api.MetricDescriptor.ValueType").enummodule
44
- Metric = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.api.Metric").msgclass
42
+ MetricDescriptor = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.api.MetricDescriptor").msgclass
43
+ MetricDescriptor::MetricDescriptorMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.api.MetricDescriptor.MetricDescriptorMetadata").msgclass
44
+ MetricDescriptor::MetricDescriptorMetadata::TimeSeriesResourceHierarchyLevel = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.api.MetricDescriptor.MetricDescriptorMetadata.TimeSeriesResourceHierarchyLevel").enummodule
45
+ MetricDescriptor::MetricKind = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.api.MetricDescriptor.MetricKind").enummodule
46
+ MetricDescriptor::ValueType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.api.MetricDescriptor.ValueType").enummodule
47
+ Metric = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.api.Metric").msgclass
45
48
  end
46
49
  end
50
+
51
+ #### Source proto file: google/api/metric.proto ####
52
+ #
53
+ # // Copyright 2024 Google LLC
54
+ # //
55
+ # // Licensed under the Apache License, Version 2.0 (the "License");
56
+ # // you may not use this file except in compliance with the License.
57
+ # // You may obtain a copy of the License at
58
+ # //
59
+ # // http://www.apache.org/licenses/LICENSE-2.0
60
+ # //
61
+ # // Unless required by applicable law or agreed to in writing, software
62
+ # // distributed under the License is distributed on an "AS IS" BASIS,
63
+ # // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
64
+ # // See the License for the specific language governing permissions and
65
+ # // limitations under the License.
66
+ #
67
+ # syntax = "proto3";
68
+ #
69
+ # package google.api;
70
+ #
71
+ # import "google/api/label.proto";
72
+ # import "google/api/launch_stage.proto";
73
+ # import "google/protobuf/duration.proto";
74
+ #
75
+ # option go_package = "google.golang.org/genproto/googleapis/api/metric;metric";
76
+ # option java_multiple_files = true;
77
+ # option java_outer_classname = "MetricProto";
78
+ # option java_package = "com.google.api";
79
+ # option objc_class_prefix = "GAPI";
80
+ #
81
+ # // Defines a metric type and its schema. Once a metric descriptor is created,
82
+ # // deleting or altering it stops data collection and makes the metric type's
83
+ # // existing data unusable.
84
+ # //
85
+ # message MetricDescriptor {
86
+ # // The kind of measurement. It describes how the data is reported.
87
+ # // For information on setting the start time and end time based on
88
+ # // the MetricKind, see [TimeInterval][google.monitoring.v3.TimeInterval].
89
+ # enum MetricKind {
90
+ # // Do not use this default value.
91
+ # METRIC_KIND_UNSPECIFIED = 0;
92
+ #
93
+ # // An instantaneous measurement of a value.
94
+ # GAUGE = 1;
95
+ #
96
+ # // The change in a value during a time interval.
97
+ # DELTA = 2;
98
+ #
99
+ # // A value accumulated over a time interval. Cumulative
100
+ # // measurements in a time series should have the same start time
101
+ # // and increasing end times, until an event resets the cumulative
102
+ # // value to zero and sets a new start time for the following
103
+ # // points.
104
+ # CUMULATIVE = 3;
105
+ # }
106
+ #
107
+ # // The value type of a metric.
108
+ # enum ValueType {
109
+ # // Do not use this default value.
110
+ # VALUE_TYPE_UNSPECIFIED = 0;
111
+ #
112
+ # // The value is a boolean.
113
+ # // This value type can be used only if the metric kind is `GAUGE`.
114
+ # BOOL = 1;
115
+ #
116
+ # // The value is a signed 64-bit integer.
117
+ # INT64 = 2;
118
+ #
119
+ # // The value is a double precision floating point number.
120
+ # DOUBLE = 3;
121
+ #
122
+ # // The value is a text string.
123
+ # // This value type can be used only if the metric kind is `GAUGE`.
124
+ # STRING = 4;
125
+ #
126
+ # // The value is a [`Distribution`][google.api.Distribution].
127
+ # DISTRIBUTION = 5;
128
+ #
129
+ # // The value is money.
130
+ # MONEY = 6;
131
+ # }
132
+ #
133
+ # // Additional annotations that can be used to guide the usage of a metric.
134
+ # message MetricDescriptorMetadata {
135
+ # // The resource hierarchy level of the timeseries data of a metric.
136
+ # enum TimeSeriesResourceHierarchyLevel {
137
+ # // Do not use this default value.
138
+ # TIME_SERIES_RESOURCE_HIERARCHY_LEVEL_UNSPECIFIED = 0;
139
+ #
140
+ # // Scopes a metric to a project.
141
+ # PROJECT = 1;
142
+ #
143
+ # // Scopes a metric to an organization.
144
+ # ORGANIZATION = 2;
145
+ #
146
+ # // Scopes a metric to a folder.
147
+ # FOLDER = 3;
148
+ # }
149
+ #
150
+ # // Deprecated. Must use the
151
+ # // [MetricDescriptor.launch_stage][google.api.MetricDescriptor.launch_stage]
152
+ # // instead.
153
+ # LaunchStage launch_stage = 1 [deprecated = true];
154
+ #
155
+ # // The sampling period of metric data points. For metrics which are written
156
+ # // periodically, consecutive data points are stored at this time interval,
157
+ # // excluding data loss due to errors. Metrics with a higher granularity have
158
+ # // a smaller sampling period.
159
+ # google.protobuf.Duration sample_period = 2;
160
+ #
161
+ # // The delay of data points caused by ingestion. Data points older than this
162
+ # // age are guaranteed to be ingested and available to be read, excluding
163
+ # // data loss due to errors.
164
+ # google.protobuf.Duration ingest_delay = 3;
165
+ #
166
+ # // The scope of the timeseries data of the metric.
167
+ # repeated TimeSeriesResourceHierarchyLevel
168
+ # time_series_resource_hierarchy_level = 4;
169
+ # }
170
+ #
171
+ # // The resource name of the metric descriptor.
172
+ # string name = 1;
173
+ #
174
+ # // The metric type, including its DNS name prefix. The type is not
175
+ # // URL-encoded. All user-defined metric types have the DNS name
176
+ # // `custom.googleapis.com` or `external.googleapis.com`. Metric types should
177
+ # // use a natural hierarchical grouping. For example:
178
+ # //
179
+ # // "custom.googleapis.com/invoice/paid/amount"
180
+ # // "external.googleapis.com/prometheus/up"
181
+ # // "appengine.googleapis.com/http/server/response_latencies"
182
+ # string type = 8;
183
+ #
184
+ # // The set of labels that can be used to describe a specific
185
+ # // instance of this metric type. For example, the
186
+ # // `appengine.googleapis.com/http/server/response_latencies` metric
187
+ # // type has a label for the HTTP response code, `response_code`, so
188
+ # // you can look at latencies for successful responses or just
189
+ # // for responses that failed.
190
+ # repeated LabelDescriptor labels = 2;
191
+ #
192
+ # // Whether the metric records instantaneous values, changes to a value, etc.
193
+ # // Some combinations of `metric_kind` and `value_type` might not be supported.
194
+ # MetricKind metric_kind = 3;
195
+ #
196
+ # // Whether the measurement is an integer, a floating-point number, etc.
197
+ # // Some combinations of `metric_kind` and `value_type` might not be supported.
198
+ # ValueType value_type = 4;
199
+ #
200
+ # // The units in which the metric value is reported. It is only applicable
201
+ # // if the `value_type` is `INT64`, `DOUBLE`, or `DISTRIBUTION`. The `unit`
202
+ # // defines the representation of the stored metric values.
203
+ # //
204
+ # // Different systems might scale the values to be more easily displayed (so a
205
+ # // value of `0.02kBy` _might_ be displayed as `20By`, and a value of
206
+ # // `3523kBy` _might_ be displayed as `3.5MBy`). However, if the `unit` is
207
+ # // `kBy`, then the value of the metric is always in thousands of bytes, no
208
+ # // matter how it might be displayed.
209
+ # //
210
+ # // If you want a custom metric to record the exact number of CPU-seconds used
211
+ # // by a job, you can create an `INT64 CUMULATIVE` metric whose `unit` is
212
+ # // `s{CPU}` (or equivalently `1s{CPU}` or just `s`). If the job uses 12,005
213
+ # // CPU-seconds, then the value is written as `12005`.
214
+ # //
215
+ # // Alternatively, if you want a custom metric to record data in a more
216
+ # // granular way, you can create a `DOUBLE CUMULATIVE` metric whose `unit` is
217
+ # // `ks{CPU}`, and then write the value `12.005` (which is `12005/1000`),
218
+ # // or use `Kis{CPU}` and write `11.723` (which is `12005/1024`).
219
+ # //
220
+ # // The supported units are a subset of [The Unified Code for Units of
221
+ # // Measure](https://unitsofmeasure.org/ucum.html) standard:
222
+ # //
223
+ # // **Basic units (UNIT)**
224
+ # //
225
+ # // * `bit` bit
226
+ # // * `By` byte
227
+ # // * `s` second
228
+ # // * `min` minute
229
+ # // * `h` hour
230
+ # // * `d` day
231
+ # // * `1` dimensionless
232
+ # //
233
+ # // **Prefixes (PREFIX)**
234
+ # //
235
+ # // * `k` kilo (10^3)
236
+ # // * `M` mega (10^6)
237
+ # // * `G` giga (10^9)
238
+ # // * `T` tera (10^12)
239
+ # // * `P` peta (10^15)
240
+ # // * `E` exa (10^18)
241
+ # // * `Z` zetta (10^21)
242
+ # // * `Y` yotta (10^24)
243
+ # //
244
+ # // * `m` milli (10^-3)
245
+ # // * `u` micro (10^-6)
246
+ # // * `n` nano (10^-9)
247
+ # // * `p` pico (10^-12)
248
+ # // * `f` femto (10^-15)
249
+ # // * `a` atto (10^-18)
250
+ # // * `z` zepto (10^-21)
251
+ # // * `y` yocto (10^-24)
252
+ # //
253
+ # // * `Ki` kibi (2^10)
254
+ # // * `Mi` mebi (2^20)
255
+ # // * `Gi` gibi (2^30)
256
+ # // * `Ti` tebi (2^40)
257
+ # // * `Pi` pebi (2^50)
258
+ # //
259
+ # // **Grammar**
260
+ # //
261
+ # // The grammar also includes these connectors:
262
+ # //
263
+ # // * `/` division or ratio (as an infix operator). For examples,
264
+ # // `kBy/{email}` or `MiBy/10ms` (although you should almost never
265
+ # // have `/s` in a metric `unit`; rates should always be computed at
266
+ # // query time from the underlying cumulative or delta value).
267
+ # // * `.` multiplication or composition (as an infix operator). For
268
+ # // examples, `GBy.d` or `k{watt}.h`.
269
+ # //
270
+ # // The grammar for a unit is as follows:
271
+ # //
272
+ # // Expression = Component { "." Component } { "/" Component } ;
273
+ # //
274
+ # // Component = ( [ PREFIX ] UNIT | "%" ) [ Annotation ]
275
+ # // | Annotation
276
+ # // | "1"
277
+ # // ;
278
+ # //
279
+ # // Annotation = "{" NAME "}" ;
280
+ # //
281
+ # // Notes:
282
+ # //
283
+ # // * `Annotation` is just a comment if it follows a `UNIT`. If the annotation
284
+ # // is used alone, then the unit is equivalent to `1`. For examples,
285
+ # // `{request}/s == 1/s`, `By{transmitted}/s == By/s`.
286
+ # // * `NAME` is a sequence of non-blank printable ASCII characters not
287
+ # // containing `{` or `}`.
288
+ # // * `1` represents a unitary [dimensionless
289
+ # // unit](https://en.wikipedia.org/wiki/Dimensionless_quantity) of 1, such
290
+ # // as in `1/s`. It is typically used when none of the basic units are
291
+ # // appropriate. For example, "new users per day" can be represented as
292
+ # // `1/d` or `{new-users}/d` (and a metric value `5` would mean "5 new
293
+ # // users). Alternatively, "thousands of page views per day" would be
294
+ # // represented as `1000/d` or `k1/d` or `k{page_views}/d` (and a metric
295
+ # // value of `5.3` would mean "5300 page views per day").
296
+ # // * `%` represents dimensionless value of 1/100, and annotates values giving
297
+ # // a percentage (so the metric values are typically in the range of 0..100,
298
+ # // and a metric value `3` means "3 percent").
299
+ # // * `10^2.%` indicates a metric contains a ratio, typically in the range
300
+ # // 0..1, that will be multiplied by 100 and displayed as a percentage
301
+ # // (so a metric value `0.03` means "3 percent").
302
+ # string unit = 5;
303
+ #
304
+ # // A detailed description of the metric, which can be used in documentation.
305
+ # string description = 6;
306
+ #
307
+ # // A concise name for the metric, which can be displayed in user interfaces.
308
+ # // Use sentence case without an ending period, for example "Request count".
309
+ # // This field is optional but it is recommended to be set for any metrics
310
+ # // associated with user-visible concepts, such as Quota.
311
+ # string display_name = 7;
312
+ #
313
+ # // Optional. Metadata which can be used to guide usage of the metric.
314
+ # MetricDescriptorMetadata metadata = 10;
315
+ #
316
+ # // Optional. The launch stage of the metric definition.
317
+ # LaunchStage launch_stage = 12;
318
+ #
319
+ # // Read-only. If present, then a [time
320
+ # // series][google.monitoring.v3.TimeSeries], which is identified partially by
321
+ # // a metric type and a
322
+ # // [MonitoredResourceDescriptor][google.api.MonitoredResourceDescriptor], that
323
+ # // is associated with this metric type can only be associated with one of the
324
+ # // monitored resource types listed here.
325
+ # repeated string monitored_resource_types = 13;
326
+ # }
327
+ #
328
+ # // A specific metric, identified by specifying values for all of the
329
+ # // labels of a [`MetricDescriptor`][google.api.MetricDescriptor].
330
+ # message Metric {
331
+ # // An existing metric type, see
332
+ # // [google.api.MetricDescriptor][google.api.MetricDescriptor]. For example,
333
+ # // `custom.googleapis.com/invoice/paid/amount`.
334
+ # string type = 3;
335
+ #
336
+ # // The set of label values that uniquely identify this metric. All
337
+ # // labels listed in the `MetricDescriptor` must be assigned values.
338
+ # map<string, string> labels = 2;
339
+ # }
@@ -1,32 +1,179 @@
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
 
4
5
  require 'google/protobuf'
5
6
 
6
7
  require 'google/api/label_pb'
8
+ require 'google/api/launch_stage_pb'
7
9
  require 'google/protobuf/struct_pb'
8
- Google::Protobuf::DescriptorPool.generated_pool.build do
9
- add_message "google.api.MonitoredResourceDescriptor" do
10
- optional :name, :string, 5
11
- optional :type, :string, 1
12
- optional :display_name, :string, 2
13
- optional :description, :string, 3
14
- repeated :labels, :message, 4, "google.api.LabelDescriptor"
15
- end
16
- add_message "google.api.MonitoredResource" do
17
- optional :type, :string, 1
18
- map :labels, :string, :string, 2
19
- end
20
- add_message "google.api.MonitoredResourceMetadata" do
21
- optional :system_labels, :message, 1, "google.protobuf.Struct"
22
- map :user_labels, :string, :string, 2
10
+
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
19
+ # Compatibility code: will be removed in the next major version.
20
+ require 'google/protobuf/descriptor_pb'
21
+ parsed = Google::Protobuf::FileDescriptorProto.decode(descriptor_data)
22
+ parsed.clear_dependency
23
+ serialized = parsed.class.encode(parsed)
24
+ file = pool.add_serialized_file(serialized)
25
+ warn "Warning: Protobuf detected an import path issue while loading generated file #{__FILE__}"
26
+ imports = [
27
+ ["google.api.LabelDescriptor", "google/api/label.proto"],
28
+ ["google.protobuf.Struct", "google/protobuf/struct.proto"],
29
+ ]
30
+ imports.each do |type_name, expected_filename|
31
+ import_file = pool.lookup(type_name).file_descriptor
32
+ if import_file.name != expected_filename
33
+ warn "- #{file.name} imports #{expected_filename}, but that import was loaded as #{import_file.name}"
34
+ end
23
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."
24
38
  end
25
39
 
26
40
  module Google
27
41
  module Api
28
- MonitoredResourceDescriptor = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.api.MonitoredResourceDescriptor").msgclass
29
- MonitoredResource = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.api.MonitoredResource").msgclass
30
- MonitoredResourceMetadata = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.api.MonitoredResourceMetadata").msgclass
42
+ MonitoredResourceDescriptor = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.api.MonitoredResourceDescriptor").msgclass
43
+ MonitoredResource = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.api.MonitoredResource").msgclass
44
+ MonitoredResourceMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.api.MonitoredResourceMetadata").msgclass
31
45
  end
32
46
  end
47
+
48
+ #### Source proto file: google/api/monitored_resource.proto ####
49
+ #
50
+ # // Copyright 2024 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 [Monitored 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
+ # }