google-cloud-api_keys-v2 0.1.0 → 0.3.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/AUTHENTICATION.md +1 -1
- data/README.md +3 -3
- data/lib/google/api/apikeys/v2/apikeys_pb.rb +26 -43
- data/lib/google/api/apikeys/v2/resources_pb.rb +25 -42
- data/lib/google/cloud/api_keys/v2/api_keys/client.rb +26 -26
- data/lib/google/cloud/api_keys/v2/api_keys/operations.rb +17 -17
- data/lib/google/cloud/api_keys/v2/api_keys/rest/client.rb +912 -0
- data/lib/google/cloud/api_keys/v2/api_keys/rest/operations.rb +795 -0
- data/lib/google/cloud/api_keys/v2/api_keys/rest/service_stub.rb +521 -0
- data/lib/google/cloud/api_keys/v2/api_keys/rest.rb +53 -0
- data/lib/google/cloud/api_keys/v2/api_keys.rb +7 -1
- data/lib/google/cloud/api_keys/v2/rest.rb +37 -0
- data/lib/google/cloud/api_keys/v2/version.rb +1 -1
- data/lib/google/cloud/api_keys/v2.rb +7 -2
- data/proto_docs/google/api/client.rb +381 -0
- data/proto_docs/google/api/launch_stage.rb +71 -0
- data/proto_docs/google/protobuf/any.rb +7 -4
- data/proto_docs/google/protobuf/timestamp.rb +1 -3
- data/proto_docs/google/rpc/status.rb +4 -2
- metadata +15 -8
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 4784d656d0d9c374028ec1834dabe8dfba4dc431acb2d804fd68f2ec115ee3f6
|
4
|
+
data.tar.gz: e4a92125c89eb3bcda57538b1e28e6f7c6f2a2040d0ba160031a0e273536a464
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 19a1698aff2ac50ca3f5f54507fba95199a44ee861fa01ea05734b281d3002e27e4d92f0bdf6626dd557ed10ef3d20446a19d7b872a4b497ab9f0ea856b8077e
|
7
|
+
data.tar.gz: c23e97ccf5bdf48a5c03707bd9504e5404f56017e56533b034c6d504132ab87948277fcdee219d4f632992fd8959b891292e6c70dafb511f1845ba20b98930cf
|
data/AUTHENTICATION.md
CHANGED
@@ -112,7 +112,7 @@ credentials are discovered.
|
|
112
112
|
To configure your system for this, simply:
|
113
113
|
|
114
114
|
1. [Download and install the Cloud SDK](https://cloud.google.com/sdk)
|
115
|
-
2. Authenticate using OAuth 2.0 `$ gcloud auth login`
|
115
|
+
2. Authenticate using OAuth 2.0 `$ gcloud auth application-default login`
|
116
116
|
3. Write code as if already authenticated.
|
117
117
|
|
118
118
|
**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 API Keys V2 API
|
2
2
|
|
3
|
-
|
3
|
+
Manages the API keys associated with developer projects.
|
4
4
|
|
5
5
|
An API key is a simple encrypted string that you can use when calling Google Cloud APIs. The API Keys service manages the API keys associated with developer projects.
|
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/apikeys/v2/apikeys.proto
|
3
4
|
|
@@ -11,51 +12,33 @@ require 'google/api/resource_pb'
|
|
11
12
|
require 'google/longrunning/operations_pb'
|
12
13
|
require 'google/protobuf/field_mask_pb'
|
13
14
|
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
add_message "google.api.apikeys.v2.GetKeyStringResponse" do
|
38
|
-
optional :key_string, :string, 1
|
39
|
-
end
|
40
|
-
add_message "google.api.apikeys.v2.UpdateKeyRequest" do
|
41
|
-
optional :key, :message, 1, "google.api.apikeys.v2.Key"
|
42
|
-
optional :update_mask, :message, 2, "google.protobuf.FieldMask"
|
43
|
-
end
|
44
|
-
add_message "google.api.apikeys.v2.DeleteKeyRequest" do
|
45
|
-
optional :name, :string, 1
|
46
|
-
optional :etag, :string, 2
|
47
|
-
end
|
48
|
-
add_message "google.api.apikeys.v2.UndeleteKeyRequest" do
|
49
|
-
optional :name, :string, 1
|
50
|
-
end
|
51
|
-
add_message "google.api.apikeys.v2.LookupKeyRequest" do
|
52
|
-
optional :key_string, :string, 1
|
53
|
-
end
|
54
|
-
add_message "google.api.apikeys.v2.LookupKeyResponse" do
|
55
|
-
optional :parent, :string, 1
|
56
|
-
optional :name, :string, 2
|
15
|
+
|
16
|
+
descriptor_data = "\n#google/api/apikeys/v2/apikeys.proto\x12\x15google.api.apikeys.v2\x1a\x1cgoogle/api/annotations.proto\x1a%google/api/apikeys/v2/resources.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a#google/longrunning/operations.proto\x1a google/protobuf/field_mask.proto\"\x84\x01\n\x10\x43reateKeyRequest\x12\x32\n\x06parent\x18\x01 \x01(\tB\"\xe0\x41\x02\xfa\x41\x1c\x12\x1a\x61pikeys.googleapis.com/Key\x12,\n\x03key\x18\x02 \x01(\x0b\x32\x1a.google.api.apikeys.v2.KeyB\x03\xe0\x41\x02\x12\x0e\n\x06key_id\x18\x03 \x01(\t\"\x91\x01\n\x0fListKeysRequest\x12\x32\n\x06parent\x18\x01 \x01(\tB\"\xe0\x41\x02\xfa\x41\x1c\x12\x1a\x61pikeys.googleapis.com/Key\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x19\n\x0cshow_deleted\x18\x06 \x01(\x08\x42\x03\xe0\x41\x01\"U\n\x10ListKeysResponse\x12(\n\x04keys\x18\x01 \x03(\x0b\x32\x1a.google.api.apikeys.v2.Key\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"A\n\rGetKeyRequest\x12\x30\n\x04name\x18\x01 \x01(\tB\"\xe0\x41\x02\xfa\x41\x1c\n\x1a\x61pikeys.googleapis.com/Key\"G\n\x13GetKeyStringRequest\x12\x30\n\x04name\x18\x01 \x01(\tB\"\xe0\x41\x02\xfa\x41\x1c\n\x1a\x61pikeys.googleapis.com/Key\"*\n\x14GetKeyStringResponse\x12\x12\n\nkey_string\x18\x01 \x01(\t\"q\n\x10UpdateKeyRequest\x12,\n\x03key\x18\x01 \x01(\x0b\x32\x1a.google.api.apikeys.v2.KeyB\x03\xe0\x41\x02\x12/\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMask\"W\n\x10\x44\x65leteKeyRequest\x12\x30\n\x04name\x18\x01 \x01(\tB\"\xe0\x41\x02\xfa\x41\x1c\n\x1a\x61pikeys.googleapis.com/Key\x12\x11\n\x04\x65tag\x18\x02 \x01(\tB\x03\xe0\x41\x01\"F\n\x12UndeleteKeyRequest\x12\x30\n\x04name\x18\x01 \x01(\tB\"\xe0\x41\x02\xfa\x41\x1c\n\x1a\x61pikeys.googleapis.com/Key\"+\n\x10LookupKeyRequest\x12\x17\n\nkey_string\x18\x01 \x01(\tB\x03\xe0\x41\x02\"1\n\x11LookupKeyResponse\x12\x0e\n\x06parent\x18\x01 \x01(\t\x12\x0c\n\x04name\x18\x02 \x01(\t2\xbe\x0b\n\x07\x41piKeys\x12\xbd\x01\n\tCreateKey\x12\'.google.api.apikeys.v2.CreateKeyRequest\x1a\x1d.google.longrunning.Operation\"h\x82\xd3\xe4\x93\x02/\"(/v2/{parent=projects/*/locations/*}/keys:\x03key\xda\x41\x11parent,key,key_id\xca\x41\x1c\n\x03Key\x12\x15google.protobuf.Empty\x12\x96\x01\n\x08ListKeys\x12&.google.api.apikeys.v2.ListKeysRequest\x1a\'.google.api.apikeys.v2.ListKeysResponse\"9\x82\xd3\xe4\x93\x02*\x12(/v2/{parent=projects/*/locations/*}/keys\xda\x41\x06parent\x12\x83\x01\n\x06GetKey\x12$.google.api.apikeys.v2.GetKeyRequest\x1a\x1a.google.api.apikeys.v2.Key\"7\x82\xd3\xe4\x93\x02*\x12(/v2/{name=projects/*/locations/*/keys/*}\xda\x41\x04name\x12\xaa\x01\n\x0cGetKeyString\x12*.google.api.apikeys.v2.GetKeyStringRequest\x1a+.google.api.apikeys.v2.GetKeyStringResponse\"A\x82\xd3\xe4\x93\x02\x34\x12\x32/v2/{name=projects/*/locations/*/keys/*}/keyString\xda\x41\x04name\x12\xbf\x01\n\tUpdateKey\x12\'.google.api.apikeys.v2.UpdateKeyRequest\x1a\x1d.google.longrunning.Operation\"j\x82\xd3\xe4\x93\x02\x33\x32,/v2/{key.name=projects/*/locations/*/keys/*}:\x03key\xda\x41\x0fkey,update_mask\xca\x41\x1c\n\x03Key\x12\x15google.protobuf.Empty\x12\xab\x01\n\tDeleteKey\x12\'.google.api.apikeys.v2.DeleteKeyRequest\x1a\x1d.google.longrunning.Operation\"V\x82\xd3\xe4\x93\x02**(/v2/{name=projects/*/locations/*/keys/*}\xda\x41\x04name\xca\x41\x1c\n\x03Key\x12\x15google.protobuf.Empty\x12\xb4\x01\n\x0bUndeleteKey\x12).google.api.apikeys.v2.UndeleteKeyRequest\x1a\x1d.google.longrunning.Operation\"[\x82\xd3\xe4\x93\x02\x36\"1/v2/{name=projects/*/locations/*/keys/*}:undelete:\x01*\xca\x41\x1c\n\x03Key\x12\x15google.protobuf.Empty\x12z\n\tLookupKey\x12\'.google.api.apikeys.v2.LookupKeyRequest\x1a(.google.api.apikeys.v2.LookupKeyResponse\"\x1a\x82\xd3\xe4\x93\x02\x14\x12\x12/v2/keys:lookupKey\x1a\x83\x01\xca\x41\x16\x61pikeys.googleapis.com\xd2\x41ghttps://www.googleapis.com/auth/cloud-platform,https://www.googleapis.com/auth/cloud-platform.read-onlyB\xb3\x01\n\x19\x63om.google.api.apikeys.v2B\x0c\x41piKeysProtoP\x01Z5cloud.google.com/go/apikeys/apiv2/apikeyspb;apikeyspb\xaa\x02\x17Google.Cloud.ApiKeys.V2\xca\x02\x17Google\\Cloud\\ApiKeys\\V2\xea\x02\x1aGoogle::Cloud::ApiKeys::V2b\x06proto3"
|
17
|
+
|
18
|
+
pool = Google::Protobuf::DescriptorPool.generated_pool
|
19
|
+
|
20
|
+
begin
|
21
|
+
pool.add_serialized_file(descriptor_data)
|
22
|
+
rescue TypeError => e
|
23
|
+
# Compatibility code: will be removed in the next major version.
|
24
|
+
require 'google/protobuf/descriptor_pb'
|
25
|
+
parsed = Google::Protobuf::FileDescriptorProto.decode(descriptor_data)
|
26
|
+
parsed.clear_dependency
|
27
|
+
serialized = parsed.class.encode(parsed)
|
28
|
+
file = pool.add_serialized_file(serialized)
|
29
|
+
warn "Warning: Protobuf detected an import path issue while loading generated file #{__FILE__}"
|
30
|
+
imports = [
|
31
|
+
["google.api.apikeys.v2.Key", "google/api/apikeys/v2/resources.proto"],
|
32
|
+
["google.protobuf.FieldMask", "google/protobuf/field_mask.proto"],
|
33
|
+
]
|
34
|
+
imports.each do |type_name, expected_filename|
|
35
|
+
import_file = pool.lookup(type_name).file_descriptor
|
36
|
+
if import_file.name != expected_filename
|
37
|
+
warn "- #{file.name} imports #{expected_filename}, but that import was loaded as #{import_file.name}"
|
57
38
|
end
|
58
39
|
end
|
40
|
+
warn "Each proto file must use a consistent fully-qualified name."
|
41
|
+
warn "This will become an error in the next major version."
|
59
42
|
end
|
60
43
|
|
61
44
|
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/apikeys/v2/resources.proto
|
3
4
|
|
@@ -7,50 +8,32 @@ require 'google/api/field_behavior_pb'
|
|
7
8
|
require 'google/api/resource_pb'
|
8
9
|
require 'google/protobuf/timestamp_pb'
|
9
10
|
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
end
|
33
|
-
add_message "google.api.apikeys.v2.BrowserKeyRestrictions" do
|
34
|
-
repeated :allowed_referrers, :string, 1
|
35
|
-
end
|
36
|
-
add_message "google.api.apikeys.v2.ServerKeyRestrictions" do
|
37
|
-
repeated :allowed_ips, :string, 1
|
38
|
-
end
|
39
|
-
add_message "google.api.apikeys.v2.AndroidKeyRestrictions" do
|
40
|
-
repeated :allowed_applications, :message, 1, "google.api.apikeys.v2.AndroidApplication"
|
41
|
-
end
|
42
|
-
add_message "google.api.apikeys.v2.AndroidApplication" do
|
43
|
-
optional :sha1_fingerprint, :string, 1
|
44
|
-
optional :package_name, :string, 2
|
45
|
-
end
|
46
|
-
add_message "google.api.apikeys.v2.IosKeyRestrictions" do
|
47
|
-
repeated :allowed_bundle_ids, :string, 1
|
48
|
-
end
|
49
|
-
add_message "google.api.apikeys.v2.ApiTarget" do
|
50
|
-
optional :service, :string, 1
|
51
|
-
repeated :methods, :string, 2
|
11
|
+
|
12
|
+
descriptor_data = "\n%google/api/apikeys/v2/resources.proto\x12\x15google.api.apikeys.v2\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\xa2\x04\n\x03Key\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12\x10\n\x03uid\x18\x05 \x01(\tB\x03\xe0\x41\x03\x12\x14\n\x0c\x64isplay_name\x18\x02 \x01(\t\x12\x17\n\nkey_string\x18\x03 \x01(\tB\x03\xe0\x41\x03\x12\x34\n\x0b\x63reate_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\x06 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0b\x64\x65lete_time\x18\x07 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12@\n\x0b\x61nnotations\x18\x08 \x03(\x0b\x32+.google.api.apikeys.v2.Key.AnnotationsEntry\x12\x39\n\x0crestrictions\x18\t \x01(\x0b\x32#.google.api.apikeys.v2.Restrictions\x12\x11\n\x04\x65tag\x18\x0b \x01(\tB\x03\xe0\x41\x03\x1a\x32\n\x10\x41nnotationsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01:a\xea\x41^\n\x1a\x61pikeys.googleapis.com/Key\x12\x32projects/{project}/locations/{location}/keys/{key}*\x04keys2\x03keyR\x01\x01\"\x9e\x03\n\x0cRestrictions\x12Q\n\x18\x62rowser_key_restrictions\x18\x01 \x01(\x0b\x32-.google.api.apikeys.v2.BrowserKeyRestrictionsH\x00\x12O\n\x17server_key_restrictions\x18\x02 \x01(\x0b\x32,.google.api.apikeys.v2.ServerKeyRestrictionsH\x00\x12Q\n\x18\x61ndroid_key_restrictions\x18\x03 \x01(\x0b\x32-.google.api.apikeys.v2.AndroidKeyRestrictionsH\x00\x12I\n\x14ios_key_restrictions\x18\x04 \x01(\x0b\x32).google.api.apikeys.v2.IosKeyRestrictionsH\x00\x12\x35\n\x0b\x61pi_targets\x18\x05 \x03(\x0b\x32 .google.api.apikeys.v2.ApiTargetB\x15\n\x13\x63lient_restrictions\"3\n\x16\x42rowserKeyRestrictions\x12\x19\n\x11\x61llowed_referrers\x18\x01 \x03(\t\",\n\x15ServerKeyRestrictions\x12\x13\n\x0b\x61llowed_ips\x18\x01 \x03(\t\"a\n\x16\x41ndroidKeyRestrictions\x12G\n\x14\x61llowed_applications\x18\x01 \x03(\x0b\x32).google.api.apikeys.v2.AndroidApplication\"D\n\x12\x41ndroidApplication\x12\x18\n\x10sha1_fingerprint\x18\x01 \x01(\t\x12\x14\n\x0cpackage_name\x18\x02 \x01(\t\"0\n\x12IosKeyRestrictions\x12\x1a\n\x12\x61llowed_bundle_ids\x18\x01 \x03(\t\"2\n\tApiTarget\x12\x0f\n\x07service\x18\x01 \x01(\t\x12\x14\n\x07methods\x18\x02 \x03(\tB\x03\xe0\x41\x01\x42\xb5\x01\n\x19\x63om.google.api.apikeys.v2B\x0eResourcesProtoP\x01Z5cloud.google.com/go/apikeys/apiv2/apikeyspb;apikeyspb\xaa\x02\x17Google.Cloud.ApiKeys.V2\xca\x02\x17Google\\Cloud\\ApiKeys\\V2\xea\x02\x1aGoogle::Cloud::ApiKeys::V2b\x06proto3"
|
13
|
+
|
14
|
+
pool = Google::Protobuf::DescriptorPool.generated_pool
|
15
|
+
|
16
|
+
begin
|
17
|
+
pool.add_serialized_file(descriptor_data)
|
18
|
+
rescue TypeError => e
|
19
|
+
# Compatibility code: will be removed in the next major version.
|
20
|
+
require 'google/protobuf/descriptor_pb'
|
21
|
+
parsed = Google::Protobuf::FileDescriptorProto.decode(descriptor_data)
|
22
|
+
parsed.clear_dependency
|
23
|
+
serialized = parsed.class.encode(parsed)
|
24
|
+
file = pool.add_serialized_file(serialized)
|
25
|
+
warn "Warning: Protobuf detected an import path issue while loading generated file #{__FILE__}"
|
26
|
+
imports = [
|
27
|
+
["google.protobuf.Timestamp", "google/protobuf/timestamp.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}"
|
52
33
|
end
|
53
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."
|
54
37
|
end
|
55
38
|
|
56
39
|
module Google
|
@@ -125,7 +125,7 @@ module Google
|
|
125
125
|
credentials = @config.credentials
|
126
126
|
# Use self-signed JWT if the endpoint is unchanged from default,
|
127
127
|
# but only if the default endpoint does not have a region prefix.
|
128
|
-
enable_self_signed_jwt = @config.endpoint ==
|
128
|
+
enable_self_signed_jwt = @config.endpoint == Configuration::DEFAULT_ENDPOINT &&
|
129
129
|
!@config.endpoint.split(".").first.include?("-")
|
130
130
|
credentials ||= Credentials.default scope: @config.scope,
|
131
131
|
enable_self_signed_jwt: enable_self_signed_jwt
|
@@ -217,14 +217,14 @@ module Google
|
|
217
217
|
# # Call the create_key method.
|
218
218
|
# result = client.create_key request
|
219
219
|
#
|
220
|
-
# # The returned object is of type Gapic::Operation. You can use
|
221
|
-
# #
|
222
|
-
# #
|
220
|
+
# # The returned object is of type Gapic::Operation. You can use it to
|
221
|
+
# # check the status of an operation, cancel it, or wait for results.
|
222
|
+
# # Here is how to wait for a response.
|
223
223
|
# result.wait_until_done! timeout: 60
|
224
224
|
# if result.response?
|
225
225
|
# p result.response
|
226
226
|
# else
|
227
|
-
# puts "
|
227
|
+
# puts "No response received."
|
228
228
|
# end
|
229
229
|
#
|
230
230
|
def create_key request, options = nil
|
@@ -321,13 +321,11 @@ module Google
|
|
321
321
|
# # Call the list_keys method.
|
322
322
|
# result = client.list_keys request
|
323
323
|
#
|
324
|
-
# # The returned object is of type Gapic::PagedEnumerable. You can
|
325
|
-
# #
|
326
|
-
#
|
327
|
-
# # methods are also available for managing paging directly.
|
328
|
-
# result.each do |response|
|
324
|
+
# # The returned object is of type Gapic::PagedEnumerable. You can iterate
|
325
|
+
# # over elements, and API calls will be issued to fetch pages as needed.
|
326
|
+
# result.each do |item|
|
329
327
|
# # Each element is of type ::Google::Cloud::ApiKeys::V2::Key.
|
330
|
-
# p
|
328
|
+
# p item
|
331
329
|
# end
|
332
330
|
#
|
333
331
|
def list_keys request, options = nil
|
@@ -604,14 +602,14 @@ module Google
|
|
604
602
|
# # Call the update_key method.
|
605
603
|
# result = client.update_key request
|
606
604
|
#
|
607
|
-
# # The returned object is of type Gapic::Operation. You can use
|
608
|
-
# #
|
609
|
-
# #
|
605
|
+
# # The returned object is of type Gapic::Operation. You can use it to
|
606
|
+
# # check the status of an operation, cancel it, or wait for results.
|
607
|
+
# # Here is how to wait for a response.
|
610
608
|
# result.wait_until_done! timeout: 60
|
611
609
|
# if result.response?
|
612
610
|
# p result.response
|
613
611
|
# else
|
614
|
-
# puts "
|
612
|
+
# puts "No response received."
|
615
613
|
# end
|
616
614
|
#
|
617
615
|
def update_key request, options = nil
|
@@ -704,14 +702,14 @@ module Google
|
|
704
702
|
# # Call the delete_key method.
|
705
703
|
# result = client.delete_key request
|
706
704
|
#
|
707
|
-
# # The returned object is of type Gapic::Operation. You can use
|
708
|
-
# #
|
709
|
-
# #
|
705
|
+
# # The returned object is of type Gapic::Operation. You can use it to
|
706
|
+
# # check the status of an operation, cancel it, or wait for results.
|
707
|
+
# # Here is how to wait for a response.
|
710
708
|
# result.wait_until_done! timeout: 60
|
711
709
|
# if result.response?
|
712
710
|
# p result.response
|
713
711
|
# else
|
714
|
-
# puts "
|
712
|
+
# puts "No response received."
|
715
713
|
# end
|
716
714
|
#
|
717
715
|
def delete_key request, options = nil
|
@@ -800,14 +798,14 @@ module Google
|
|
800
798
|
# # Call the undelete_key method.
|
801
799
|
# result = client.undelete_key request
|
802
800
|
#
|
803
|
-
# # The returned object is of type Gapic::Operation. You can use
|
804
|
-
# #
|
805
|
-
# #
|
801
|
+
# # The returned object is of type Gapic::Operation. You can use it to
|
802
|
+
# # check the status of an operation, cancel it, or wait for results.
|
803
|
+
# # Here is how to wait for a response.
|
806
804
|
# result.wait_until_done! timeout: 60
|
807
805
|
# if result.response?
|
808
806
|
# p result.response
|
809
807
|
# else
|
810
|
-
# puts "
|
808
|
+
# puts "No response received."
|
811
809
|
# end
|
812
810
|
#
|
813
811
|
def undelete_key request, options = nil
|
@@ -971,9 +969,9 @@ module Google
|
|
971
969
|
# * (`String`) The path to a service account key file in JSON format
|
972
970
|
# * (`Hash`) A service account key as a Hash
|
973
971
|
# * (`Google::Auth::Credentials`) A googleauth credentials object
|
974
|
-
# (see the [googleauth docs](https://
|
972
|
+
# (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials))
|
975
973
|
# * (`Signet::OAuth2::Client`) A signet oauth2 client object
|
976
|
-
# (see the [signet docs](https://
|
974
|
+
# (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client))
|
977
975
|
# * (`GRPC::Core::Channel`) a gRPC channel with included credentials
|
978
976
|
# * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object
|
979
977
|
# * (`nil`) indicating no credentials
|
@@ -1015,7 +1013,9 @@ module Google
|
|
1015
1013
|
class Configuration
|
1016
1014
|
extend ::Gapic::Config
|
1017
1015
|
|
1018
|
-
|
1016
|
+
DEFAULT_ENDPOINT = "apikeys.googleapis.com"
|
1017
|
+
|
1018
|
+
config_attr :endpoint, DEFAULT_ENDPOINT, ::String
|
1019
1019
|
config_attr :credentials, nil do |value|
|
1020
1020
|
allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Signet::OAuth2::Client, nil]
|
1021
1021
|
allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC
|
@@ -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
|
@@ -253,14 +251,14 @@ module Google
|
|
253
251
|
# # Call the get_operation method.
|
254
252
|
# result = client.get_operation request
|
255
253
|
#
|
256
|
-
# # The returned object is of type Gapic::Operation. You can use
|
257
|
-
# #
|
258
|
-
# #
|
254
|
+
# # The returned object is of type Gapic::Operation. You can use it to
|
255
|
+
# # check the status of an operation, cancel it, or wait for results.
|
256
|
+
# # Here is how to wait for a response.
|
259
257
|
# result.wait_until_done! timeout: 60
|
260
258
|
# if result.response?
|
261
259
|
# p result.response
|
262
260
|
# else
|
263
|
-
# puts "
|
261
|
+
# puts "No response received."
|
264
262
|
# end
|
265
263
|
#
|
266
264
|
def get_operation request, options = nil
|
@@ -540,14 +538,14 @@ module Google
|
|
540
538
|
# # Call the wait_operation method.
|
541
539
|
# result = client.wait_operation request
|
542
540
|
#
|
543
|
-
# # The returned object is of type Gapic::Operation. You can use
|
544
|
-
# #
|
545
|
-
# #
|
541
|
+
# # The returned object is of type Gapic::Operation. You can use it to
|
542
|
+
# # check the status of an operation, cancel it, or wait for results.
|
543
|
+
# # Here is how to wait for a response.
|
546
544
|
# result.wait_until_done! timeout: 60
|
547
545
|
# if result.response?
|
548
546
|
# p result.response
|
549
547
|
# else
|
550
|
-
# puts "
|
548
|
+
# puts "No response received."
|
551
549
|
# end
|
552
550
|
#
|
553
551
|
def wait_operation request, options = nil
|
@@ -622,9 +620,9 @@ module Google
|
|
622
620
|
# * (`String`) The path to a service account key file in JSON format
|
623
621
|
# * (`Hash`) A service account key as a Hash
|
624
622
|
# * (`Google::Auth::Credentials`) A googleauth credentials object
|
625
|
-
# (see the [googleauth docs](https://
|
623
|
+
# (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials))
|
626
624
|
# * (`Signet::OAuth2::Client`) A signet oauth2 client object
|
627
|
-
# (see the [signet docs](https://
|
625
|
+
# (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client))
|
628
626
|
# * (`GRPC::Core::Channel`) a gRPC channel with included credentials
|
629
627
|
# * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object
|
630
628
|
# * (`nil`) indicating no credentials
|
@@ -666,7 +664,9 @@ module Google
|
|
666
664
|
class Configuration
|
667
665
|
extend ::Gapic::Config
|
668
666
|
|
669
|
-
|
667
|
+
DEFAULT_ENDPOINT = "apikeys.googleapis.com"
|
668
|
+
|
669
|
+
config_attr :endpoint, DEFAULT_ENDPOINT, ::String
|
670
670
|
config_attr :credentials, nil do |value|
|
671
671
|
allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Signet::OAuth2::Client, nil]
|
672
672
|
allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC
|