google-cloud-service_usage-v1 0.2.0 → 0.3.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/AUTHENTICATION.md +1 -1
- data/README.md +3 -3
- data/lib/google/api/serviceusage/v1/resources_pb.rb +32 -28
- data/lib/google/api/serviceusage/v1/serviceusage_pb.rb +25 -52
- data/lib/google/cloud/service_usage/v1/service_usage/client.rb +18 -20
- data/lib/google/cloud/service_usage/v1/service_usage/operations.rb +14 -24
- data/lib/google/cloud/service_usage/v1/service_usage.rb +1 -1
- data/lib/google/cloud/service_usage/v1/version.rb +1 -1
- data/lib/google/cloud/service_usage/v1.rb +2 -2
- data/proto_docs/google/api/auth.rb +10 -5
- data/proto_docs/google/api/client.rb +381 -0
- data/proto_docs/google/api/documentation.rb +16 -10
- data/proto_docs/google/api/endpoint.rb +14 -9
- data/proto_docs/google/api/launch_stage.rb +3 -3
- data/proto_docs/google/api/monitored_resource.rb +30 -18
- data/proto_docs/google/api/monitoring.rb +4 -2
- data/proto_docs/google/api/quota.rb +8 -7
- data/proto_docs/google/api/usage.rb +2 -1
- data/proto_docs/google/protobuf/any.rb +7 -4
- data/proto_docs/google/protobuf/api.rb +1 -1
- data/proto_docs/google/protobuf/empty.rb +0 -2
- data/proto_docs/google/protobuf/struct.rb +1 -1
- data/proto_docs/google/protobuf/type.rb +9 -0
- data/proto_docs/google/rpc/status.rb +4 -2
- metadata +11 -8
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ee03208354280563d5cf17faa176f4bc1adf95055f241459272b31c1948d0cbe
|
4
|
+
data.tar.gz: 4e2be6e41bcb4d161e0954871301b6532406b362a6c639e68081d3b4e9b426de
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: db6c7105a732278866d789272ffd83d07b3fb53630836d7fdbe9ef2721d03ff815213be03439f03bf343a6fc50c0b30421dd0b7da64b77a8be28e1319c3ed3ca
|
7
|
+
data.tar.gz: 0fa7db2840685dbe0f76ea8587e8f50fff5611ff0af5c55fccc97751354306a0a05beb2832d54064965645d22d3405f67f2a96f16f47f075b5c144166d917ad9
|
data/AUTHENTICATION.md
CHANGED
@@ -114,7 +114,7 @@ credentials are discovered.
|
|
114
114
|
To configure your system for this, simply:
|
115
115
|
|
116
116
|
1. [Download and install the Cloud SDK](https://cloud.google.com/sdk)
|
117
|
-
2. Authenticate using OAuth 2.0 `$ gcloud auth login`
|
117
|
+
2. Authenticate using OAuth 2.0 `$ gcloud auth application-default login`
|
118
118
|
3. Write code as if already authenticated.
|
119
119
|
|
120
120
|
**NOTE:** This is _not_ recommended for running in production. The Cloud SDK
|
data/README.md
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
# Ruby Client for the Service Usage V1 API
|
2
2
|
|
3
|
-
|
3
|
+
Enables services that service consumers want to use on Google Cloud Platform, lists the available or enabled services, or disables services that service consumers no longer use.
|
4
4
|
|
5
5
|
Service Usage is an infrastructure service of Google Cloud that lets you list and manage other APIs and services in your Cloud projects. You can list and manage Google Cloud services and their APIs, as well as services created using Cloud Endpoints.
|
6
6
|
|
@@ -46,8 +46,8 @@ for general usage information.
|
|
46
46
|
## Enabling Logging
|
47
47
|
|
48
48
|
To enable logging for this library, set the logger for the underlying [gRPC](https://github.com/grpc/grpc/tree/master/src/ruby) library.
|
49
|
-
The logger that you set may be a Ruby stdlib [`Logger`](https://ruby-doc.org/
|
50
|
-
or a [`Google::Cloud::Logging::Logger`](https://
|
49
|
+
The logger that you set may be a Ruby stdlib [`Logger`](https://ruby-doc.org/current/stdlibs/logger/Logger.html) as shown below,
|
50
|
+
or a [`Google::Cloud::Logging::Logger`](https://cloud.google.com/ruby/docs/reference/google-cloud-logging/latest)
|
51
51
|
that will write logs to [Cloud Logging](https://cloud.google.com/logging/). See [grpc/logconfig.rb](https://github.com/grpc/grpc/blob/master/src/ruby/lib/grpc/logconfig.rb)
|
52
52
|
and the gRPC [spec_helper.rb](https://github.com/grpc/grpc/blob/master/src/ruby/spec/spec_helper.rb) for additional information.
|
53
53
|
|
@@ -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/serviceusage/v1/resources.proto
|
3
4
|
|
@@ -11,37 +12,40 @@ require 'google/api/monitoring_pb'
|
|
11
12
|
require 'google/api/quota_pb'
|
12
13
|
require 'google/api/usage_pb'
|
13
14
|
require 'google/protobuf/api_pb'
|
14
|
-
require 'google/api/annotations_pb'
|
15
15
|
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
16
|
+
|
17
|
+
descriptor_data = "\n*google/api/serviceusage/v1/resources.proto\x12\x1agoogle.api.serviceusage.v1\x1a\x15google/api/auth.proto\x1a\x1egoogle/api/documentation.proto\x1a\x19google/api/endpoint.proto\x1a#google/api/monitored_resource.proto\x1a\x1bgoogle/api/monitoring.proto\x1a\x16google/api/quota.proto\x1a\x16google/api/usage.proto\x1a\x19google/protobuf/api.proto\"\x94\x01\n\x07Service\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x0e\n\x06parent\x18\x05 \x01(\t\x12\x39\n\x06\x63onfig\x18\x02 \x01(\x0b\x32).google.api.serviceusage.v1.ServiceConfig\x12\x30\n\x05state\x18\x04 \x01(\x0e\x32!.google.api.serviceusage.v1.State\"\x95\x03\n\rServiceConfig\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\r\n\x05title\x18\x02 \x01(\t\x12\"\n\x04\x61pis\x18\x03 \x03(\x0b\x32\x14.google.protobuf.Api\x12\x30\n\rdocumentation\x18\x06 \x01(\x0b\x32\x19.google.api.Documentation\x12 \n\x05quota\x18\n \x01(\x0b\x32\x11.google.api.Quota\x12\x32\n\x0e\x61uthentication\x18\x0b \x01(\x0b\x32\x1a.google.api.Authentication\x12 \n\x05usage\x18\x0f \x01(\x0b\x32\x11.google.api.Usage\x12\'\n\tendpoints\x18\x12 \x03(\x0b\x32\x14.google.api.Endpoint\x12\x44\n\x13monitored_resources\x18\x19 \x03(\x0b\x32\'.google.api.MonitoredResourceDescriptor\x12*\n\nmonitoring\x18\x1c \x01(\x0b\x32\x16.google.api.Monitoring\"+\n\x11OperationMetadata\x12\x16\n\x0eresource_names\x18\x02 \x03(\t*9\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\x0c\n\x08\x44ISABLED\x10\x01\x12\x0b\n\x07\x45NABLED\x10\x02\x42\xd8\x01\n\x1e\x63om.google.api.serviceusage.v1B\x0eResourcesProtoP\x01ZDcloud.google.com/go/serviceusage/apiv1/serviceusagepb;serviceusagepb\xaa\x02\x1cGoogle.Cloud.ServiceUsage.V1\xca\x02\x1cGoogle\\Cloud\\ServiceUsage\\V1\xea\x02\x1fGoogle::Cloud::ServiceUsage::V1b\x06proto3"
|
18
|
+
|
19
|
+
pool = Google::Protobuf::DescriptorPool.generated_pool
|
20
|
+
|
21
|
+
begin
|
22
|
+
pool.add_serialized_file(descriptor_data)
|
23
|
+
rescue TypeError => e
|
24
|
+
# Compatibility code: will be removed in the next major version.
|
25
|
+
require 'google/protobuf/descriptor_pb'
|
26
|
+
parsed = Google::Protobuf::FileDescriptorProto.decode(descriptor_data)
|
27
|
+
parsed.clear_dependency
|
28
|
+
serialized = parsed.class.encode(parsed)
|
29
|
+
file = pool.add_serialized_file(serialized)
|
30
|
+
warn "Warning: Protobuf detected an import path issue while loading generated file #{__FILE__}"
|
31
|
+
imports = [
|
32
|
+
["google.protobuf.Api", "google/protobuf/api.proto"],
|
33
|
+
["google.api.Documentation", "google/api/documentation.proto"],
|
34
|
+
["google.api.Quota", "google/api/quota.proto"],
|
35
|
+
["google.api.Authentication", "google/api/auth.proto"],
|
36
|
+
["google.api.Usage", "google/api/usage.proto"],
|
37
|
+
["google.api.Endpoint", "google/api/endpoint.proto"],
|
38
|
+
["google.api.MonitoredResourceDescriptor", "google/api/monitored_resource.proto"],
|
39
|
+
["google.api.Monitoring", "google/api/monitoring.proto"],
|
40
|
+
]
|
41
|
+
imports.each do |type_name, expected_filename|
|
42
|
+
import_file = pool.lookup(type_name).file_descriptor
|
43
|
+
if import_file.name != expected_filename
|
44
|
+
warn "- #{file.name} imports #{expected_filename}, but that import was loaded as #{import_file.name}"
|
43
45
|
end
|
44
46
|
end
|
47
|
+
warn "Each proto file must use a consistent fully-qualified name."
|
48
|
+
warn "This will become an error in the next major version."
|
45
49
|
end
|
46
50
|
|
47
51
|
module Google
|
@@ -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/serviceusage/v1/serviceusage.proto
|
3
4
|
|
@@ -8,60 +9,32 @@ require 'google/api/serviceusage/v1/resources_pb'
|
|
8
9
|
require 'google/longrunning/operations_pb'
|
9
10
|
require 'google/api/client_pb'
|
10
11
|
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
optional :name, :string, 1
|
34
|
-
end
|
35
|
-
add_message "google.api.serviceusage.v1.ListServicesRequest" do
|
36
|
-
optional :parent, :string, 1
|
37
|
-
optional :page_size, :int32, 2
|
38
|
-
optional :page_token, :string, 3
|
39
|
-
optional :filter, :string, 4
|
40
|
-
end
|
41
|
-
add_message "google.api.serviceusage.v1.ListServicesResponse" do
|
42
|
-
repeated :services, :message, 1, "google.api.serviceusage.v1.Service"
|
43
|
-
optional :next_page_token, :string, 2
|
44
|
-
end
|
45
|
-
add_message "google.api.serviceusage.v1.BatchEnableServicesRequest" do
|
46
|
-
optional :parent, :string, 1
|
47
|
-
repeated :service_ids, :string, 2
|
48
|
-
end
|
49
|
-
add_message "google.api.serviceusage.v1.BatchEnableServicesResponse" do
|
50
|
-
repeated :services, :message, 1, "google.api.serviceusage.v1.Service"
|
51
|
-
repeated :failures, :message, 2, "google.api.serviceusage.v1.BatchEnableServicesResponse.EnableFailure"
|
52
|
-
end
|
53
|
-
add_message "google.api.serviceusage.v1.BatchEnableServicesResponse.EnableFailure" do
|
54
|
-
optional :service_id, :string, 1
|
55
|
-
optional :error_message, :string, 2
|
56
|
-
end
|
57
|
-
add_message "google.api.serviceusage.v1.BatchGetServicesRequest" do
|
58
|
-
optional :parent, :string, 1
|
59
|
-
repeated :names, :string, 2
|
60
|
-
end
|
61
|
-
add_message "google.api.serviceusage.v1.BatchGetServicesResponse" do
|
62
|
-
repeated :services, :message, 1, "google.api.serviceusage.v1.Service"
|
12
|
+
|
13
|
+
descriptor_data = "\n-google/api/serviceusage/v1/serviceusage.proto\x12\x1agoogle.api.serviceusage.v1\x1a\x1cgoogle/api/annotations.proto\x1a*google/api/serviceusage/v1/resources.proto\x1a#google/longrunning/operations.proto\x1a\x17google/api/client.proto\"$\n\x14\x45nableServiceRequest\x12\x0c\n\x04name\x18\x01 \x01(\t\"M\n\x15\x45nableServiceResponse\x12\x34\n\x07service\x18\x01 \x01(\x0b\x32#.google.api.serviceusage.v1.Service\"\x92\x02\n\x15\x44isableServiceRequest\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\"\n\x1a\x64isable_dependent_services\x18\x02 \x01(\x08\x12l\n\x1a\x63heck_if_service_has_usage\x18\x03 \x01(\x0e\x32H.google.api.serviceusage.v1.DisableServiceRequest.CheckIfServiceHasUsage\"Y\n\x16\x43heckIfServiceHasUsage\x12*\n&CHECK_IF_SERVICE_HAS_USAGE_UNSPECIFIED\x10\x00\x12\x08\n\x04SKIP\x10\x01\x12\t\n\x05\x43HECK\x10\x02\"N\n\x16\x44isableServiceResponse\x12\x34\n\x07service\x18\x01 \x01(\x0b\x32#.google.api.serviceusage.v1.Service\"!\n\x11GetServiceRequest\x12\x0c\n\x04name\x18\x01 \x01(\t\"\\\n\x13ListServicesRequest\x12\x0e\n\x06parent\x18\x01 \x01(\t\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x12\n\npage_token\x18\x03 \x01(\t\x12\x0e\n\x06\x66ilter\x18\x04 \x01(\t\"f\n\x14ListServicesResponse\x12\x35\n\x08services\x18\x01 \x03(\x0b\x32#.google.api.serviceusage.v1.Service\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"A\n\x1a\x42\x61tchEnableServicesRequest\x12\x0e\n\x06parent\x18\x01 \x01(\t\x12\x13\n\x0bservice_ids\x18\x02 \x03(\t\"\xe9\x01\n\x1b\x42\x61tchEnableServicesResponse\x12\x35\n\x08services\x18\x01 \x03(\x0b\x32#.google.api.serviceusage.v1.Service\x12W\n\x08\x66\x61ilures\x18\x02 \x03(\x0b\x32\x45.google.api.serviceusage.v1.BatchEnableServicesResponse.EnableFailure\x1a:\n\rEnableFailure\x12\x12\n\nservice_id\x18\x01 \x01(\t\x12\x15\n\rerror_message\x18\x02 \x01(\t\"8\n\x17\x42\x61tchGetServicesRequest\x12\x0e\n\x06parent\x18\x01 \x01(\t\x12\r\n\x05names\x18\x02 \x03(\t\"Q\n\x18\x42\x61tchGetServicesResponse\x12\x35\n\x08services\x18\x01 \x03(\x0b\x32#.google.api.serviceusage.v1.Service2\xe8\t\n\x0cServiceUsage\x12\xba\x01\n\rEnableService\x12\x30.google.api.serviceusage.v1.EnableServiceRequest\x1a\x1d.google.longrunning.Operation\"X\x82\xd3\xe4\x93\x02%\" /v1/{name=*/*/services/*}:enable:\x01*\xca\x41*\n\x15\x45nableServiceResponse\x12\x11OperationMetadata\x12\xbe\x01\n\x0e\x44isableService\x12\x31.google.api.serviceusage.v1.DisableServiceRequest\x1a\x1d.google.longrunning.Operation\"Z\x82\xd3\xe4\x93\x02&\"!/v1/{name=*/*/services/*}:disable:\x01*\xca\x41+\n\x16\x44isableServiceResponse\x12\x11OperationMetadata\x12\x83\x01\n\nGetService\x12-.google.api.serviceusage.v1.GetServiceRequest\x1a#.google.api.serviceusage.v1.Service\"!\x82\xd3\xe4\x93\x02\x1b\x12\x19/v1/{name=*/*/services/*}\x12\x94\x01\n\x0cListServices\x12/.google.api.serviceusage.v1.ListServicesRequest\x1a\x30.google.api.serviceusage.v1.ListServicesResponse\"!\x82\xd3\xe4\x93\x02\x1b\x12\x19/v1/{parent=*/*}/services\x12\xd1\x01\n\x13\x42\x61tchEnableServices\x12\x36.google.api.serviceusage.v1.BatchEnableServicesRequest\x1a\x1d.google.longrunning.Operation\"c\x82\xd3\xe4\x93\x02*\"%/v1/{parent=*/*}/services:batchEnable:\x01*\xca\x41\x30\n\x1b\x42\x61tchEnableServicesResponse\x12\x11OperationMetadata\x12\xa9\x01\n\x10\x42\x61tchGetServices\x12\x33.google.api.serviceusage.v1.BatchGetServicesRequest\x1a\x34.google.api.serviceusage.v1.BatchGetServicesResponse\"*\x82\xd3\xe4\x93\x02$\x12\"/v1/{parent=*/*}/services:batchGet\x1a\xbc\x01\xca\x41\x1bserviceusage.googleapis.com\xd2\x41\x9a\x01https://www.googleapis.com/auth/cloud-platform,https://www.googleapis.com/auth/cloud-platform.read-only,https://www.googleapis.com/auth/service.managementB\xdb\x01\n\x1e\x63om.google.api.serviceusage.v1B\x11ServiceUsageProtoP\x01ZDcloud.google.com/go/serviceusage/apiv1/serviceusagepb;serviceusagepb\xaa\x02\x1cGoogle.Cloud.ServiceUsage.V1\xca\x02\x1cGoogle\\Cloud\\ServiceUsage\\V1\xea\x02\x1fGoogle::Cloud::ServiceUsage::V1b\x06proto3"
|
14
|
+
|
15
|
+
pool = Google::Protobuf::DescriptorPool.generated_pool
|
16
|
+
|
17
|
+
begin
|
18
|
+
pool.add_serialized_file(descriptor_data)
|
19
|
+
rescue TypeError => e
|
20
|
+
# Compatibility code: will be removed in the next major version.
|
21
|
+
require 'google/protobuf/descriptor_pb'
|
22
|
+
parsed = Google::Protobuf::FileDescriptorProto.decode(descriptor_data)
|
23
|
+
parsed.clear_dependency
|
24
|
+
serialized = parsed.class.encode(parsed)
|
25
|
+
file = pool.add_serialized_file(serialized)
|
26
|
+
warn "Warning: Protobuf detected an import path issue while loading generated file #{__FILE__}"
|
27
|
+
imports = [
|
28
|
+
["google.api.serviceusage.v1.Service", "google/api/serviceusage/v1/resources.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}"
|
63
34
|
end
|
64
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."
|
65
38
|
end
|
66
39
|
|
67
40
|
module Google
|
@@ -212,14 +212,14 @@ module Google
|
|
212
212
|
# # Call the enable_service method.
|
213
213
|
# result = client.enable_service request
|
214
214
|
#
|
215
|
-
# # The returned object is of type Gapic::Operation. You can use
|
216
|
-
# #
|
217
|
-
# #
|
215
|
+
# # The returned object is of type Gapic::Operation. You can use it to
|
216
|
+
# # check the status of an operation, cancel it, or wait for results.
|
217
|
+
# # Here is how to wait for a response.
|
218
218
|
# result.wait_until_done! timeout: 60
|
219
219
|
# if result.response?
|
220
220
|
# p result.response
|
221
221
|
# else
|
222
|
-
# puts "
|
222
|
+
# puts "No response received."
|
223
223
|
# end
|
224
224
|
#
|
225
225
|
def enable_service request, options = nil
|
@@ -325,14 +325,14 @@ module Google
|
|
325
325
|
# # Call the disable_service method.
|
326
326
|
# result = client.disable_service request
|
327
327
|
#
|
328
|
-
# # The returned object is of type Gapic::Operation. You can use
|
329
|
-
# #
|
330
|
-
# #
|
328
|
+
# # The returned object is of type Gapic::Operation. You can use it to
|
329
|
+
# # check the status of an operation, cancel it, or wait for results.
|
330
|
+
# # Here is how to wait for a response.
|
331
331
|
# result.wait_until_done! timeout: 60
|
332
332
|
# if result.response?
|
333
333
|
# p result.response
|
334
334
|
# else
|
335
|
-
# puts "
|
335
|
+
# puts "No response received."
|
336
336
|
# end
|
337
337
|
#
|
338
338
|
def disable_service request, options = nil
|
@@ -532,13 +532,11 @@ module Google
|
|
532
532
|
# # Call the list_services method.
|
533
533
|
# result = client.list_services request
|
534
534
|
#
|
535
|
-
# # The returned object is of type Gapic::PagedEnumerable. You can
|
536
|
-
# #
|
537
|
-
#
|
538
|
-
# # methods are also available for managing paging directly.
|
539
|
-
# result.each do |response|
|
535
|
+
# # The returned object is of type Gapic::PagedEnumerable. You can iterate
|
536
|
+
# # over elements, and API calls will be issued to fetch pages as needed.
|
537
|
+
# result.each do |item|
|
540
538
|
# # Each element is of type ::Google::Cloud::ServiceUsage::V1::Service.
|
541
|
-
# p
|
539
|
+
# p item
|
542
540
|
# end
|
543
541
|
#
|
544
542
|
def list_services request, options = nil
|
@@ -643,14 +641,14 @@ module Google
|
|
643
641
|
# # Call the batch_enable_services method.
|
644
642
|
# result = client.batch_enable_services request
|
645
643
|
#
|
646
|
-
# # The returned object is of type Gapic::Operation. You can use
|
647
|
-
# #
|
648
|
-
# #
|
644
|
+
# # The returned object is of type Gapic::Operation. You can use it to
|
645
|
+
# # check the status of an operation, cancel it, or wait for results.
|
646
|
+
# # Here is how to wait for a response.
|
649
647
|
# result.wait_until_done! timeout: 60
|
650
648
|
# if result.response?
|
651
649
|
# p result.response
|
652
650
|
# else
|
653
|
-
# puts "
|
651
|
+
# puts "No response received."
|
654
652
|
# end
|
655
653
|
#
|
656
654
|
def batch_enable_services request, options = nil
|
@@ -830,9 +828,9 @@ module Google
|
|
830
828
|
# * (`String`) The path to a service account key file in JSON format
|
831
829
|
# * (`Hash`) A service account key as a Hash
|
832
830
|
# * (`Google::Auth::Credentials`) A googleauth credentials object
|
833
|
-
# (see the [googleauth docs](https://
|
831
|
+
# (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials))
|
834
832
|
# * (`Signet::OAuth2::Client`) A signet oauth2 client object
|
835
|
-
# (see the [signet docs](https://
|
833
|
+
# (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client))
|
836
834
|
# * (`GRPC::Core::Channel`) a gRPC channel with included credentials
|
837
835
|
# * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object
|
838
836
|
# * (`nil`) indicating no credentials
|
@@ -158,13 +158,11 @@ module Google
|
|
158
158
|
# # Call the list_operations method.
|
159
159
|
# result = client.list_operations request
|
160
160
|
#
|
161
|
-
# # The returned object is of type Gapic::PagedEnumerable. You can
|
162
|
-
# #
|
163
|
-
#
|
164
|
-
# # methods are also available for managing paging directly.
|
165
|
-
# result.each do |response|
|
161
|
+
# # The returned object is of type Gapic::PagedEnumerable. You can iterate
|
162
|
+
# # over elements, and API calls will be issued to fetch pages as needed.
|
163
|
+
# result.each do |item|
|
166
164
|
# # Each element is of type ::Google::Longrunning::Operation.
|
167
|
-
# p
|
165
|
+
# p item
|
168
166
|
# end
|
169
167
|
#
|
170
168
|
def list_operations request, options = nil
|
@@ -184,14 +182,6 @@ module Google
|
|
184
182
|
gapic_version: ::Google::Cloud::ServiceUsage::V1::VERSION
|
185
183
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
186
184
|
|
187
|
-
header_params = {}
|
188
|
-
if request.name
|
189
|
-
header_params["name"] = request.name
|
190
|
-
end
|
191
|
-
|
192
|
-
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
193
|
-
metadata[:"x-goog-request-params"] ||= request_params_header
|
194
|
-
|
195
185
|
options.apply_defaults timeout: @config.rpcs.list_operations.timeout,
|
196
186
|
metadata: metadata,
|
197
187
|
retry_policy: @config.rpcs.list_operations.retry_policy
|
@@ -253,14 +243,14 @@ module Google
|
|
253
243
|
# # Call the get_operation method.
|
254
244
|
# result = client.get_operation request
|
255
245
|
#
|
256
|
-
# # The returned object is of type Gapic::Operation. You can use
|
257
|
-
# #
|
258
|
-
# #
|
246
|
+
# # The returned object is of type Gapic::Operation. You can use it to
|
247
|
+
# # check the status of an operation, cancel it, or wait for results.
|
248
|
+
# # Here is how to wait for a response.
|
259
249
|
# result.wait_until_done! timeout: 60
|
260
250
|
# if result.response?
|
261
251
|
# p result.response
|
262
252
|
# else
|
263
|
-
# puts "
|
253
|
+
# puts "No response received."
|
264
254
|
# end
|
265
255
|
#
|
266
256
|
def get_operation request, options = nil
|
@@ -540,14 +530,14 @@ module Google
|
|
540
530
|
# # Call the wait_operation method.
|
541
531
|
# result = client.wait_operation request
|
542
532
|
#
|
543
|
-
# # The returned object is of type Gapic::Operation. You can use
|
544
|
-
# #
|
545
|
-
# #
|
533
|
+
# # The returned object is of type Gapic::Operation. You can use it to
|
534
|
+
# # check the status of an operation, cancel it, or wait for results.
|
535
|
+
# # Here is how to wait for a response.
|
546
536
|
# result.wait_until_done! timeout: 60
|
547
537
|
# if result.response?
|
548
538
|
# p result.response
|
549
539
|
# else
|
550
|
-
# puts "
|
540
|
+
# puts "No response received."
|
551
541
|
# end
|
552
542
|
#
|
553
543
|
def wait_operation request, options = nil
|
@@ -622,9 +612,9 @@ module Google
|
|
622
612
|
# * (`String`) The path to a service account key file in JSON format
|
623
613
|
# * (`Hash`) A service account key as a Hash
|
624
614
|
# * (`Google::Auth::Credentials`) A googleauth credentials object
|
625
|
-
# (see the [googleauth docs](https://
|
615
|
+
# (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials))
|
626
616
|
# * (`Signet::OAuth2::Client`) A signet oauth2 client object
|
627
|
-
# (see the [signet docs](https://
|
617
|
+
# (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client))
|
628
618
|
# * (`GRPC::Core::Channel`) a gRPC channel with included credentials
|
629
619
|
# * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object
|
630
620
|
# * (`nil`) indicating no credentials
|
@@ -37,7 +37,7 @@ module Google
|
|
37
37
|
#
|
38
38
|
# See [Service Usage API](https://cloud.google.com/service-usage/docs/overview)
|
39
39
|
#
|
40
|
-
#
|
40
|
+
# @example Load this service and instantiate a gRPC client
|
41
41
|
#
|
42
42
|
# require "google/cloud/service_usage/v1/service_usage"
|
43
43
|
# client = ::Google::Cloud::ServiceUsage::V1::ServiceUsage::Client.new
|
@@ -23,9 +23,9 @@ module Google
|
|
23
23
|
module Cloud
|
24
24
|
module ServiceUsage
|
25
25
|
##
|
26
|
-
#
|
26
|
+
# API client module.
|
27
27
|
#
|
28
|
-
# @example
|
28
|
+
# @example Load this package, including all its services, and instantiate a gRPC client
|
29
29
|
#
|
30
30
|
# require "google/cloud/service_usage/v1"
|
31
31
|
# client = ::Google::Cloud::ServiceUsage::V1::ServiceUsage::Client.new
|
@@ -63,7 +63,8 @@ module Google
|
|
63
63
|
# @return [::String]
|
64
64
|
# Selects the methods to which this rule applies.
|
65
65
|
#
|
66
|
-
# Refer to {::Google::Api::DocumentationRule#selector selector} for syntax
|
66
|
+
# Refer to {::Google::Api::DocumentationRule#selector selector} for syntax
|
67
|
+
# details.
|
67
68
|
# @!attribute [rw] oauth
|
68
69
|
# @return [::Google::Api::OAuthRequirements]
|
69
70
|
# The requirements for OAuth credentials.
|
@@ -86,6 +87,9 @@ module Google
|
|
86
87
|
# @!attribute [rw] query
|
87
88
|
# @return [::String]
|
88
89
|
# Specifies URL query parameter name to extract JWT token.
|
90
|
+
# @!attribute [rw] cookie
|
91
|
+
# @return [::String]
|
92
|
+
# Specifies cookie name to extract JWT token.
|
89
93
|
# @!attribute [rw] value_prefix
|
90
94
|
# @return [::String]
|
91
95
|
# The value prefix. The value format is "value_prefix\\{token}"
|
@@ -157,11 +161,12 @@ module Google
|
|
157
161
|
# Implement authorizationUrl of securityDefinitions in OpenAPI spec.
|
158
162
|
# @!attribute [rw] jwt_locations
|
159
163
|
# @return [::Array<::Google::Api::JwtLocation>]
|
160
|
-
# Defines the locations to extract the JWT.
|
164
|
+
# Defines the locations to extract the JWT. For now it is only used by the
|
165
|
+
# Cloud Endpoints to store the OpenAPI extension [x-google-jwt-locations]
|
166
|
+
# (https://cloud.google.com/endpoints/docs/openapi/openapi-extensions#x-google-jwt-locations)
|
161
167
|
#
|
162
|
-
# JWT locations can be
|
163
|
-
# The rule is that the first match wins.
|
164
|
-
# all headers first, then URL query parameters.
|
168
|
+
# JWT locations can be one of HTTP headers, URL query parameters or
|
169
|
+
# cookies. The rule is that the first match wins.
|
165
170
|
#
|
166
171
|
# If not specified, default to use following 3 locations:
|
167
172
|
# 1) Authorization: Bearer
|