google-cloud-api_keys-v2 0.1.0 → 0.3.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 6b843370e1934e600ca5527e0319833bb5ca5611666c7857dfbf62efecf89fe1
4
- data.tar.gz: f857479d7b7b813e65bc8d50a3b507c165255f5b4d824eb67186824305c48eb2
3
+ metadata.gz: 4784d656d0d9c374028ec1834dabe8dfba4dc431acb2d804fd68f2ec115ee3f6
4
+ data.tar.gz: e4a92125c89eb3bcda57538b1e28e6f7c6f2a2040d0ba160031a0e273536a464
5
5
  SHA512:
6
- metadata.gz: 8d6d01a435b30ff239d0ceff9789e309abed00fa706cb936eabe4456497cdd0bd71cf078bbd6083d9b06901a118650fab0af5d2f92b6ead31178d789d54ca845
7
- data.tar.gz: e596a17f021ed49b47891eea55dd9edb53be0a64de1e4b9904c59af3e0f0cd12478c749d1df26ba95c13d384b82bdd2f4d4c8c88b68c8fc7dcd7cebdde76fb89
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
- API Client library for the API Keys V2 API
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/stdlib/libdoc/logger/rdoc/Logger.html) as shown below,
50
- or a [`Google::Cloud::Logging::Logger`](https://googleapis.dev/ruby/google-cloud-logging/latest)
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
- Google::Protobuf::DescriptorPool.generated_pool.build do
15
- add_file("google/api/apikeys/v2/apikeys.proto", :syntax => :proto3) do
16
- add_message "google.api.apikeys.v2.CreateKeyRequest" do
17
- optional :parent, :string, 1
18
- optional :key, :message, 2, "google.api.apikeys.v2.Key"
19
- optional :key_id, :string, 3
20
- end
21
- add_message "google.api.apikeys.v2.ListKeysRequest" do
22
- optional :parent, :string, 1
23
- optional :page_size, :int32, 2
24
- optional :page_token, :string, 3
25
- optional :show_deleted, :bool, 6
26
- end
27
- add_message "google.api.apikeys.v2.ListKeysResponse" do
28
- repeated :keys, :message, 1, "google.api.apikeys.v2.Key"
29
- optional :next_page_token, :string, 2
30
- end
31
- add_message "google.api.apikeys.v2.GetKeyRequest" do
32
- optional :name, :string, 1
33
- end
34
- add_message "google.api.apikeys.v2.GetKeyStringRequest" do
35
- optional :name, :string, 1
36
- end
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
- Google::Protobuf::DescriptorPool.generated_pool.build do
11
- add_file("google/api/apikeys/v2/resources.proto", :syntax => :proto3) do
12
- add_message "google.api.apikeys.v2.Key" do
13
- optional :name, :string, 1
14
- optional :uid, :string, 5
15
- optional :display_name, :string, 2
16
- optional :key_string, :string, 3
17
- optional :create_time, :message, 4, "google.protobuf.Timestamp"
18
- optional :update_time, :message, 6, "google.protobuf.Timestamp"
19
- optional :delete_time, :message, 7, "google.protobuf.Timestamp"
20
- map :annotations, :string, :string, 8
21
- optional :restrictions, :message, 9, "google.api.apikeys.v2.Restrictions"
22
- optional :etag, :string, 11
23
- end
24
- add_message "google.api.apikeys.v2.Restrictions" do
25
- repeated :api_targets, :message, 5, "google.api.apikeys.v2.ApiTarget"
26
- oneof :client_restrictions do
27
- optional :browser_key_restrictions, :message, 1, "google.api.apikeys.v2.BrowserKeyRestrictions"
28
- optional :server_key_restrictions, :message, 2, "google.api.apikeys.v2.ServerKeyRestrictions"
29
- optional :android_key_restrictions, :message, 3, "google.api.apikeys.v2.AndroidKeyRestrictions"
30
- optional :ios_key_restrictions, :message, 4, "google.api.apikeys.v2.IosKeyRestrictions"
31
- end
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 == Client.configure.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 this
221
- # # object to check the status of an operation, cancel it, or wait
222
- # # for results. Here is how to block until completion:
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 "Error!"
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
- # # iterate over all elements by calling #each, and the enumerable
326
- # # will lazily make API calls to fetch subsequent pages. Other
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 response
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 this
608
- # # object to check the status of an operation, cancel it, or wait
609
- # # for results. Here is how to block until completion:
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 "Error!"
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 this
708
- # # object to check the status of an operation, cancel it, or wait
709
- # # for results. Here is how to block until completion:
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 "Error!"
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 this
804
- # # object to check the status of an operation, cancel it, or wait
805
- # # for results. Here is how to block until completion:
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 "Error!"
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://googleapis.dev/ruby/googleauth/latest/index.html))
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://googleapis.dev/ruby/signet/latest/Signet/OAuth2/Client.html))
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
- config_attr :endpoint, "apikeys.googleapis.com", ::String
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
- # # iterate over all elements by calling #each, and the enumerable
163
- # # will lazily make API calls to fetch subsequent pages. Other
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 response
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 this
257
- # # object to check the status of an operation, cancel it, or wait
258
- # # for results. Here is how to block until completion:
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 "Error!"
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 this
544
- # # object to check the status of an operation, cancel it, or wait
545
- # # for results. Here is how to block until completion:
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 "Error!"
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://googleapis.dev/ruby/googleauth/latest/index.html))
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://googleapis.dev/ruby/signet/latest/Signet/OAuth2/Client.html))
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
- config_attr :endpoint, "apikeys.googleapis.com", ::String
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