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.
- checksums.yaml +4 -4
- data/CHANGELOG.md +13 -0
- data/lib/google/api/annotations_pb.rb +60 -2
- data/lib/google/api/auth_pb.rb +264 -34
- data/lib/google/api/backend_pb.rb +212 -23
- data/lib/google/api/billing_pb.rb +104 -8
- data/lib/google/api/client_pb.rb +422 -86
- data/lib/google/api/config_change_pb.rb +111 -17
- data/lib/google/api/consumer_pb.rb +109 -16
- data/lib/google/api/context_pb.rb +117 -11
- data/lib/google/api/control_pb.rb +71 -4
- data/lib/google/api/distribution_pb.rb +242 -39
- data/lib/google/api/documentation_pb.rb +195 -19
- data/lib/google/api/endpoint_pb.rb +100 -7
- data/lib/google/api/error_reason_pb.rb +597 -33
- data/lib/google/api/field_behavior_pb.rb +131 -11
- data/lib/google/api/http_pb.rb +406 -23
- data/lib/google/api/httpbody_pb.rb +109 -6
- data/lib/google/api/label_pb.rb +75 -11
- data/lib/google/api/launch_stage_pb.rb +99 -11
- data/lib/google/api/log_pb.rb +82 -7
- data/lib/google/api/logging_pb.rb +108 -9
- data/lib/google/api/metric_pb.rb +297 -38
- data/lib/google/api/monitored_resource_pb.rb +159 -17
- data/lib/google/api/monitoring_pb.rb +134 -9
- data/lib/google/api/policy_pb.rb +129 -0
- data/lib/google/api/quota_pb.rb +211 -21
- data/lib/google/api/resource_pb.rb +265 -23
- data/lib/google/api/routing_pb.rb +488 -8
- data/lib/google/api/service_pb.rb +239 -29
- data/lib/google/api/source_info_pb.rb +59 -4
- data/lib/google/api/system_parameter_pb.rb +123 -13
- data/lib/google/api/usage_pb.rb +123 -11
- data/lib/google/api/visibility_pb.rb +140 -8
- data/lib/google/logging/type/http_request_pb.rb +123 -18
- data/lib/google/logging/type/log_severity_pb.rb +98 -12
- data/lib/google/longrunning/operations_pb.rb +277 -37
- data/lib/google/rpc/code_pb.rb +213 -20
- data/lib/google/rpc/context/attribute_context_pb.rb +375 -66
- data/lib/google/rpc/context/audit_context_pb.rb +77 -8
- data/lib/google/rpc/error_details_pb.rb +313 -56
- data/lib/google/rpc/http_pb.rb +91 -17
- data/lib/google/rpc/status_pb.rb +77 -6
- data/lib/google/type/calendar_period_pb.rb +83 -11
- data/lib/google/type/color_pb.rb +202 -7
- data/lib/google/type/date_pb.rb +79 -6
- data/lib/google/type/datetime_pb.rb +132 -18
- data/lib/google/type/dayofweek_pb.rb +77 -11
- data/lib/google/type/decimal_pb.rb +122 -4
- data/lib/google/type/expr_pb.rb +100 -7
- data/lib/google/type/fraction_pb.rb +60 -5
- data/lib/google/type/interval_pb.rb +74 -5
- data/lib/google/type/latlng_pb.rb +64 -5
- data/lib/google/type/localized_text_pb.rb +63 -5
- data/lib/google/type/money_pb.rb +69 -6
- data/lib/google/type/month_pb.rb +92 -16
- data/lib/google/type/phone_number_pb.rb +140 -12
- data/lib/google/type/postal_address_pb.rb +161 -14
- data/lib/google/type/quaternion_pb.rb +121 -7
- data/lib/google/type/timeofday_pb.rb +71 -7
- data/lib/googleapis/common/protos/types/version.rb +1 -1
- metadata +6 -5
@@ -1,26 +1,34 @@
|
|
1
|
+
# frozen_string_literal: true
|
1
2
|
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
2
3
|
# source: google/api/consumer.proto
|
3
4
|
|
4
5
|
require 'google/protobuf'
|
5
6
|
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
7
|
+
|
8
|
+
descriptor_data = "\n\x19google/api/consumer.proto\x12\ngoogle.api\"=\n\x11ProjectProperties\x12(\n\nproperties\x18\x01 \x03(\x0b\x32\x14.google.api.Property\"\xac\x01\n\x08Property\x12\x0c\n\x04name\x18\x01 \x01(\t\x12/\n\x04type\x18\x02 \x01(\x0e\x32!.google.api.Property.PropertyType\x12\x13\n\x0b\x64\x65scription\x18\x03 \x01(\t\"L\n\x0cPropertyType\x12\x0f\n\x0bUNSPECIFIED\x10\x00\x12\t\n\x05INT64\x10\x01\x12\x08\n\x04\x42OOL\x10\x02\x12\n\n\x06STRING\x10\x03\x12\n\n\x06\x44OUBLE\x10\x04\x42h\n\x0e\x63om.google.apiB\rConsumerProtoP\x01ZEgoogle.golang.org/genproto/googleapis/api/serviceconfig;serviceconfigb\x06proto3"
|
9
|
+
|
10
|
+
pool = Google::Protobuf::DescriptorPool.generated_pool
|
11
|
+
|
12
|
+
begin
|
13
|
+
pool.add_serialized_file(descriptor_data)
|
14
|
+
rescue TypeError => e
|
15
|
+
# Compatibility code: will be removed in the next major version.
|
16
|
+
require 'google/protobuf/descriptor_pb'
|
17
|
+
parsed = Google::Protobuf::FileDescriptorProto.decode(descriptor_data)
|
18
|
+
parsed.clear_dependency
|
19
|
+
serialized = parsed.class.encode(parsed)
|
20
|
+
file = pool.add_serialized_file(serialized)
|
21
|
+
warn "Warning: Protobuf detected an import path issue while loading generated file #{__FILE__}"
|
22
|
+
imports = [
|
23
|
+
]
|
24
|
+
imports.each do |type_name, expected_filename|
|
25
|
+
import_file = pool.lookup(type_name).file_descriptor
|
26
|
+
if import_file.name != expected_filename
|
27
|
+
warn "- #{file.name} imports #{expected_filename}, but that import was loaded as #{import_file.name}"
|
22
28
|
end
|
23
29
|
end
|
30
|
+
warn "Each proto file must use a consistent fully-qualified name."
|
31
|
+
warn "This will become an error in the next major version."
|
24
32
|
end
|
25
33
|
|
26
34
|
module Google
|
@@ -30,3 +38,88 @@ module Google
|
|
30
38
|
Property::PropertyType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.api.Property.PropertyType").enummodule
|
31
39
|
end
|
32
40
|
end
|
41
|
+
|
42
|
+
#### Source proto file: google/api/consumer.proto ####
|
43
|
+
#
|
44
|
+
# // Copyright 2016 Google LLC
|
45
|
+
# //
|
46
|
+
# // Licensed under the Apache License, Version 2.0 (the "License");
|
47
|
+
# // you may not use this file except in compliance with the License.
|
48
|
+
# // You may obtain a copy of the License at
|
49
|
+
# //
|
50
|
+
# // http://www.apache.org/licenses/LICENSE-2.0
|
51
|
+
# //
|
52
|
+
# // Unless required by applicable law or agreed to in writing, software
|
53
|
+
# // distributed under the License is distributed on an "AS IS" BASIS,
|
54
|
+
# // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
55
|
+
# // See the License for the specific language governing permissions and
|
56
|
+
# // limitations under the License.
|
57
|
+
#
|
58
|
+
# syntax = "proto3";
|
59
|
+
#
|
60
|
+
# package google.api;
|
61
|
+
#
|
62
|
+
# option go_package = "google.golang.org/genproto/googleapis/api/serviceconfig;serviceconfig";
|
63
|
+
# option java_multiple_files = true;
|
64
|
+
# option java_outer_classname = "ConsumerProto";
|
65
|
+
# option java_package = "com.google.api";
|
66
|
+
#
|
67
|
+
# // A descriptor for defining project properties for a service. One service may
|
68
|
+
# // have many consumer projects, and the service may want to behave differently
|
69
|
+
# // depending on some properties on the project. For example, a project may be
|
70
|
+
# // associated with a school, or a business, or a government agency, a business
|
71
|
+
# // type property on the project may affect how a service responds to the client.
|
72
|
+
# // This descriptor defines which properties are allowed to be set on a project.
|
73
|
+
# //
|
74
|
+
# // Example:
|
75
|
+
# //
|
76
|
+
# // project_properties:
|
77
|
+
# // properties:
|
78
|
+
# // - name: NO_WATERMARK
|
79
|
+
# // type: BOOL
|
80
|
+
# // description: Allows usage of the API without watermarks.
|
81
|
+
# // - name: EXTENDED_TILE_CACHE_PERIOD
|
82
|
+
# // type: INT64
|
83
|
+
# message ProjectProperties {
|
84
|
+
# // List of per consumer project-specific properties.
|
85
|
+
# repeated Property properties = 1;
|
86
|
+
# }
|
87
|
+
#
|
88
|
+
# // Defines project properties.
|
89
|
+
# //
|
90
|
+
# // API services can define properties that can be assigned to consumer projects
|
91
|
+
# // so that backends can perform response customization without having to make
|
92
|
+
# // additional calls or maintain additional storage. For example, Maps API
|
93
|
+
# // defines properties that controls map tile cache period, or whether to embed a
|
94
|
+
# // watermark in a result.
|
95
|
+
# //
|
96
|
+
# // These values can be set via API producer console. Only API providers can
|
97
|
+
# // define and set these properties.
|
98
|
+
# message Property {
|
99
|
+
# // Supported data type of the property values
|
100
|
+
# enum PropertyType {
|
101
|
+
# // The type is unspecified, and will result in an error.
|
102
|
+
# UNSPECIFIED = 0;
|
103
|
+
#
|
104
|
+
# // The type is `int64`.
|
105
|
+
# INT64 = 1;
|
106
|
+
#
|
107
|
+
# // The type is `bool`.
|
108
|
+
# BOOL = 2;
|
109
|
+
#
|
110
|
+
# // The type is `string`.
|
111
|
+
# STRING = 3;
|
112
|
+
#
|
113
|
+
# // The type is 'double'.
|
114
|
+
# DOUBLE = 4;
|
115
|
+
# }
|
116
|
+
#
|
117
|
+
# // The name of the property (a.k.a key).
|
118
|
+
# string name = 1;
|
119
|
+
#
|
120
|
+
# // The type of this property.
|
121
|
+
# PropertyType type = 2;
|
122
|
+
#
|
123
|
+
# // The description of the property
|
124
|
+
# string description = 3;
|
125
|
+
# }
|
@@ -1,21 +1,34 @@
|
|
1
|
+
# frozen_string_literal: true
|
1
2
|
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
2
3
|
# source: google/api/context.proto
|
3
4
|
|
4
5
|
require 'google/protobuf'
|
5
6
|
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
7
|
+
|
8
|
+
descriptor_data = "\n\x18google/api/context.proto\x12\ngoogle.api\"1\n\x07\x43ontext\x12&\n\x05rules\x18\x01 \x03(\x0b\x32\x17.google.api.ContextRule\"\x8d\x01\n\x0b\x43ontextRule\x12\x10\n\x08selector\x18\x01 \x01(\t\x12\x11\n\trequested\x18\x02 \x03(\t\x12\x10\n\x08provided\x18\x03 \x03(\t\x12\"\n\x1a\x61llowed_request_extensions\x18\x04 \x03(\t\x12#\n\x1b\x61llowed_response_extensions\x18\x05 \x03(\tBn\n\x0e\x63om.google.apiB\x0c\x43ontextProtoP\x01ZEgoogle.golang.org/genproto/googleapis/api/serviceconfig;serviceconfig\xa2\x02\x04GAPIb\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
|
@@ -24,3 +37,96 @@ module Google
|
|
24
37
|
ContextRule = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.api.ContextRule").msgclass
|
25
38
|
end
|
26
39
|
end
|
40
|
+
|
41
|
+
#### Source proto file: google/api/context.proto ####
|
42
|
+
#
|
43
|
+
# // Copyright 2023 Google LLC
|
44
|
+
# //
|
45
|
+
# // Licensed under the Apache License, Version 2.0 (the "License");
|
46
|
+
# // you may not use this file except in compliance with the License.
|
47
|
+
# // You may obtain a copy of the License at
|
48
|
+
# //
|
49
|
+
# // http://www.apache.org/licenses/LICENSE-2.0
|
50
|
+
# //
|
51
|
+
# // Unless required by applicable law or agreed to in writing, software
|
52
|
+
# // distributed under the License is distributed on an "AS IS" BASIS,
|
53
|
+
# // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
54
|
+
# // See the License for the specific language governing permissions and
|
55
|
+
# // limitations under the License.
|
56
|
+
#
|
57
|
+
# syntax = "proto3";
|
58
|
+
#
|
59
|
+
# package google.api;
|
60
|
+
#
|
61
|
+
# option go_package = "google.golang.org/genproto/googleapis/api/serviceconfig;serviceconfig";
|
62
|
+
# option java_multiple_files = true;
|
63
|
+
# option java_outer_classname = "ContextProto";
|
64
|
+
# option java_package = "com.google.api";
|
65
|
+
# option objc_class_prefix = "GAPI";
|
66
|
+
#
|
67
|
+
# // `Context` defines which contexts an API requests.
|
68
|
+
# //
|
69
|
+
# // Example:
|
70
|
+
# //
|
71
|
+
# // context:
|
72
|
+
# // rules:
|
73
|
+
# // - selector: "*"
|
74
|
+
# // requested:
|
75
|
+
# // - google.rpc.context.ProjectContext
|
76
|
+
# // - google.rpc.context.OriginContext
|
77
|
+
# //
|
78
|
+
# // The above specifies that all methods in the API request
|
79
|
+
# // `google.rpc.context.ProjectContext` and
|
80
|
+
# // `google.rpc.context.OriginContext`.
|
81
|
+
# //
|
82
|
+
# // Available context types are defined in package
|
83
|
+
# // `google.rpc.context`.
|
84
|
+
# //
|
85
|
+
# // This also provides mechanism to allowlist any protobuf message extension that
|
86
|
+
# // can be sent in grpc metadata using “x-goog-ext-<extension_id>-bin” and
|
87
|
+
# // “x-goog-ext-<extension_id>-jspb” format. For example, list any service
|
88
|
+
# // specific protobuf types that can appear in grpc metadata as follows in your
|
89
|
+
# // yaml file:
|
90
|
+
# //
|
91
|
+
# // Example:
|
92
|
+
# //
|
93
|
+
# // context:
|
94
|
+
# // rules:
|
95
|
+
# // - selector: "google.example.library.v1.LibraryService.CreateBook"
|
96
|
+
# // allowed_request_extensions:
|
97
|
+
# // - google.foo.v1.NewExtension
|
98
|
+
# // allowed_response_extensions:
|
99
|
+
# // - google.foo.v1.NewExtension
|
100
|
+
# //
|
101
|
+
# // You can also specify extension ID instead of fully qualified extension name
|
102
|
+
# // here.
|
103
|
+
# message Context {
|
104
|
+
# // A list of RPC context rules that apply to individual API methods.
|
105
|
+
# //
|
106
|
+
# // **NOTE:** All service configuration rules follow "last one wins" order.
|
107
|
+
# repeated ContextRule rules = 1;
|
108
|
+
# }
|
109
|
+
#
|
110
|
+
# // A context rule provides information about the context for an individual API
|
111
|
+
# // element.
|
112
|
+
# message ContextRule {
|
113
|
+
# // Selects the methods to which this rule applies.
|
114
|
+
# //
|
115
|
+
# // Refer to [selector][google.api.DocumentationRule.selector] for syntax
|
116
|
+
# // details.
|
117
|
+
# string selector = 1;
|
118
|
+
#
|
119
|
+
# // A list of full type names of requested contexts.
|
120
|
+
# repeated string requested = 2;
|
121
|
+
#
|
122
|
+
# // A list of full type names of provided contexts.
|
123
|
+
# repeated string provided = 3;
|
124
|
+
#
|
125
|
+
# // A list of full type names or extension IDs of extensions allowed in grpc
|
126
|
+
# // side channel from client to backend.
|
127
|
+
# repeated string allowed_request_extensions = 4;
|
128
|
+
#
|
129
|
+
# // A list of full type names or extension IDs of extensions allowed in grpc
|
130
|
+
# // side channel from backend to client.
|
131
|
+
# repeated string allowed_response_extensions = 5;
|
132
|
+
# }
|
@@ -1,14 +1,37 @@
|
|
1
|
+
# frozen_string_literal: true
|
1
2
|
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
2
3
|
# source: google/api/control.proto
|
3
4
|
|
4
5
|
require 'google/protobuf'
|
5
6
|
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
7
|
+
require 'google/api/policy_pb'
|
8
|
+
|
9
|
+
|
10
|
+
descriptor_data = "\n\x18google/api/control.proto\x12\ngoogle.api\x1a\x17google/api/policy.proto\"Q\n\x07\x43ontrol\x12\x13\n\x0b\x65nvironment\x18\x01 \x01(\t\x12\x31\n\x0fmethod_policies\x18\x04 \x03(\x0b\x32\x18.google.api.MethodPolicyBn\n\x0e\x63om.google.apiB\x0c\x43ontrolProtoP\x01ZEgoogle.golang.org/genproto/googleapis/api/serviceconfig;serviceconfig\xa2\x02\x04GAPIb\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.api.MethodPolicy", "google/api/policy.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}"
|
10
31
|
end
|
11
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."
|
12
35
|
end
|
13
36
|
|
14
37
|
module Google
|
@@ -16,3 +39,47 @@ module Google
|
|
16
39
|
Control = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.api.Control").msgclass
|
17
40
|
end
|
18
41
|
end
|
42
|
+
|
43
|
+
#### Source proto file: google/api/control.proto ####
|
44
|
+
#
|
45
|
+
# // Copyright 2023 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.api;
|
62
|
+
#
|
63
|
+
# import "google/api/policy.proto";
|
64
|
+
#
|
65
|
+
# option go_package = "google.golang.org/genproto/googleapis/api/serviceconfig;serviceconfig";
|
66
|
+
# option java_multiple_files = true;
|
67
|
+
# option java_outer_classname = "ControlProto";
|
68
|
+
# option java_package = "com.google.api";
|
69
|
+
# option objc_class_prefix = "GAPI";
|
70
|
+
#
|
71
|
+
# // Selects and configures the service controller used by the service.
|
72
|
+
# //
|
73
|
+
# // Example:
|
74
|
+
# //
|
75
|
+
# // control:
|
76
|
+
# // environment: servicecontrol.googleapis.com
|
77
|
+
# message Control {
|
78
|
+
# // The service controller environment to use. If empty, no control plane
|
79
|
+
# // feature (like quota and billing) will be enabled. The recommended value for
|
80
|
+
# // most services is servicecontrol.googleapis.com
|
81
|
+
# string environment = 1;
|
82
|
+
#
|
83
|
+
# // Defines policies applying to the API methods of the service.
|
84
|
+
# repeated MethodPolicy method_policies = 4;
|
85
|
+
# }
|
@@ -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/distribution.proto
|
3
4
|
|
@@ -6,47 +7,33 @@ require 'google/protobuf'
|
|
6
7
|
require 'google/protobuf/any_pb'
|
7
8
|
require 'google/protobuf/timestamp_pb'
|
8
9
|
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
optional :num_finite_buckets, :int32, 1
|
33
|
-
optional :width, :double, 2
|
34
|
-
optional :offset, :double, 3
|
35
|
-
end
|
36
|
-
add_message "google.api.Distribution.BucketOptions.Exponential" do
|
37
|
-
optional :num_finite_buckets, :int32, 1
|
38
|
-
optional :growth_factor, :double, 2
|
39
|
-
optional :scale, :double, 3
|
40
|
-
end
|
41
|
-
add_message "google.api.Distribution.BucketOptions.Explicit" do
|
42
|
-
repeated :bounds, :double, 1
|
43
|
-
end
|
44
|
-
add_message "google.api.Distribution.Exemplar" do
|
45
|
-
optional :value, :double, 1
|
46
|
-
optional :timestamp, :message, 2, "google.protobuf.Timestamp"
|
47
|
-
repeated :attachments, :message, 3, "google.protobuf.Any"
|
10
|
+
|
11
|
+
descriptor_data = "\n\x1dgoogle/api/distribution.proto\x12\ngoogle.api\x1a\x19google/protobuf/any.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\xd9\x06\n\x0c\x44istribution\x12\r\n\x05\x63ount\x18\x01 \x01(\x03\x12\x0c\n\x04mean\x18\x02 \x01(\x01\x12 \n\x18sum_of_squared_deviation\x18\x03 \x01(\x01\x12-\n\x05range\x18\x04 \x01(\x0b\x32\x1e.google.api.Distribution.Range\x12>\n\x0e\x62ucket_options\x18\x06 \x01(\x0b\x32&.google.api.Distribution.BucketOptions\x12\x15\n\rbucket_counts\x18\x07 \x03(\x03\x12\x34\n\texemplars\x18\n \x03(\x0b\x32!.google.api.Distribution.Exemplar\x1a!\n\x05Range\x12\x0b\n\x03min\x18\x01 \x01(\x01\x12\x0b\n\x03max\x18\x02 \x01(\x01\x1a\xb5\x03\n\rBucketOptions\x12G\n\x0elinear_buckets\x18\x01 \x01(\x0b\x32-.google.api.Distribution.BucketOptions.LinearH\x00\x12Q\n\x13\x65xponential_buckets\x18\x02 \x01(\x0b\x32\x32.google.api.Distribution.BucketOptions.ExponentialH\x00\x12K\n\x10\x65xplicit_buckets\x18\x03 \x01(\x0b\x32/.google.api.Distribution.BucketOptions.ExplicitH\x00\x1a\x43\n\x06Linear\x12\x1a\n\x12num_finite_buckets\x18\x01 \x01(\x05\x12\r\n\x05width\x18\x02 \x01(\x01\x12\x0e\n\x06offset\x18\x03 \x01(\x01\x1aO\n\x0b\x45xponential\x12\x1a\n\x12num_finite_buckets\x18\x01 \x01(\x05\x12\x15\n\rgrowth_factor\x18\x02 \x01(\x01\x12\r\n\x05scale\x18\x03 \x01(\x01\x1a\x1a\n\x08\x45xplicit\x12\x0e\n\x06\x62ounds\x18\x01 \x03(\x01\x42\t\n\x07options\x1as\n\x08\x45xemplar\x12\r\n\x05value\x18\x01 \x01(\x01\x12-\n\ttimestamp\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12)\n\x0b\x61ttachments\x18\x03 \x03(\x0b\x32\x14.google.protobuf.AnyBq\n\x0e\x63om.google.apiB\x11\x44istributionProtoP\x01ZCgoogle.golang.org/genproto/googleapis/api/distribution;distribution\xa2\x02\x04GAPIb\x06proto3"
|
12
|
+
|
13
|
+
pool = Google::Protobuf::DescriptorPool.generated_pool
|
14
|
+
|
15
|
+
begin
|
16
|
+
pool.add_serialized_file(descriptor_data)
|
17
|
+
rescue TypeError => e
|
18
|
+
# Compatibility code: will be removed in the next major version.
|
19
|
+
require 'google/protobuf/descriptor_pb'
|
20
|
+
parsed = Google::Protobuf::FileDescriptorProto.decode(descriptor_data)
|
21
|
+
parsed.clear_dependency
|
22
|
+
serialized = parsed.class.encode(parsed)
|
23
|
+
file = pool.add_serialized_file(serialized)
|
24
|
+
warn "Warning: Protobuf detected an import path issue while loading generated file #{__FILE__}"
|
25
|
+
imports = [
|
26
|
+
["google.protobuf.Timestamp", "google/protobuf/timestamp.proto"],
|
27
|
+
["google.protobuf.Any", "google/protobuf/any.proto"],
|
28
|
+
]
|
29
|
+
imports.each do |type_name, expected_filename|
|
30
|
+
import_file = pool.lookup(type_name).file_descriptor
|
31
|
+
if import_file.name != expected_filename
|
32
|
+
warn "- #{file.name} imports #{expected_filename}, but that import was loaded as #{import_file.name}"
|
48
33
|
end
|
49
34
|
end
|
35
|
+
warn "Each proto file must use a consistent fully-qualified name."
|
36
|
+
warn "This will become an error in the next major version."
|
50
37
|
end
|
51
38
|
|
52
39
|
module Google
|
@@ -60,3 +47,219 @@ module Google
|
|
60
47
|
Distribution::Exemplar = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.api.Distribution.Exemplar").msgclass
|
61
48
|
end
|
62
49
|
end
|
50
|
+
|
51
|
+
#### Source proto file: google/api/distribution.proto ####
|
52
|
+
#
|
53
|
+
# // Copyright 2023 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/protobuf/any.proto";
|
72
|
+
# import "google/protobuf/timestamp.proto";
|
73
|
+
#
|
74
|
+
# option go_package = "google.golang.org/genproto/googleapis/api/distribution;distribution";
|
75
|
+
# option java_multiple_files = true;
|
76
|
+
# option java_outer_classname = "DistributionProto";
|
77
|
+
# option java_package = "com.google.api";
|
78
|
+
# option objc_class_prefix = "GAPI";
|
79
|
+
#
|
80
|
+
# // `Distribution` contains summary statistics for a population of values. It
|
81
|
+
# // optionally contains a histogram representing the distribution of those values
|
82
|
+
# // across a set of buckets.
|
83
|
+
# //
|
84
|
+
# // The summary statistics are the count, mean, sum of the squared deviation from
|
85
|
+
# // the mean, the minimum, and the maximum of the set of population of values.
|
86
|
+
# // The histogram is based on a sequence of buckets and gives a count of values
|
87
|
+
# // that fall into each bucket. The boundaries of the buckets are given either
|
88
|
+
# // explicitly or by formulas for buckets of fixed or exponentially increasing
|
89
|
+
# // widths.
|
90
|
+
# //
|
91
|
+
# // Although it is not forbidden, it is generally a bad idea to include
|
92
|
+
# // non-finite values (infinities or NaNs) in the population of values, as this
|
93
|
+
# // will render the `mean` and `sum_of_squared_deviation` fields meaningless.
|
94
|
+
# message Distribution {
|
95
|
+
# // The range of the population values.
|
96
|
+
# message Range {
|
97
|
+
# // The minimum of the population values.
|
98
|
+
# double min = 1;
|
99
|
+
#
|
100
|
+
# // The maximum of the population values.
|
101
|
+
# double max = 2;
|
102
|
+
# }
|
103
|
+
#
|
104
|
+
# // `BucketOptions` describes the bucket boundaries used to create a histogram
|
105
|
+
# // for the distribution. The buckets can be in a linear sequence, an
|
106
|
+
# // exponential sequence, or each bucket can be specified explicitly.
|
107
|
+
# // `BucketOptions` does not include the number of values in each bucket.
|
108
|
+
# //
|
109
|
+
# // A bucket has an inclusive lower bound and exclusive upper bound for the
|
110
|
+
# // values that are counted for that bucket. The upper bound of a bucket must
|
111
|
+
# // be strictly greater than the lower bound. The sequence of N buckets for a
|
112
|
+
# // distribution consists of an underflow bucket (number 0), zero or more
|
113
|
+
# // finite buckets (number 1 through N - 2) and an overflow bucket (number N -
|
114
|
+
# // 1). The buckets are contiguous: the lower bound of bucket i (i > 0) is the
|
115
|
+
# // same as the upper bound of bucket i - 1. The buckets span the whole range
|
116
|
+
# // of finite values: lower bound of the underflow bucket is -infinity and the
|
117
|
+
# // upper bound of the overflow bucket is +infinity. The finite buckets are
|
118
|
+
# // so-called because both bounds are finite.
|
119
|
+
# message BucketOptions {
|
120
|
+
# // Specifies a linear sequence of buckets that all have the same width
|
121
|
+
# // (except overflow and underflow). Each bucket represents a constant
|
122
|
+
# // absolute uncertainty on the specific value in the bucket.
|
123
|
+
# //
|
124
|
+
# // There are `num_finite_buckets + 2` (= N) buckets. Bucket `i` has the
|
125
|
+
# // following boundaries:
|
126
|
+
# //
|
127
|
+
# // Upper bound (0 <= i < N-1): offset + (width * i).
|
128
|
+
# //
|
129
|
+
# // Lower bound (1 <= i < N): offset + (width * (i - 1)).
|
130
|
+
# message Linear {
|
131
|
+
# // Must be greater than 0.
|
132
|
+
# int32 num_finite_buckets = 1;
|
133
|
+
#
|
134
|
+
# // Must be greater than 0.
|
135
|
+
# double width = 2;
|
136
|
+
#
|
137
|
+
# // Lower bound of the first bucket.
|
138
|
+
# double offset = 3;
|
139
|
+
# }
|
140
|
+
#
|
141
|
+
# // Specifies an exponential sequence of buckets that have a width that is
|
142
|
+
# // proportional to the value of the lower bound. Each bucket represents a
|
143
|
+
# // constant relative uncertainty on a specific value in the bucket.
|
144
|
+
# //
|
145
|
+
# // There are `num_finite_buckets + 2` (= N) buckets. Bucket `i` has the
|
146
|
+
# // following boundaries:
|
147
|
+
# //
|
148
|
+
# // Upper bound (0 <= i < N-1): scale * (growth_factor ^ i).
|
149
|
+
# //
|
150
|
+
# // Lower bound (1 <= i < N): scale * (growth_factor ^ (i - 1)).
|
151
|
+
# message Exponential {
|
152
|
+
# // Must be greater than 0.
|
153
|
+
# int32 num_finite_buckets = 1;
|
154
|
+
#
|
155
|
+
# // Must be greater than 1.
|
156
|
+
# double growth_factor = 2;
|
157
|
+
#
|
158
|
+
# // Must be greater than 0.
|
159
|
+
# double scale = 3;
|
160
|
+
# }
|
161
|
+
#
|
162
|
+
# // Specifies a set of buckets with arbitrary widths.
|
163
|
+
# //
|
164
|
+
# // There are `size(bounds) + 1` (= N) buckets. Bucket `i` has the following
|
165
|
+
# // boundaries:
|
166
|
+
# //
|
167
|
+
# // Upper bound (0 <= i < N-1): bounds[i]
|
168
|
+
# // Lower bound (1 <= i < N); bounds[i - 1]
|
169
|
+
# //
|
170
|
+
# // The `bounds` field must contain at least one element. If `bounds` has
|
171
|
+
# // only one element, then there are no finite buckets, and that single
|
172
|
+
# // element is the common boundary of the overflow and underflow buckets.
|
173
|
+
# message Explicit {
|
174
|
+
# // The values must be monotonically increasing.
|
175
|
+
# repeated double bounds = 1;
|
176
|
+
# }
|
177
|
+
#
|
178
|
+
# // Exactly one of these three fields must be set.
|
179
|
+
# oneof options {
|
180
|
+
# // The linear bucket.
|
181
|
+
# Linear linear_buckets = 1;
|
182
|
+
#
|
183
|
+
# // The exponential buckets.
|
184
|
+
# Exponential exponential_buckets = 2;
|
185
|
+
#
|
186
|
+
# // The explicit buckets.
|
187
|
+
# Explicit explicit_buckets = 3;
|
188
|
+
# }
|
189
|
+
# }
|
190
|
+
#
|
191
|
+
# // Exemplars are example points that may be used to annotate aggregated
|
192
|
+
# // distribution values. They are metadata that gives information about a
|
193
|
+
# // particular value added to a Distribution bucket, such as a trace ID that
|
194
|
+
# // was active when a value was added. They may contain further information,
|
195
|
+
# // such as a example values and timestamps, origin, etc.
|
196
|
+
# message Exemplar {
|
197
|
+
# // Value of the exemplar point. This value determines to which bucket the
|
198
|
+
# // exemplar belongs.
|
199
|
+
# double value = 1;
|
200
|
+
#
|
201
|
+
# // The observation (sampling) time of the above value.
|
202
|
+
# google.protobuf.Timestamp timestamp = 2;
|
203
|
+
#
|
204
|
+
# // Contextual information about the example value. Examples are:
|
205
|
+
# //
|
206
|
+
# // Trace: type.googleapis.com/google.monitoring.v3.SpanContext
|
207
|
+
# //
|
208
|
+
# // Literal string: type.googleapis.com/google.protobuf.StringValue
|
209
|
+
# //
|
210
|
+
# // Labels dropped during aggregation:
|
211
|
+
# // type.googleapis.com/google.monitoring.v3.DroppedLabels
|
212
|
+
# //
|
213
|
+
# // There may be only a single attachment of any given message type in a
|
214
|
+
# // single exemplar, and this is enforced by the system.
|
215
|
+
# repeated google.protobuf.Any attachments = 3;
|
216
|
+
# }
|
217
|
+
#
|
218
|
+
# // The number of values in the population. Must be non-negative. This value
|
219
|
+
# // must equal the sum of the values in `bucket_counts` if a histogram is
|
220
|
+
# // provided.
|
221
|
+
# int64 count = 1;
|
222
|
+
#
|
223
|
+
# // The arithmetic mean of the values in the population. If `count` is zero
|
224
|
+
# // then this field must be zero.
|
225
|
+
# double mean = 2;
|
226
|
+
#
|
227
|
+
# // The sum of squared deviations from the mean of the values in the
|
228
|
+
# // population. For values x_i this is:
|
229
|
+
# //
|
230
|
+
# // Sum[i=1..n]((x_i - mean)^2)
|
231
|
+
# //
|
232
|
+
# // Knuth, "The Art of Computer Programming", Vol. 2, page 232, 3rd edition
|
233
|
+
# // describes Welford's method for accumulating this sum in one pass.
|
234
|
+
# //
|
235
|
+
# // If `count` is zero then this field must be zero.
|
236
|
+
# double sum_of_squared_deviation = 3;
|
237
|
+
#
|
238
|
+
# // If specified, contains the range of the population values. The field
|
239
|
+
# // must not be present if the `count` is zero.
|
240
|
+
# Range range = 4;
|
241
|
+
#
|
242
|
+
# // Defines the histogram bucket boundaries. If the distribution does not
|
243
|
+
# // contain a histogram, then omit this field.
|
244
|
+
# BucketOptions bucket_options = 6;
|
245
|
+
#
|
246
|
+
# // The number of values in each bucket of the histogram, as described in
|
247
|
+
# // `bucket_options`. If the distribution does not have a histogram, then omit
|
248
|
+
# // this field. If there is a histogram, then the sum of the values in
|
249
|
+
# // `bucket_counts` must equal the value in the `count` field of the
|
250
|
+
# // distribution.
|
251
|
+
# //
|
252
|
+
# // If present, `bucket_counts` should contain N values, where N is the number
|
253
|
+
# // of buckets specified in `bucket_options`. If you supply fewer than N
|
254
|
+
# // values, the remaining values are assumed to be 0.
|
255
|
+
# //
|
256
|
+
# // The order of the values in `bucket_counts` follows the bucket numbering
|
257
|
+
# // schemes described for the three bucket types. The first value must be the
|
258
|
+
# // count for the underflow bucket (number 0). The next N-2 values are the
|
259
|
+
# // counts for the finite buckets (number 1 through N-2). The N'th value in
|
260
|
+
# // `bucket_counts` is the count for the overflow bucket (number N-1).
|
261
|
+
# repeated int64 bucket_counts = 7;
|
262
|
+
#
|
263
|
+
# // Must be in increasing order of `value` field.
|
264
|
+
# repeated Exemplar exemplars = 10;
|
265
|
+
# }
|