google-cloud-service_control-v1 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.yardopts +12 -0
- data/AUTHENTICATION.md +169 -0
- data/LICENSE.md +203 -0
- data/README.md +75 -0
- data/lib/google-cloud-service_control-v1.rb +21 -0
- data/lib/google/api/servicecontrol/v1/check_error_pb.rb +50 -0
- data/lib/google/api/servicecontrol/v1/distribution_pb.rb +48 -0
- data/lib/google/api/servicecontrol/v1/http_request_pb.rb +37 -0
- data/lib/google/api/servicecontrol/v1/log_entry_pb.rb +53 -0
- data/lib/google/api/servicecontrol/v1/metric_value_pb.rb +38 -0
- data/lib/google/api/servicecontrol/v1/operation_pb.rb +40 -0
- data/lib/google/api/servicecontrol/v1/quota_controller_pb.rb +67 -0
- data/lib/google/api/servicecontrol/v1/quota_controller_services_pb.rb +58 -0
- data/lib/google/api/servicecontrol/v1/service_controller_pb.rb +74 -0
- data/lib/google/api/servicecontrol/v1/service_controller_services_pb.rb +79 -0
- data/lib/google/cloud/service_control/v1.rb +36 -0
- data/lib/google/cloud/service_control/v1/quota_controller.rb +51 -0
- data/lib/google/cloud/service_control/v1/quota_controller/client.rb +389 -0
- data/lib/google/cloud/service_control/v1/quota_controller/credentials.rb +52 -0
- data/lib/google/cloud/service_control/v1/service_controller.rb +51 -0
- data/lib/google/cloud/service_control/v1/service_controller/client.rb +507 -0
- data/lib/google/cloud/service_control/v1/service_controller/credentials.rb +52 -0
- data/lib/google/cloud/service_control/v1/version.rb +28 -0
- data/proto_docs/README.md +4 -0
- data/proto_docs/google/api/resource.rb +283 -0
- data/proto_docs/google/api/servicecontrol/v1/check_error.rb +125 -0
- data/proto_docs/google/api/servicecontrol/v1/distribution.rb +148 -0
- data/proto_docs/google/api/servicecontrol/v1/http_request.rb +95 -0
- data/proto_docs/google/api/servicecontrol/v1/log_entry.rb +136 -0
- data/proto_docs/google/api/servicecontrol/v1/metric_value.rb +86 -0
- data/proto_docs/google/api/servicecontrol/v1/operation.rb +128 -0
- data/proto_docs/google/api/servicecontrol/v1/quota_controller.rb +227 -0
- data/proto_docs/google/api/servicecontrol/v1/service_controller.rb +206 -0
- data/proto_docs/google/logging/type/log_severity.rb +69 -0
- data/proto_docs/google/protobuf/any.rb +138 -0
- data/proto_docs/google/protobuf/duration.rb +98 -0
- data/proto_docs/google/protobuf/struct.rb +96 -0
- data/proto_docs/google/protobuf/timestamp.rb +120 -0
- data/proto_docs/google/rpc/status.rb +46 -0
- metadata +222 -0
@@ -0,0 +1,21 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
# Copyright 2020 Google LLC
|
4
|
+
#
|
5
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
6
|
+
# you may not use this file except in compliance with the License.
|
7
|
+
# You may obtain a copy of the License at
|
8
|
+
#
|
9
|
+
# https://www.apache.org/licenses/LICENSE-2.0
|
10
|
+
#
|
11
|
+
# Unless required by applicable law or agreed to in writing, software
|
12
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
13
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
14
|
+
# See the License for the specific language governing permissions and
|
15
|
+
# limitations under the License.
|
16
|
+
|
17
|
+
# Auto-generated by gapic-generator-ruby. DO NOT EDIT!
|
18
|
+
|
19
|
+
# This gem does not autoload during Bundler.require. To load this gem,
|
20
|
+
# issue explicit require statements for the packages desired, e.g.:
|
21
|
+
# require "google/cloud/service_control/v1"
|
@@ -0,0 +1,50 @@
|
|
1
|
+
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
2
|
+
# source: google/api/servicecontrol/v1/check_error.proto
|
3
|
+
|
4
|
+
require 'google/protobuf'
|
5
|
+
|
6
|
+
require 'google/rpc/status_pb'
|
7
|
+
Google::Protobuf::DescriptorPool.generated_pool.build do
|
8
|
+
add_file("google/api/servicecontrol/v1/check_error.proto", :syntax => :proto3) do
|
9
|
+
add_message "google.api.servicecontrol.v1.CheckError" do
|
10
|
+
optional :code, :enum, 1, "google.api.servicecontrol.v1.CheckError.Code"
|
11
|
+
optional :subject, :string, 4
|
12
|
+
optional :detail, :string, 2
|
13
|
+
optional :status, :message, 3, "google.rpc.Status"
|
14
|
+
end
|
15
|
+
add_enum "google.api.servicecontrol.v1.CheckError.Code" do
|
16
|
+
value :ERROR_CODE_UNSPECIFIED, 0
|
17
|
+
value :NOT_FOUND, 5
|
18
|
+
value :PERMISSION_DENIED, 7
|
19
|
+
value :RESOURCE_EXHAUSTED, 8
|
20
|
+
value :SERVICE_NOT_ACTIVATED, 104
|
21
|
+
value :BILLING_DISABLED, 107
|
22
|
+
value :PROJECT_DELETED, 108
|
23
|
+
value :PROJECT_INVALID, 114
|
24
|
+
value :CONSUMER_INVALID, 125
|
25
|
+
value :IP_ADDRESS_BLOCKED, 109
|
26
|
+
value :REFERER_BLOCKED, 110
|
27
|
+
value :CLIENT_APP_BLOCKED, 111
|
28
|
+
value :API_TARGET_BLOCKED, 122
|
29
|
+
value :API_KEY_INVALID, 105
|
30
|
+
value :API_KEY_EXPIRED, 112
|
31
|
+
value :API_KEY_NOT_FOUND, 113
|
32
|
+
value :INVALID_CREDENTIAL, 123
|
33
|
+
value :NAMESPACE_LOOKUP_UNAVAILABLE, 300
|
34
|
+
value :SERVICE_STATUS_UNAVAILABLE, 301
|
35
|
+
value :BILLING_STATUS_UNAVAILABLE, 302
|
36
|
+
value :CLOUD_RESOURCE_MANAGER_BACKEND_UNAVAILABLE, 305
|
37
|
+
end
|
38
|
+
end
|
39
|
+
end
|
40
|
+
|
41
|
+
module Google
|
42
|
+
module Cloud
|
43
|
+
module ServiceControl
|
44
|
+
module V1
|
45
|
+
CheckError = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.api.servicecontrol.v1.CheckError").msgclass
|
46
|
+
CheckError::Code = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.api.servicecontrol.v1.CheckError.Code").enummodule
|
47
|
+
end
|
48
|
+
end
|
49
|
+
end
|
50
|
+
end
|
@@ -0,0 +1,48 @@
|
|
1
|
+
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
2
|
+
# source: google/api/servicecontrol/v1/distribution.proto
|
3
|
+
|
4
|
+
require 'google/protobuf'
|
5
|
+
|
6
|
+
Google::Protobuf::DescriptorPool.generated_pool.build do
|
7
|
+
add_file("google/api/servicecontrol/v1/distribution.proto", :syntax => :proto3) do
|
8
|
+
add_message "google.api.servicecontrol.v1.Distribution" do
|
9
|
+
optional :count, :int64, 1
|
10
|
+
optional :mean, :double, 2
|
11
|
+
optional :minimum, :double, 3
|
12
|
+
optional :maximum, :double, 4
|
13
|
+
optional :sum_of_squared_deviation, :double, 5
|
14
|
+
repeated :bucket_counts, :int64, 6
|
15
|
+
oneof :bucket_option do
|
16
|
+
optional :linear_buckets, :message, 7, "google.api.servicecontrol.v1.Distribution.LinearBuckets"
|
17
|
+
optional :exponential_buckets, :message, 8, "google.api.servicecontrol.v1.Distribution.ExponentialBuckets"
|
18
|
+
optional :explicit_buckets, :message, 9, "google.api.servicecontrol.v1.Distribution.ExplicitBuckets"
|
19
|
+
end
|
20
|
+
end
|
21
|
+
add_message "google.api.servicecontrol.v1.Distribution.LinearBuckets" do
|
22
|
+
optional :num_finite_buckets, :int32, 1
|
23
|
+
optional :width, :double, 2
|
24
|
+
optional :offset, :double, 3
|
25
|
+
end
|
26
|
+
add_message "google.api.servicecontrol.v1.Distribution.ExponentialBuckets" do
|
27
|
+
optional :num_finite_buckets, :int32, 1
|
28
|
+
optional :growth_factor, :double, 2
|
29
|
+
optional :scale, :double, 3
|
30
|
+
end
|
31
|
+
add_message "google.api.servicecontrol.v1.Distribution.ExplicitBuckets" do
|
32
|
+
repeated :bounds, :double, 1
|
33
|
+
end
|
34
|
+
end
|
35
|
+
end
|
36
|
+
|
37
|
+
module Google
|
38
|
+
module Cloud
|
39
|
+
module ServiceControl
|
40
|
+
module V1
|
41
|
+
Distribution = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.api.servicecontrol.v1.Distribution").msgclass
|
42
|
+
Distribution::LinearBuckets = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.api.servicecontrol.v1.Distribution.LinearBuckets").msgclass
|
43
|
+
Distribution::ExponentialBuckets = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.api.servicecontrol.v1.Distribution.ExponentialBuckets").msgclass
|
44
|
+
Distribution::ExplicitBuckets = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.api.servicecontrol.v1.Distribution.ExplicitBuckets").msgclass
|
45
|
+
end
|
46
|
+
end
|
47
|
+
end
|
48
|
+
end
|
@@ -0,0 +1,37 @@
|
|
1
|
+
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
2
|
+
# source: google/api/servicecontrol/v1/http_request.proto
|
3
|
+
|
4
|
+
require 'google/protobuf'
|
5
|
+
|
6
|
+
require 'google/protobuf/duration_pb'
|
7
|
+
Google::Protobuf::DescriptorPool.generated_pool.build do
|
8
|
+
add_file("google/api/servicecontrol/v1/http_request.proto", :syntax => :proto3) do
|
9
|
+
add_message "google.api.servicecontrol.v1.HttpRequest" do
|
10
|
+
optional :request_method, :string, 1
|
11
|
+
optional :request_url, :string, 2
|
12
|
+
optional :request_size, :int64, 3
|
13
|
+
optional :status, :int32, 4
|
14
|
+
optional :response_size, :int64, 5
|
15
|
+
optional :user_agent, :string, 6
|
16
|
+
optional :remote_ip, :string, 7
|
17
|
+
optional :server_ip, :string, 13
|
18
|
+
optional :referer, :string, 8
|
19
|
+
optional :latency, :message, 14, "google.protobuf.Duration"
|
20
|
+
optional :cache_lookup, :bool, 11
|
21
|
+
optional :cache_hit, :bool, 9
|
22
|
+
optional :cache_validated_with_origin_server, :bool, 10
|
23
|
+
optional :cache_fill_bytes, :int64, 12
|
24
|
+
optional :protocol, :string, 15
|
25
|
+
end
|
26
|
+
end
|
27
|
+
end
|
28
|
+
|
29
|
+
module Google
|
30
|
+
module Cloud
|
31
|
+
module ServiceControl
|
32
|
+
module V1
|
33
|
+
HttpRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.api.servicecontrol.v1.HttpRequest").msgclass
|
34
|
+
end
|
35
|
+
end
|
36
|
+
end
|
37
|
+
end
|
@@ -0,0 +1,53 @@
|
|
1
|
+
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
2
|
+
# source: google/api/servicecontrol/v1/log_entry.proto
|
3
|
+
|
4
|
+
require 'google/protobuf'
|
5
|
+
|
6
|
+
require 'google/api/servicecontrol/v1/http_request_pb'
|
7
|
+
require 'google/logging/type/log_severity_pb'
|
8
|
+
require 'google/protobuf/any_pb'
|
9
|
+
require 'google/protobuf/struct_pb'
|
10
|
+
require 'google/protobuf/timestamp_pb'
|
11
|
+
Google::Protobuf::DescriptorPool.generated_pool.build do
|
12
|
+
add_file("google/api/servicecontrol/v1/log_entry.proto", :syntax => :proto3) do
|
13
|
+
add_message "google.api.servicecontrol.v1.LogEntry" do
|
14
|
+
optional :name, :string, 10
|
15
|
+
optional :timestamp, :message, 11, "google.protobuf.Timestamp"
|
16
|
+
optional :severity, :enum, 12, "google.logging.type.LogSeverity"
|
17
|
+
optional :http_request, :message, 14, "google.api.servicecontrol.v1.HttpRequest"
|
18
|
+
optional :trace, :string, 15
|
19
|
+
optional :insert_id, :string, 4
|
20
|
+
map :labels, :string, :string, 13
|
21
|
+
optional :operation, :message, 16, "google.api.servicecontrol.v1.LogEntryOperation"
|
22
|
+
optional :source_location, :message, 17, "google.api.servicecontrol.v1.LogEntrySourceLocation"
|
23
|
+
oneof :payload do
|
24
|
+
optional :proto_payload, :message, 2, "google.protobuf.Any"
|
25
|
+
optional :text_payload, :string, 3
|
26
|
+
optional :struct_payload, :message, 6, "google.protobuf.Struct"
|
27
|
+
end
|
28
|
+
end
|
29
|
+
add_message "google.api.servicecontrol.v1.LogEntryOperation" do
|
30
|
+
optional :id, :string, 1
|
31
|
+
optional :producer, :string, 2
|
32
|
+
optional :first, :bool, 3
|
33
|
+
optional :last, :bool, 4
|
34
|
+
end
|
35
|
+
add_message "google.api.servicecontrol.v1.LogEntrySourceLocation" do
|
36
|
+
optional :file, :string, 1
|
37
|
+
optional :line, :int64, 2
|
38
|
+
optional :function, :string, 3
|
39
|
+
end
|
40
|
+
end
|
41
|
+
end
|
42
|
+
|
43
|
+
module Google
|
44
|
+
module Cloud
|
45
|
+
module ServiceControl
|
46
|
+
module V1
|
47
|
+
LogEntry = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.api.servicecontrol.v1.LogEntry").msgclass
|
48
|
+
LogEntryOperation = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.api.servicecontrol.v1.LogEntryOperation").msgclass
|
49
|
+
LogEntrySourceLocation = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.api.servicecontrol.v1.LogEntrySourceLocation").msgclass
|
50
|
+
end
|
51
|
+
end
|
52
|
+
end
|
53
|
+
end
|
@@ -0,0 +1,38 @@
|
|
1
|
+
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
2
|
+
# source: google/api/servicecontrol/v1/metric_value.proto
|
3
|
+
|
4
|
+
require 'google/protobuf'
|
5
|
+
|
6
|
+
require 'google/api/servicecontrol/v1/distribution_pb'
|
7
|
+
require 'google/protobuf/timestamp_pb'
|
8
|
+
Google::Protobuf::DescriptorPool.generated_pool.build do
|
9
|
+
add_file("google/api/servicecontrol/v1/metric_value.proto", :syntax => :proto3) do
|
10
|
+
add_message "google.api.servicecontrol.v1.MetricValue" do
|
11
|
+
map :labels, :string, :string, 1
|
12
|
+
optional :start_time, :message, 2, "google.protobuf.Timestamp"
|
13
|
+
optional :end_time, :message, 3, "google.protobuf.Timestamp"
|
14
|
+
oneof :value do
|
15
|
+
optional :bool_value, :bool, 4
|
16
|
+
optional :int64_value, :int64, 5
|
17
|
+
optional :double_value, :double, 6
|
18
|
+
optional :string_value, :string, 7
|
19
|
+
optional :distribution_value, :message, 8, "google.api.servicecontrol.v1.Distribution"
|
20
|
+
end
|
21
|
+
end
|
22
|
+
add_message "google.api.servicecontrol.v1.MetricValueSet" do
|
23
|
+
optional :metric_name, :string, 1
|
24
|
+
repeated :metric_values, :message, 2, "google.api.servicecontrol.v1.MetricValue"
|
25
|
+
end
|
26
|
+
end
|
27
|
+
end
|
28
|
+
|
29
|
+
module Google
|
30
|
+
module Cloud
|
31
|
+
module ServiceControl
|
32
|
+
module V1
|
33
|
+
MetricValue = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.api.servicecontrol.v1.MetricValue").msgclass
|
34
|
+
MetricValueSet = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.api.servicecontrol.v1.MetricValueSet").msgclass
|
35
|
+
end
|
36
|
+
end
|
37
|
+
end
|
38
|
+
end
|
@@ -0,0 +1,40 @@
|
|
1
|
+
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
2
|
+
# source: google/api/servicecontrol/v1/operation.proto
|
3
|
+
|
4
|
+
require 'google/protobuf'
|
5
|
+
|
6
|
+
require 'google/api/servicecontrol/v1/log_entry_pb'
|
7
|
+
require 'google/api/servicecontrol/v1/metric_value_pb'
|
8
|
+
require 'google/protobuf/any_pb'
|
9
|
+
require 'google/protobuf/timestamp_pb'
|
10
|
+
Google::Protobuf::DescriptorPool.generated_pool.build do
|
11
|
+
add_file("google/api/servicecontrol/v1/operation.proto", :syntax => :proto3) do
|
12
|
+
add_message "google.api.servicecontrol.v1.Operation" do
|
13
|
+
optional :operation_id, :string, 1
|
14
|
+
optional :operation_name, :string, 2
|
15
|
+
optional :consumer_id, :string, 3
|
16
|
+
optional :start_time, :message, 4, "google.protobuf.Timestamp"
|
17
|
+
optional :end_time, :message, 5, "google.protobuf.Timestamp"
|
18
|
+
map :labels, :string, :string, 6
|
19
|
+
repeated :metric_value_sets, :message, 7, "google.api.servicecontrol.v1.MetricValueSet"
|
20
|
+
repeated :log_entries, :message, 8, "google.api.servicecontrol.v1.LogEntry"
|
21
|
+
optional :importance, :enum, 11, "google.api.servicecontrol.v1.Operation.Importance"
|
22
|
+
repeated :extensions, :message, 16, "google.protobuf.Any"
|
23
|
+
end
|
24
|
+
add_enum "google.api.servicecontrol.v1.Operation.Importance" do
|
25
|
+
value :LOW, 0
|
26
|
+
value :HIGH, 1
|
27
|
+
end
|
28
|
+
end
|
29
|
+
end
|
30
|
+
|
31
|
+
module Google
|
32
|
+
module Cloud
|
33
|
+
module ServiceControl
|
34
|
+
module V1
|
35
|
+
Operation = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.api.servicecontrol.v1.Operation").msgclass
|
36
|
+
Operation::Importance = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.api.servicecontrol.v1.Operation.Importance").enummodule
|
37
|
+
end
|
38
|
+
end
|
39
|
+
end
|
40
|
+
end
|
@@ -0,0 +1,67 @@
|
|
1
|
+
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
2
|
+
# source: google/api/servicecontrol/v1/quota_controller.proto
|
3
|
+
|
4
|
+
require 'google/protobuf'
|
5
|
+
|
6
|
+
require 'google/api/annotations_pb'
|
7
|
+
require 'google/api/servicecontrol/v1/metric_value_pb'
|
8
|
+
require 'google/api/client_pb'
|
9
|
+
Google::Protobuf::DescriptorPool.generated_pool.build do
|
10
|
+
add_file("google/api/servicecontrol/v1/quota_controller.proto", :syntax => :proto3) do
|
11
|
+
add_message "google.api.servicecontrol.v1.AllocateQuotaRequest" do
|
12
|
+
optional :service_name, :string, 1
|
13
|
+
optional :allocate_operation, :message, 2, "google.api.servicecontrol.v1.QuotaOperation"
|
14
|
+
optional :service_config_id, :string, 4
|
15
|
+
end
|
16
|
+
add_message "google.api.servicecontrol.v1.QuotaOperation" do
|
17
|
+
optional :operation_id, :string, 1
|
18
|
+
optional :method_name, :string, 2
|
19
|
+
optional :consumer_id, :string, 3
|
20
|
+
map :labels, :string, :string, 4
|
21
|
+
repeated :quota_metrics, :message, 5, "google.api.servicecontrol.v1.MetricValueSet"
|
22
|
+
optional :quota_mode, :enum, 6, "google.api.servicecontrol.v1.QuotaOperation.QuotaMode"
|
23
|
+
end
|
24
|
+
add_enum "google.api.servicecontrol.v1.QuotaOperation.QuotaMode" do
|
25
|
+
value :UNSPECIFIED, 0
|
26
|
+
value :NORMAL, 1
|
27
|
+
value :BEST_EFFORT, 2
|
28
|
+
value :CHECK_ONLY, 3
|
29
|
+
value :QUERY_ONLY, 4
|
30
|
+
value :ADJUST_ONLY, 5
|
31
|
+
end
|
32
|
+
add_message "google.api.servicecontrol.v1.AllocateQuotaResponse" do
|
33
|
+
optional :operation_id, :string, 1
|
34
|
+
repeated :allocate_errors, :message, 2, "google.api.servicecontrol.v1.QuotaError"
|
35
|
+
repeated :quota_metrics, :message, 3, "google.api.servicecontrol.v1.MetricValueSet"
|
36
|
+
optional :service_config_id, :string, 4
|
37
|
+
end
|
38
|
+
add_message "google.api.servicecontrol.v1.QuotaError" do
|
39
|
+
optional :code, :enum, 1, "google.api.servicecontrol.v1.QuotaError.Code"
|
40
|
+
optional :subject, :string, 2
|
41
|
+
optional :description, :string, 3
|
42
|
+
end
|
43
|
+
add_enum "google.api.servicecontrol.v1.QuotaError.Code" do
|
44
|
+
value :UNSPECIFIED, 0
|
45
|
+
value :RESOURCE_EXHAUSTED, 8
|
46
|
+
value :BILLING_NOT_ACTIVE, 107
|
47
|
+
value :PROJECT_DELETED, 108
|
48
|
+
value :API_KEY_INVALID, 105
|
49
|
+
value :API_KEY_EXPIRED, 112
|
50
|
+
end
|
51
|
+
end
|
52
|
+
end
|
53
|
+
|
54
|
+
module Google
|
55
|
+
module Cloud
|
56
|
+
module ServiceControl
|
57
|
+
module V1
|
58
|
+
AllocateQuotaRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.api.servicecontrol.v1.AllocateQuotaRequest").msgclass
|
59
|
+
QuotaOperation = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.api.servicecontrol.v1.QuotaOperation").msgclass
|
60
|
+
QuotaOperation::QuotaMode = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.api.servicecontrol.v1.QuotaOperation.QuotaMode").enummodule
|
61
|
+
AllocateQuotaResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.api.servicecontrol.v1.AllocateQuotaResponse").msgclass
|
62
|
+
QuotaError = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.api.servicecontrol.v1.QuotaError").msgclass
|
63
|
+
QuotaError::Code = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.api.servicecontrol.v1.QuotaError.Code").enummodule
|
64
|
+
end
|
65
|
+
end
|
66
|
+
end
|
67
|
+
end
|
@@ -0,0 +1,58 @@
|
|
1
|
+
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
2
|
+
# Source: google/api/servicecontrol/v1/quota_controller.proto for package 'Google.Cloud.ServiceControl.V1'
|
3
|
+
# Original file comments:
|
4
|
+
# Copyright 2020 Google LLC
|
5
|
+
#
|
6
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
7
|
+
# you may not use this file except in compliance with the License.
|
8
|
+
# You may obtain a copy of the License at
|
9
|
+
#
|
10
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
11
|
+
#
|
12
|
+
# Unless required by applicable law or agreed to in writing, software
|
13
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
14
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
15
|
+
# See the License for the specific language governing permissions and
|
16
|
+
# limitations under the License.
|
17
|
+
#
|
18
|
+
|
19
|
+
require 'grpc'
|
20
|
+
require 'google/api/servicecontrol/v1/quota_controller_pb'
|
21
|
+
|
22
|
+
module Google
|
23
|
+
module Cloud
|
24
|
+
module ServiceControl
|
25
|
+
module V1
|
26
|
+
module QuotaController
|
27
|
+
# [Google Quota Control API](/service-control/overview)
|
28
|
+
#
|
29
|
+
# Allows clients to allocate and release quota against a [managed
|
30
|
+
# service](https://cloud.google.com/service-management/reference/rpc/google.api/servicemanagement.v1#google.api.servicemanagement.v1.ManagedService).
|
31
|
+
class Service
|
32
|
+
|
33
|
+
include GRPC::GenericService
|
34
|
+
|
35
|
+
self.marshal_class_method = :encode
|
36
|
+
self.unmarshal_class_method = :decode
|
37
|
+
self.service_name = 'google.api.servicecontrol.v1.QuotaController'
|
38
|
+
|
39
|
+
# Attempts to allocate quota for the specified consumer. It should be called
|
40
|
+
# before the operation is executed.
|
41
|
+
#
|
42
|
+
# This method requires the `servicemanagement.services.quota`
|
43
|
+
# permission on the specified service. For more information, see
|
44
|
+
# [Cloud IAM](https://cloud.google.com/iam).
|
45
|
+
#
|
46
|
+
# **NOTE:** The client **must** fail-open on server errors `INTERNAL`,
|
47
|
+
# `UNKNOWN`, `DEADLINE_EXCEEDED`, and `UNAVAILABLE`. To ensure system
|
48
|
+
# reliability, the server may inject these errors to prohibit any hard
|
49
|
+
# dependency on the quota functionality.
|
50
|
+
rpc :AllocateQuota, ::Google::Cloud::ServiceControl::V1::AllocateQuotaRequest, ::Google::Cloud::ServiceControl::V1::AllocateQuotaResponse
|
51
|
+
end
|
52
|
+
|
53
|
+
Stub = Service.rpc_stub_class
|
54
|
+
end
|
55
|
+
end
|
56
|
+
end
|
57
|
+
end
|
58
|
+
end
|
@@ -0,0 +1,74 @@
|
|
1
|
+
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
2
|
+
# source: google/api/servicecontrol/v1/service_controller.proto
|
3
|
+
|
4
|
+
require 'google/protobuf'
|
5
|
+
|
6
|
+
require 'google/api/annotations_pb'
|
7
|
+
require 'google/api/servicecontrol/v1/check_error_pb'
|
8
|
+
require 'google/api/servicecontrol/v1/operation_pb'
|
9
|
+
require 'google/protobuf/timestamp_pb'
|
10
|
+
require 'google/rpc/status_pb'
|
11
|
+
require 'google/api/client_pb'
|
12
|
+
Google::Protobuf::DescriptorPool.generated_pool.build do
|
13
|
+
add_file("google/api/servicecontrol/v1/service_controller.proto", :syntax => :proto3) do
|
14
|
+
add_message "google.api.servicecontrol.v1.CheckRequest" do
|
15
|
+
optional :service_name, :string, 1
|
16
|
+
optional :operation, :message, 2, "google.api.servicecontrol.v1.Operation"
|
17
|
+
optional :service_config_id, :string, 4
|
18
|
+
end
|
19
|
+
add_message "google.api.servicecontrol.v1.CheckResponse" do
|
20
|
+
optional :operation_id, :string, 1
|
21
|
+
repeated :check_errors, :message, 2, "google.api.servicecontrol.v1.CheckError"
|
22
|
+
optional :service_config_id, :string, 5
|
23
|
+
optional :service_rollout_id, :string, 11
|
24
|
+
optional :check_info, :message, 6, "google.api.servicecontrol.v1.CheckResponse.CheckInfo"
|
25
|
+
end
|
26
|
+
add_message "google.api.servicecontrol.v1.CheckResponse.CheckInfo" do
|
27
|
+
repeated :unused_arguments, :string, 1
|
28
|
+
optional :consumer_info, :message, 2, "google.api.servicecontrol.v1.CheckResponse.ConsumerInfo"
|
29
|
+
end
|
30
|
+
add_message "google.api.servicecontrol.v1.CheckResponse.ConsumerInfo" do
|
31
|
+
optional :project_number, :int64, 1
|
32
|
+
optional :type, :enum, 2, "google.api.servicecontrol.v1.CheckResponse.ConsumerInfo.ConsumerType"
|
33
|
+
optional :consumer_number, :int64, 3
|
34
|
+
end
|
35
|
+
add_enum "google.api.servicecontrol.v1.CheckResponse.ConsumerInfo.ConsumerType" do
|
36
|
+
value :CONSUMER_TYPE_UNSPECIFIED, 0
|
37
|
+
value :PROJECT, 1
|
38
|
+
value :FOLDER, 2
|
39
|
+
value :ORGANIZATION, 3
|
40
|
+
value :SERVICE_SPECIFIC, 4
|
41
|
+
end
|
42
|
+
add_message "google.api.servicecontrol.v1.ReportRequest" do
|
43
|
+
optional :service_name, :string, 1
|
44
|
+
repeated :operations, :message, 2, "google.api.servicecontrol.v1.Operation"
|
45
|
+
optional :service_config_id, :string, 3
|
46
|
+
end
|
47
|
+
add_message "google.api.servicecontrol.v1.ReportResponse" do
|
48
|
+
repeated :report_errors, :message, 1, "google.api.servicecontrol.v1.ReportResponse.ReportError"
|
49
|
+
optional :service_config_id, :string, 2
|
50
|
+
optional :service_rollout_id, :string, 4
|
51
|
+
end
|
52
|
+
add_message "google.api.servicecontrol.v1.ReportResponse.ReportError" do
|
53
|
+
optional :operation_id, :string, 1
|
54
|
+
optional :status, :message, 2, "google.rpc.Status"
|
55
|
+
end
|
56
|
+
end
|
57
|
+
end
|
58
|
+
|
59
|
+
module Google
|
60
|
+
module Cloud
|
61
|
+
module ServiceControl
|
62
|
+
module V1
|
63
|
+
CheckRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.api.servicecontrol.v1.CheckRequest").msgclass
|
64
|
+
CheckResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.api.servicecontrol.v1.CheckResponse").msgclass
|
65
|
+
CheckResponse::CheckInfo = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.api.servicecontrol.v1.CheckResponse.CheckInfo").msgclass
|
66
|
+
CheckResponse::ConsumerInfo = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.api.servicecontrol.v1.CheckResponse.ConsumerInfo").msgclass
|
67
|
+
CheckResponse::ConsumerInfo::ConsumerType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.api.servicecontrol.v1.CheckResponse.ConsumerInfo.ConsumerType").enummodule
|
68
|
+
ReportRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.api.servicecontrol.v1.ReportRequest").msgclass
|
69
|
+
ReportResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.api.servicecontrol.v1.ReportResponse").msgclass
|
70
|
+
ReportResponse::ReportError = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.api.servicecontrol.v1.ReportResponse.ReportError").msgclass
|
71
|
+
end
|
72
|
+
end
|
73
|
+
end
|
74
|
+
end
|