googleapis-common-protos-types 1.5.0 → 1.8.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +24 -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 -22
- data/lib/google/api/billing_pb.rb +104 -8
- data/lib/google/api/client_pb.rb +422 -77
- 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 -31
- data/lib/google/api/field_behavior_pb.rb +117 -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 +402 -0
- data/lib/google/rpc/context/audit_context_pb.rb +95 -0
- 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 +8 -5
@@ -1,19 +1,34 @@
|
|
1
|
+
# frozen_string_literal: true
|
1
2
|
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
2
3
|
# source: google/api/monitoring.proto
|
3
4
|
|
4
5
|
require 'google/protobuf'
|
5
6
|
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
7
|
+
|
8
|
+
descriptor_data = "\n\x1bgoogle/api/monitoring.proto\x12\ngoogle.api\"\xec\x01\n\nMonitoring\x12K\n\x15producer_destinations\x18\x01 \x03(\x0b\x32,.google.api.Monitoring.MonitoringDestination\x12K\n\x15\x63onsumer_destinations\x18\x02 \x03(\x0b\x32,.google.api.Monitoring.MonitoringDestination\x1a\x44\n\x15MonitoringDestination\x12\x1a\n\x12monitored_resource\x18\x01 \x01(\t\x12\x0f\n\x07metrics\x18\x02 \x03(\tBq\n\x0e\x63om.google.apiB\x0fMonitoringProtoP\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}"
|
15
28
|
end
|
16
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."
|
17
32
|
end
|
18
33
|
|
19
34
|
module Google
|
@@ -22,3 +37,113 @@ module Google
|
|
22
37
|
Monitoring::MonitoringDestination = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.api.Monitoring.MonitoringDestination").msgclass
|
23
38
|
end
|
24
39
|
end
|
40
|
+
|
41
|
+
#### Source proto file: google/api/monitoring.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 = "MonitoringProto";
|
64
|
+
# option java_package = "com.google.api";
|
65
|
+
# option objc_class_prefix = "GAPI";
|
66
|
+
#
|
67
|
+
# // Monitoring configuration of the service.
|
68
|
+
# //
|
69
|
+
# // The example below shows how to configure monitored resources and metrics
|
70
|
+
# // for monitoring. In the example, a monitored resource and two metrics are
|
71
|
+
# // defined. The `library.googleapis.com/book/returned_count` metric is sent
|
72
|
+
# // to both producer and consumer projects, whereas the
|
73
|
+
# // `library.googleapis.com/book/num_overdue` metric is only sent to the
|
74
|
+
# // consumer project.
|
75
|
+
# //
|
76
|
+
# // monitored_resources:
|
77
|
+
# // - type: library.googleapis.com/Branch
|
78
|
+
# // display_name: "Library Branch"
|
79
|
+
# // description: "A branch of a library."
|
80
|
+
# // launch_stage: GA
|
81
|
+
# // labels:
|
82
|
+
# // - key: resource_container
|
83
|
+
# // description: "The Cloud container (ie. project id) for the Branch."
|
84
|
+
# // - key: location
|
85
|
+
# // description: "The location of the library branch."
|
86
|
+
# // - key: branch_id
|
87
|
+
# // description: "The id of the branch."
|
88
|
+
# // metrics:
|
89
|
+
# // - name: library.googleapis.com/book/returned_count
|
90
|
+
# // display_name: "Books Returned"
|
91
|
+
# // description: "The count of books that have been returned."
|
92
|
+
# // launch_stage: GA
|
93
|
+
# // metric_kind: DELTA
|
94
|
+
# // value_type: INT64
|
95
|
+
# // unit: "1"
|
96
|
+
# // labels:
|
97
|
+
# // - key: customer_id
|
98
|
+
# // description: "The id of the customer."
|
99
|
+
# // - name: library.googleapis.com/book/num_overdue
|
100
|
+
# // display_name: "Books Overdue"
|
101
|
+
# // description: "The current number of overdue books."
|
102
|
+
# // launch_stage: GA
|
103
|
+
# // metric_kind: GAUGE
|
104
|
+
# // value_type: INT64
|
105
|
+
# // unit: "1"
|
106
|
+
# // labels:
|
107
|
+
# // - key: customer_id
|
108
|
+
# // description: "The id of the customer."
|
109
|
+
# // monitoring:
|
110
|
+
# // producer_destinations:
|
111
|
+
# // - monitored_resource: library.googleapis.com/Branch
|
112
|
+
# // metrics:
|
113
|
+
# // - library.googleapis.com/book/returned_count
|
114
|
+
# // consumer_destinations:
|
115
|
+
# // - monitored_resource: library.googleapis.com/Branch
|
116
|
+
# // metrics:
|
117
|
+
# // - library.googleapis.com/book/returned_count
|
118
|
+
# // - library.googleapis.com/book/num_overdue
|
119
|
+
# message Monitoring {
|
120
|
+
# // Configuration of a specific monitoring destination (the producer project
|
121
|
+
# // or the consumer project).
|
122
|
+
# message MonitoringDestination {
|
123
|
+
# // The monitored resource type. The type must be defined in
|
124
|
+
# // [Service.monitored_resources][google.api.Service.monitored_resources]
|
125
|
+
# // section.
|
126
|
+
# string monitored_resource = 1;
|
127
|
+
#
|
128
|
+
# // Types of the metrics to report to this monitoring destination.
|
129
|
+
# // Each type must be defined in
|
130
|
+
# // [Service.metrics][google.api.Service.metrics] section.
|
131
|
+
# repeated string metrics = 2;
|
132
|
+
# }
|
133
|
+
#
|
134
|
+
# // Monitoring configurations for sending metrics to the producer project.
|
135
|
+
# // There can be multiple producer destinations. A monitored resource type may
|
136
|
+
# // appear in multiple monitoring destinations if different aggregations are
|
137
|
+
# // needed for different sets of metrics associated with that monitored
|
138
|
+
# // resource type. A monitored resource and metric pair may only be used once
|
139
|
+
# // in the Monitoring configuration.
|
140
|
+
# repeated MonitoringDestination producer_destinations = 1;
|
141
|
+
#
|
142
|
+
# // Monitoring configurations for sending metrics to the consumer project.
|
143
|
+
# // There can be multiple consumer destinations. A monitored resource type may
|
144
|
+
# // appear in multiple monitoring destinations if different aggregations are
|
145
|
+
# // needed for different sets of metrics associated with that monitored
|
146
|
+
# // resource type. A monitored resource and metric pair may only be used once
|
147
|
+
# // in the Monitoring configuration.
|
148
|
+
# repeated MonitoringDestination consumer_destinations = 2;
|
149
|
+
# }
|
@@ -0,0 +1,129 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
3
|
+
# source: google/api/policy.proto
|
4
|
+
|
5
|
+
require 'google/protobuf'
|
6
|
+
|
7
|
+
require 'google/protobuf/descriptor_pb'
|
8
|
+
|
9
|
+
|
10
|
+
descriptor_data = "\n\x17google/api/policy.proto\x12\ngoogle.api\x1a google/protobuf/descriptor.proto\"S\n\x0b\x46ieldPolicy\x12\x10\n\x08selector\x18\x01 \x01(\t\x12\x1b\n\x13resource_permission\x18\x02 \x01(\t\x12\x15\n\rresource_type\x18\x03 \x01(\t\"S\n\x0cMethodPolicy\x12\x10\n\x08selector\x18\t \x01(\t\x12\x31\n\x10request_policies\x18\x02 \x03(\x0b\x32\x17.google.api.FieldPolicy:O\n\x0c\x66ield_policy\x12\x1d.google.protobuf.FieldOptions\x18\xe8\xce\xc1K \x01(\x0b\x32\x17.google.api.FieldPolicy:R\n\rmethod_policy\x12\x1e.google.protobuf.MethodOptions\x18\xb5\x97\x99M \x01(\x0b\x32\x18.google.api.MethodPolicyBp\n\x0e\x63om.google.apiB\x0bPolicyProtoP\x01ZEgoogle.golang.org/genproto/googleapis/api/serviceconfig;serviceconfig\xf8\x01\x01\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
|
+
]
|
26
|
+
imports.each do |type_name, expected_filename|
|
27
|
+
import_file = pool.lookup(type_name).file_descriptor
|
28
|
+
if import_file.name != expected_filename
|
29
|
+
warn "- #{file.name} imports #{expected_filename}, but that import was loaded as #{import_file.name}"
|
30
|
+
end
|
31
|
+
end
|
32
|
+
warn "Each proto file must use a consistent fully-qualified name."
|
33
|
+
warn "This will become an error in the next major version."
|
34
|
+
end
|
35
|
+
|
36
|
+
module Google
|
37
|
+
module Api
|
38
|
+
FieldPolicy = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.api.FieldPolicy").msgclass
|
39
|
+
MethodPolicy = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.api.MethodPolicy").msgclass
|
40
|
+
end
|
41
|
+
end
|
42
|
+
|
43
|
+
#### Source proto file: google/api/policy.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/protobuf/descriptor.proto";
|
64
|
+
#
|
65
|
+
# option cc_enable_arenas = true;
|
66
|
+
# option go_package = "google.golang.org/genproto/googleapis/api/serviceconfig;serviceconfig";
|
67
|
+
# option java_multiple_files = true;
|
68
|
+
# option java_outer_classname = "PolicyProto";
|
69
|
+
# option java_package = "com.google.api";
|
70
|
+
# option objc_class_prefix = "GAPI";
|
71
|
+
#
|
72
|
+
# // Provides `google.api.field_policy` annotation at proto fields.
|
73
|
+
# extend google.protobuf.FieldOptions {
|
74
|
+
# // See [FieldPolicy][].
|
75
|
+
# FieldPolicy field_policy = 158361448;
|
76
|
+
# }
|
77
|
+
#
|
78
|
+
# // Provides `google.api.method_policy` annotation at proto methods.
|
79
|
+
# extend google.protobuf.MethodOptions {
|
80
|
+
# // See [MethodPolicy][].
|
81
|
+
# MethodPolicy method_policy = 161893301;
|
82
|
+
# }
|
83
|
+
#
|
84
|
+
# // Google API Policy Annotation
|
85
|
+
# //
|
86
|
+
# // This message defines a simple API policy annotation that can be used to
|
87
|
+
# // annotate API request and response message fields with applicable policies.
|
88
|
+
# // One field may have multiple applicable policies that must all be satisfied
|
89
|
+
# // before a request can be processed. This policy annotation is used to
|
90
|
+
# // generate the overall policy that will be used for automatic runtime
|
91
|
+
# // policy enforcement and documentation generation.
|
92
|
+
# message FieldPolicy {
|
93
|
+
# // Selects one or more request or response message fields to apply this
|
94
|
+
# // `FieldPolicy`.
|
95
|
+
# //
|
96
|
+
# // When a `FieldPolicy` is used in proto annotation, the selector must
|
97
|
+
# // be left as empty. The service config generator will automatically fill
|
98
|
+
# // the correct value.
|
99
|
+
# //
|
100
|
+
# // When a `FieldPolicy` is used in service config, the selector must be a
|
101
|
+
# // comma-separated string with valid request or response field paths,
|
102
|
+
# // such as "foo.bar" or "foo.bar,foo.baz".
|
103
|
+
# string selector = 1;
|
104
|
+
#
|
105
|
+
# // Specifies the required permission(s) for the resource referred to by the
|
106
|
+
# // field. It requires the field contains a valid resource reference, and
|
107
|
+
# // the request must pass the permission checks to proceed. For example,
|
108
|
+
# // "resourcemanager.projects.get".
|
109
|
+
# string resource_permission = 2;
|
110
|
+
#
|
111
|
+
# // Specifies the resource type for the resource referred to by the field.
|
112
|
+
# string resource_type = 3;
|
113
|
+
# }
|
114
|
+
#
|
115
|
+
# // Defines policies applying to an RPC method.
|
116
|
+
# message MethodPolicy {
|
117
|
+
# // Selects a method to which these policies should be enforced, for example,
|
118
|
+
# // "google.pubsub.v1.Subscriber.CreateSubscription".
|
119
|
+
# //
|
120
|
+
# // Refer to [selector][google.api.DocumentationRule.selector] for syntax
|
121
|
+
# // details.
|
122
|
+
# //
|
123
|
+
# // NOTE: This field must not be set in the proto annotation. It will be
|
124
|
+
# // automatically filled by the service config compiler .
|
125
|
+
# string selector = 9;
|
126
|
+
#
|
127
|
+
# // Policies that are applicable to the request message.
|
128
|
+
# repeated FieldPolicy request_policies = 2;
|
129
|
+
# }
|
data/lib/google/api/quota_pb.rb
CHANGED
@@ -1,31 +1,34 @@
|
|
1
|
+
# frozen_string_literal: true
|
1
2
|
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
2
3
|
# source: google/api/quota.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
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
7
|
+
|
8
|
+
descriptor_data = "\n\x16google/api/quota.proto\x12\ngoogle.api\"]\n\x05Quota\x12&\n\x06limits\x18\x03 \x03(\x0b\x32\x16.google.api.QuotaLimit\x12,\n\x0cmetric_rules\x18\x04 \x03(\x0b\x32\x16.google.api.MetricRule\"\x91\x01\n\nMetricRule\x12\x10\n\x08selector\x18\x01 \x01(\t\x12=\n\x0cmetric_costs\x18\x02 \x03(\x0b\x32\'.google.api.MetricRule.MetricCostsEntry\x1a\x32\n\x10MetricCostsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\x03:\x02\x38\x01\"\x95\x02\n\nQuotaLimit\x12\x0c\n\x04name\x18\x06 \x01(\t\x12\x13\n\x0b\x64\x65scription\x18\x02 \x01(\t\x12\x15\n\rdefault_limit\x18\x03 \x01(\x03\x12\x11\n\tmax_limit\x18\x04 \x01(\x03\x12\x11\n\tfree_tier\x18\x07 \x01(\x03\x12\x10\n\x08\x64uration\x18\x05 \x01(\t\x12\x0e\n\x06metric\x18\x08 \x01(\t\x12\x0c\n\x04unit\x18\t \x01(\t\x12\x32\n\x06values\x18\n \x03(\x0b\x32\".google.api.QuotaLimit.ValuesEntry\x12\x14\n\x0c\x64isplay_name\x18\x0c \x01(\t\x1a-\n\x0bValuesEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\x03:\x02\x38\x01\x42l\n\x0e\x63om.google.apiB\nQuotaProtoP\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}"
|
27
28
|
end
|
28
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."
|
29
32
|
end
|
30
33
|
|
31
34
|
module Google
|
@@ -35,3 +38,190 @@ module Google
|
|
35
38
|
QuotaLimit = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.api.QuotaLimit").msgclass
|
36
39
|
end
|
37
40
|
end
|
41
|
+
|
42
|
+
#### Source proto file: google/api/quota.proto ####
|
43
|
+
#
|
44
|
+
# // Copyright 2023 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 = "QuotaProto";
|
65
|
+
# option java_package = "com.google.api";
|
66
|
+
# option objc_class_prefix = "GAPI";
|
67
|
+
#
|
68
|
+
# // Quota configuration helps to achieve fairness and budgeting in service
|
69
|
+
# // usage.
|
70
|
+
# //
|
71
|
+
# // The metric based quota configuration works this way:
|
72
|
+
# // - The service configuration defines a set of metrics.
|
73
|
+
# // - For API calls, the quota.metric_rules maps methods to metrics with
|
74
|
+
# // corresponding costs.
|
75
|
+
# // - The quota.limits defines limits on the metrics, which will be used for
|
76
|
+
# // quota checks at runtime.
|
77
|
+
# //
|
78
|
+
# // An example quota configuration in yaml format:
|
79
|
+
# //
|
80
|
+
# // quota:
|
81
|
+
# // limits:
|
82
|
+
# //
|
83
|
+
# // - name: apiWriteQpsPerProject
|
84
|
+
# // metric: library.googleapis.com/write_calls
|
85
|
+
# // unit: "1/min/{project}" # rate limit for consumer projects
|
86
|
+
# // values:
|
87
|
+
# // STANDARD: 10000
|
88
|
+
# //
|
89
|
+
# //
|
90
|
+
# // (The metric rules bind all methods to the read_calls metric,
|
91
|
+
# // except for the UpdateBook and DeleteBook methods. These two methods
|
92
|
+
# // are mapped to the write_calls metric, with the UpdateBook method
|
93
|
+
# // consuming at twice rate as the DeleteBook method.)
|
94
|
+
# // metric_rules:
|
95
|
+
# // - selector: "*"
|
96
|
+
# // metric_costs:
|
97
|
+
# // library.googleapis.com/read_calls: 1
|
98
|
+
# // - selector: google.example.library.v1.LibraryService.UpdateBook
|
99
|
+
# // metric_costs:
|
100
|
+
# // library.googleapis.com/write_calls: 2
|
101
|
+
# // - selector: google.example.library.v1.LibraryService.DeleteBook
|
102
|
+
# // metric_costs:
|
103
|
+
# // library.googleapis.com/write_calls: 1
|
104
|
+
# //
|
105
|
+
# // Corresponding Metric definition:
|
106
|
+
# //
|
107
|
+
# // metrics:
|
108
|
+
# // - name: library.googleapis.com/read_calls
|
109
|
+
# // display_name: Read requests
|
110
|
+
# // metric_kind: DELTA
|
111
|
+
# // value_type: INT64
|
112
|
+
# //
|
113
|
+
# // - name: library.googleapis.com/write_calls
|
114
|
+
# // display_name: Write requests
|
115
|
+
# // metric_kind: DELTA
|
116
|
+
# // value_type: INT64
|
117
|
+
# //
|
118
|
+
# //
|
119
|
+
# message Quota {
|
120
|
+
# // List of QuotaLimit definitions for the service.
|
121
|
+
# repeated QuotaLimit limits = 3;
|
122
|
+
#
|
123
|
+
# // List of MetricRule definitions, each one mapping a selected method to one
|
124
|
+
# // or more metrics.
|
125
|
+
# repeated MetricRule metric_rules = 4;
|
126
|
+
# }
|
127
|
+
#
|
128
|
+
# // Bind API methods to metrics. Binding a method to a metric causes that
|
129
|
+
# // metric's configured quota behaviors to apply to the method call.
|
130
|
+
# message MetricRule {
|
131
|
+
# // Selects the methods to which this rule applies.
|
132
|
+
# //
|
133
|
+
# // Refer to [selector][google.api.DocumentationRule.selector] for syntax
|
134
|
+
# // details.
|
135
|
+
# string selector = 1;
|
136
|
+
#
|
137
|
+
# // Metrics to update when the selected methods are called, and the associated
|
138
|
+
# // cost applied to each metric.
|
139
|
+
# //
|
140
|
+
# // The key of the map is the metric name, and the values are the amount
|
141
|
+
# // increased for the metric against which the quota limits are defined.
|
142
|
+
# // The value must not be negative.
|
143
|
+
# map<string, int64> metric_costs = 2;
|
144
|
+
# }
|
145
|
+
#
|
146
|
+
# // `QuotaLimit` defines a specific limit that applies over a specified duration
|
147
|
+
# // for a limit type. There can be at most one limit for a duration and limit
|
148
|
+
# // type combination defined within a `QuotaGroup`.
|
149
|
+
# message QuotaLimit {
|
150
|
+
# // Name of the quota limit.
|
151
|
+
# //
|
152
|
+
# // The name must be provided, and it must be unique within the service. The
|
153
|
+
# // name can only include alphanumeric characters as well as '-'.
|
154
|
+
# //
|
155
|
+
# // The maximum length of the limit name is 64 characters.
|
156
|
+
# string name = 6;
|
157
|
+
#
|
158
|
+
# // Optional. User-visible, extended description for this quota limit.
|
159
|
+
# // Should be used only when more context is needed to understand this limit
|
160
|
+
# // than provided by the limit's display name (see: `display_name`).
|
161
|
+
# string description = 2;
|
162
|
+
#
|
163
|
+
# // Default number of tokens that can be consumed during the specified
|
164
|
+
# // duration. This is the number of tokens assigned when a client
|
165
|
+
# // application developer activates the service for his/her project.
|
166
|
+
# //
|
167
|
+
# // Specifying a value of 0 will block all requests. This can be used if you
|
168
|
+
# // are provisioning quota to selected consumers and blocking others.
|
169
|
+
# // Similarly, a value of -1 will indicate an unlimited quota. No other
|
170
|
+
# // negative values are allowed.
|
171
|
+
# //
|
172
|
+
# // Used by group-based quotas only.
|
173
|
+
# int64 default_limit = 3;
|
174
|
+
#
|
175
|
+
# // Maximum number of tokens that can be consumed during the specified
|
176
|
+
# // duration. Client application developers can override the default limit up
|
177
|
+
# // to this maximum. If specified, this value cannot be set to a value less
|
178
|
+
# // than the default limit. If not specified, it is set to the default limit.
|
179
|
+
# //
|
180
|
+
# // To allow clients to apply overrides with no upper bound, set this to -1,
|
181
|
+
# // indicating unlimited maximum quota.
|
182
|
+
# //
|
183
|
+
# // Used by group-based quotas only.
|
184
|
+
# int64 max_limit = 4;
|
185
|
+
#
|
186
|
+
# // Free tier value displayed in the Developers Console for this limit.
|
187
|
+
# // The free tier is the number of tokens that will be subtracted from the
|
188
|
+
# // billed amount when billing is enabled.
|
189
|
+
# // This field can only be set on a limit with duration "1d", in a billable
|
190
|
+
# // group; it is invalid on any other limit. If this field is not set, it
|
191
|
+
# // defaults to 0, indicating that there is no free tier for this service.
|
192
|
+
# //
|
193
|
+
# // Used by group-based quotas only.
|
194
|
+
# int64 free_tier = 7;
|
195
|
+
#
|
196
|
+
# // Duration of this limit in textual notation. Must be "100s" or "1d".
|
197
|
+
# //
|
198
|
+
# // Used by group-based quotas only.
|
199
|
+
# string duration = 5;
|
200
|
+
#
|
201
|
+
# // The name of the metric this quota limit applies to. The quota limits with
|
202
|
+
# // the same metric will be checked together during runtime. The metric must be
|
203
|
+
# // defined within the service config.
|
204
|
+
# string metric = 8;
|
205
|
+
#
|
206
|
+
# // Specify the unit of the quota limit. It uses the same syntax as
|
207
|
+
# // [Metric.unit][]. The supported unit kinds are determined by the quota
|
208
|
+
# // backend system.
|
209
|
+
# //
|
210
|
+
# // Here are some examples:
|
211
|
+
# // * "1/min/{project}" for quota per minute per project.
|
212
|
+
# //
|
213
|
+
# // Note: the order of unit components is insignificant.
|
214
|
+
# // The "1" at the beginning is required to follow the metric unit syntax.
|
215
|
+
# string unit = 9;
|
216
|
+
#
|
217
|
+
# // Tiered limit values. You must specify this as a key:value pair, with an
|
218
|
+
# // integer value that is the maximum number of requests allowed for the
|
219
|
+
# // specified unit. Currently only STANDARD is supported.
|
220
|
+
# map<string, int64> values = 10;
|
221
|
+
#
|
222
|
+
# // User-visible display name for this limit.
|
223
|
+
# // Optional. If not set, the UI will provide a default display name based on
|
224
|
+
# // the quota configuration. This field can be used to override the default
|
225
|
+
# // display name generated from the configuration.
|
226
|
+
# string display_name = 12;
|
227
|
+
# }
|