google-cloud-spanner-admin-instance-v1 1.3.0 → 1.5.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.
@@ -126,14 +126,6 @@ module Google
126
126
  # Lists operations that match the specified filter in the request. If the
127
127
  # server doesn't support this method, it returns `UNIMPLEMENTED`.
128
128
  #
129
- # NOTE: the `name` binding allows API services to override the binding
130
- # to use different resource name schemes, such as `users/*/operations`. To
131
- # override the binding, API services can add a binding such as
132
- # `"/v1/{name=users/*}/operations"` to their service configuration.
133
- # For backwards compatibility, the default name includes the operations
134
- # collection id, however overriding users must ensure the name binding
135
- # is the parent resource, without the operations collection id.
136
- #
137
129
  # @overload list_operations(request, options = nil)
138
130
  # Pass arguments to `list_operations` via a request object, either of type
139
131
  # {::Google::Longrunning::ListOperationsRequest} or an equivalent Hash.
@@ -223,7 +215,7 @@ module Google
223
215
  wrap_lro_operation = ->(op_response) { ::Gapic::Operation.new op_response, @operations_client }
224
216
  response = ::Gapic::PagedEnumerable.new @operations_stub, :list_operations, request, response, operation, options, format_resource: wrap_lro_operation
225
217
  yield response, operation if block_given?
226
- return response
218
+ throw :response, response
227
219
  end
228
220
  rescue ::GRPC::BadStatus => e
229
221
  raise ::Google::Cloud::Error.from_error(e)
@@ -319,7 +311,7 @@ module Google
319
311
  @operations_stub.call_rpc :get_operation, request, options: options do |response, operation|
320
312
  response = ::Gapic::Operation.new response, @operations_client, options: options
321
313
  yield response, operation if block_given?
322
- return response
314
+ throw :response, response
323
315
  end
324
316
  rescue ::GRPC::BadStatus => e
325
317
  raise ::Google::Cloud::Error.from_error(e)
@@ -408,7 +400,6 @@ module Google
408
400
 
409
401
  @operations_stub.call_rpc :delete_operation, request, options: options do |response, operation|
410
402
  yield response, operation if block_given?
411
- return response
412
403
  end
413
404
  rescue ::GRPC::BadStatus => e
414
405
  raise ::Google::Cloud::Error.from_error(e)
@@ -423,8 +414,9 @@ module Google
423
414
  # other methods to check whether the cancellation succeeded or whether the
424
415
  # operation completed despite cancellation. On successful cancellation,
425
416
  # the operation is not deleted; instead, it becomes an operation with
426
- # an {::Google::Longrunning::Operation#error Operation.error} value with a {::Google::Rpc::Status#code google.rpc.Status.code} of 1,
427
- # corresponding to `Code.CANCELLED`.
417
+ # an {::Google::Longrunning::Operation#error Operation.error} value with a
418
+ # {::Google::Rpc::Status#code google.rpc.Status.code} of `1`, corresponding to
419
+ # `Code.CANCELLED`.
428
420
  #
429
421
  # @overload cancel_operation(request, options = nil)
430
422
  # Pass arguments to `cancel_operation` via a request object, either of type
@@ -503,7 +495,6 @@ module Google
503
495
 
504
496
  @operations_stub.call_rpc :cancel_operation, request, options: options do |response, operation|
505
497
  yield response, operation if block_given?
506
- return response
507
498
  end
508
499
  rescue ::GRPC::BadStatus => e
509
500
  raise ::Google::Cloud::Error.from_error(e)
@@ -601,7 +592,7 @@ module Google
601
592
  @operations_stub.call_rpc :wait_operation, request, options: options do |response, operation|
602
593
  response = ::Gapic::Operation.new response, @operations_client, options: options
603
594
  yield response, operation if block_given?
604
- return response
595
+ throw :response, response
605
596
  end
606
597
  rescue ::GRPC::BadStatus => e
607
598
  raise ::Google::Cloud::Error.from_error(e)
@@ -690,6 +681,11 @@ module Google
690
681
  # default endpoint URL. The default value of nil uses the environment
691
682
  # universe (usually the default "googleapis.com" universe).
692
683
  # @return [::String,nil]
684
+ # @!attribute [rw] logger
685
+ # A custom logger to use for request/response debug logging, or the value
686
+ # `:default` (the default) to construct a default logger, or `nil` to
687
+ # explicitly disable logging.
688
+ # @return [::Logger,:default,nil]
693
689
  #
694
690
  class Configuration
695
691
  extend ::Gapic::Config
@@ -714,6 +710,7 @@ module Google
714
710
  config_attr :retry_policy, nil, ::Hash, ::Proc, nil
715
711
  config_attr :quota_project, nil, ::String, nil
716
712
  config_attr :universe_domain, nil, ::String, nil
713
+ config_attr :logger, :default, ::Logger, nil, :default
717
714
 
718
715
  # @private
719
716
  def initialize parent_config = nil
@@ -217,8 +217,19 @@ module Google
217
217
  endpoint: @config.endpoint,
218
218
  endpoint_template: DEFAULT_ENDPOINT_TEMPLATE,
219
219
  universe_domain: @config.universe_domain,
220
- credentials: credentials
220
+ credentials: credentials,
221
+ logger: @config.logger
221
222
  )
223
+
224
+ @instance_admin_stub.logger(stub: true)&.info do |entry|
225
+ entry.set_system_name
226
+ entry.set_service
227
+ entry.message = "Created client for #{entry.service}"
228
+ entry.set_credentials_fields credentials
229
+ entry.set "customEndpoint", @config.endpoint if @config.endpoint
230
+ entry.set "defaultTimeout", @config.timeout if @config.timeout
231
+ entry.set "quotaProject", @quota_project_id if @quota_project_id
232
+ end
222
233
  end
223
234
 
224
235
  ##
@@ -228,11 +239,23 @@ module Google
228
239
  #
229
240
  attr_reader :operations_client
230
241
 
242
+ ##
243
+ # The logger used for request/response debug logging.
244
+ #
245
+ # @return [Logger]
246
+ #
247
+ def logger
248
+ @instance_admin_stub.logger
249
+ end
250
+
231
251
  # Service calls
232
252
 
233
253
  ##
234
254
  # Lists the supported instance configurations for a given project.
235
255
  #
256
+ # Returns both Google-managed configurations and user-managed
257
+ # configurations.
258
+ #
236
259
  # @overload list_instance_configs(request, options = nil)
237
260
  # Pass arguments to `list_instance_configs` via a request object, either of type
238
261
  # {::Google::Cloud::Spanner::Admin::Instance::V1::ListInstanceConfigsRequest} or an equivalent Hash.
@@ -318,7 +341,7 @@ module Google
318
341
  @instance_admin_stub.list_instance_configs request, options do |result, operation|
319
342
  result = ::Gapic::Rest::PagedEnumerable.new @instance_admin_stub, :list_instance_configs, "instance_configs", request, result, options
320
343
  yield result, operation if block_given?
321
- return result
344
+ throw :response, result
322
345
  end
323
346
  rescue ::Gapic::Rest::Error => e
324
347
  raise ::Google::Cloud::Error.from_error(e)
@@ -398,7 +421,6 @@ module Google
398
421
 
399
422
  @instance_admin_stub.get_instance_config request, options do |result, operation|
400
423
  yield result, operation if block_given?
401
- return result
402
424
  end
403
425
  rescue ::Gapic::Rest::Error => e
404
426
  raise ::Google::Cloud::Error.from_error(e)
@@ -406,7 +428,7 @@ module Google
406
428
 
407
429
  ##
408
430
  # Creates an instance configuration and begins preparing it to be used. The
409
- # returned {::Google::Longrunning::Operation long-running operation}
431
+ # returned long-running operation
410
432
  # can be used to track the progress of preparing the new
411
433
  # instance configuration. The instance configuration name is assigned by the
412
434
  # caller. If the named instance configuration already exists,
@@ -433,13 +455,13 @@ module Google
433
455
  # {::Google::Cloud::Spanner::Admin::Instance::V1::InstanceConfig#reconciling reconciling}
434
456
  # field becomes false. Its state becomes `READY`.
435
457
  #
436
- # The returned {::Google::Longrunning::Operation long-running operation} will
458
+ # The returned long-running operation will
437
459
  # have a name of the format
438
460
  # `<instance_config_name>/operations/<operation_id>` and can be used to track
439
461
  # creation of the instance configuration. The
440
- # {::Google::Longrunning::Operation#metadata metadata} field type is
462
+ # metadata field type is
441
463
  # {::Google::Cloud::Spanner::Admin::Instance::V1::CreateInstanceConfigMetadata CreateInstanceConfigMetadata}.
442
- # The {::Google::Longrunning::Operation#response response} field type is
464
+ # The response field type is
443
465
  # {::Google::Cloud::Spanner::Admin::Instance::V1::InstanceConfig InstanceConfig}, if
444
466
  # successful.
445
467
  #
@@ -471,10 +493,10 @@ module Google
471
493
  # characters in length. The `custom-` prefix is required to avoid name
472
494
  # conflicts with Google-managed configurations.
473
495
  # @param instance_config [::Google::Cloud::Spanner::Admin::Instance::V1::InstanceConfig, ::Hash]
474
- # Required. The InstanceConfig proto of the configuration to create.
475
- # instance_config.name must be
496
+ # Required. The `InstanceConfig` proto of the configuration to create.
497
+ # `instance_config.name` must be
476
498
  # `<parent>/instanceConfigs/<instance_config_id>`.
477
- # instance_config.base_config must be a Google managed configuration name,
499
+ # `instance_config.base_config` must be a Google-managed configuration name,
478
500
  # e.g. <parent>/instanceConfigs/us-east1, <parent>/instanceConfigs/nam3.
479
501
  # @param validate_only [::Boolean]
480
502
  # An option to validate, but not actually execute, a request,
@@ -540,7 +562,7 @@ module Google
540
562
  @instance_admin_stub.create_instance_config request, options do |result, operation|
541
563
  result = ::Gapic::Operation.new result, @operations_client, options: options
542
564
  yield result, operation if block_given?
543
- return result
565
+ throw :response, result
544
566
  end
545
567
  rescue ::Gapic::Rest::Error => e
546
568
  raise ::Google::Cloud::Error.from_error(e)
@@ -548,7 +570,7 @@ module Google
548
570
 
549
571
  ##
550
572
  # Updates an instance configuration. The returned
551
- # {::Google::Longrunning::Operation long-running operation} can be used to track
573
+ # long-running operation can be used to track
552
574
  # the progress of updating the instance. If the named instance configuration
553
575
  # does not exist, returns `NOT_FOUND`.
554
576
  #
@@ -579,13 +601,13 @@ module Google
579
601
  # {::Google::Cloud::Spanner::Admin::Instance::V1::InstanceConfig#reconciling reconciling}
580
602
  # field becomes false.
581
603
  #
582
- # The returned {::Google::Longrunning::Operation long-running operation} will
604
+ # The returned long-running operation will
583
605
  # have a name of the format
584
606
  # `<instance_config_name>/operations/<operation_id>` and can be used to track
585
607
  # the instance configuration modification. The
586
- # {::Google::Longrunning::Operation#metadata metadata} field type is
608
+ # metadata field type is
587
609
  # {::Google::Cloud::Spanner::Admin::Instance::V1::UpdateInstanceConfigMetadata UpdateInstanceConfigMetadata}.
588
- # The {::Google::Longrunning::Operation#response response} field type is
610
+ # The response field type is
589
611
  # {::Google::Cloud::Spanner::Admin::Instance::V1::InstanceConfig InstanceConfig}, if
590
612
  # successful.
591
613
  #
@@ -686,7 +708,7 @@ module Google
686
708
  @instance_admin_stub.update_instance_config request, options do |result, operation|
687
709
  result = ::Gapic::Operation.new result, @operations_client, options: options
688
710
  yield result, operation if block_given?
689
- return result
711
+ throw :response, result
690
712
  end
691
713
  rescue ::Gapic::Rest::Error => e
692
714
  raise ::Google::Cloud::Error.from_error(e)
@@ -785,19 +807,18 @@ module Google
785
807
 
786
808
  @instance_admin_stub.delete_instance_config request, options do |result, operation|
787
809
  yield result, operation if block_given?
788
- return result
789
810
  end
790
811
  rescue ::Gapic::Rest::Error => e
791
812
  raise ::Google::Cloud::Error.from_error(e)
792
813
  end
793
814
 
794
815
  ##
795
- # Lists the user-managed instance configuration [long-running
796
- # operations][google.longrunning.Operation] in the given project. An instance
816
+ # Lists the user-managed instance configuration long-running
817
+ # operations in the given project. An instance
797
818
  # configuration operation has a name of the form
798
819
  # `projects/<project>/instanceConfigs/<instance_config>/operations/<operation>`.
799
820
  # The long-running operation
800
- # {::Google::Longrunning::Operation#metadata metadata} field type
821
+ # metadata field type
801
822
  # `metadata.type_url` describes the type of the metadata. Operations returned
802
823
  # include those that have completed/failed/canceled within the last 7 days,
803
824
  # and pending operations. Operations returned are ordered by
@@ -831,8 +852,7 @@ module Google
831
852
  # must be one of: `<`, `>`, `<=`, `>=`, `!=`, `=`, or `:`.
832
853
  # Colon `:` is the contains operator. Filter rules are not case sensitive.
833
854
  #
834
- # The following fields in the {::Google::Longrunning::Operation Operation}
835
- # are eligible for filtering:
855
+ # The following fields in the Operation are eligible for filtering:
836
856
  #
837
857
  # * `name` - The name of the long-running operation
838
858
  # * `done` - False if the operation is in progress, else true.
@@ -933,7 +953,7 @@ module Google
933
953
  @instance_admin_stub.list_instance_config_operations request, options do |result, operation|
934
954
  result = ::Gapic::Rest::PagedEnumerable.new @instance_admin_stub, :list_instance_config_operations, "operations", request, result, options
935
955
  yield result, operation if block_given?
936
- return result
956
+ throw :response, result
937
957
  end
938
958
  rescue ::Gapic::Rest::Error => e
939
959
  raise ::Google::Cloud::Error.from_error(e)
@@ -1052,7 +1072,6 @@ module Google
1052
1072
 
1053
1073
  @instance_admin_stub.list_instances request, options do |result, operation|
1054
1074
  yield result, operation if block_given?
1055
- return result
1056
1075
  end
1057
1076
  rescue ::Gapic::Rest::Error => e
1058
1077
  raise ::Google::Cloud::Error.from_error(e)
@@ -1078,7 +1097,9 @@ module Google
1078
1097
  #
1079
1098
  # @param parent [::String]
1080
1099
  # Required. The instance whose instance partitions should be listed. Values
1081
- # are of the form `projects/<project>/instances/<instance>`.
1100
+ # are of the form `projects/<project>/instances/<instance>`. Use `{instance}
1101
+ # = '-'` to list instance partitions for all Instances in a project, e.g.,
1102
+ # `projects/myproject/instances/-`.
1082
1103
  # @param page_size [::Integer]
1083
1104
  # Number of instance partitions to be returned in the response. If 0 or less,
1084
1105
  # defaults to the server's maximum allowed page size.
@@ -1151,7 +1172,6 @@ module Google
1151
1172
 
1152
1173
  @instance_admin_stub.list_instance_partitions request, options do |result, operation|
1153
1174
  yield result, operation if block_given?
1154
- return result
1155
1175
  end
1156
1176
  rescue ::Gapic::Rest::Error => e
1157
1177
  raise ::Google::Cloud::Error.from_error(e)
@@ -1236,7 +1256,6 @@ module Google
1236
1256
 
1237
1257
  @instance_admin_stub.get_instance request, options do |result, operation|
1238
1258
  yield result, operation if block_given?
1239
- return result
1240
1259
  end
1241
1260
  rescue ::Gapic::Rest::Error => e
1242
1261
  raise ::Google::Cloud::Error.from_error(e)
@@ -1244,7 +1263,7 @@ module Google
1244
1263
 
1245
1264
  ##
1246
1265
  # Creates an instance and begins preparing it to begin serving. The
1247
- # returned {::Google::Longrunning::Operation long-running operation}
1266
+ # returned long-running operation
1248
1267
  # can be used to track the progress of preparing the new
1249
1268
  # instance. The instance name is assigned by the caller. If the
1250
1269
  # named instance already exists, `CreateInstance` returns
@@ -1270,12 +1289,12 @@ module Google
1270
1289
  # * The instance's allocated resource levels are readable via the API.
1271
1290
  # * The instance's state becomes `READY`.
1272
1291
  #
1273
- # The returned {::Google::Longrunning::Operation long-running operation} will
1292
+ # The returned long-running operation will
1274
1293
  # have a name of the format `<instance_name>/operations/<operation_id>` and
1275
1294
  # can be used to track creation of the instance. The
1276
- # {::Google::Longrunning::Operation#metadata metadata} field type is
1295
+ # metadata field type is
1277
1296
  # {::Google::Cloud::Spanner::Admin::Instance::V1::CreateInstanceMetadata CreateInstanceMetadata}.
1278
- # The {::Google::Longrunning::Operation#response response} field type is
1297
+ # The response field type is
1279
1298
  # {::Google::Cloud::Spanner::Admin::Instance::V1::Instance Instance}, if successful.
1280
1299
  #
1281
1300
  # @overload create_instance(request, options = nil)
@@ -1364,7 +1383,7 @@ module Google
1364
1383
  @instance_admin_stub.create_instance request, options do |result, operation|
1365
1384
  result = ::Gapic::Operation.new result, @operations_client, options: options
1366
1385
  yield result, operation if block_given?
1367
- return result
1386
+ throw :response, result
1368
1387
  end
1369
1388
  rescue ::Gapic::Rest::Error => e
1370
1389
  raise ::Google::Cloud::Error.from_error(e)
@@ -1372,8 +1391,7 @@ module Google
1372
1391
 
1373
1392
  ##
1374
1393
  # Updates an instance, and begins allocating or releasing resources
1375
- # as requested. The returned [long-running
1376
- # operation][google.longrunning.Operation] can be used to track the
1394
+ # as requested. The returned long-running operation can be used to track the
1377
1395
  # progress of updating the instance. If the named instance does not
1378
1396
  # exist, returns `NOT_FOUND`.
1379
1397
  #
@@ -1401,12 +1419,12 @@ module Google
1401
1419
  # tables.
1402
1420
  # * The instance's new resource levels are readable via the API.
1403
1421
  #
1404
- # The returned {::Google::Longrunning::Operation long-running operation} will
1422
+ # The returned long-running operation will
1405
1423
  # have a name of the format `<instance_name>/operations/<operation_id>` and
1406
1424
  # can be used to track the instance modification. The
1407
- # {::Google::Longrunning::Operation#metadata metadata} field type is
1425
+ # metadata field type is
1408
1426
  # {::Google::Cloud::Spanner::Admin::Instance::V1::UpdateInstanceMetadata UpdateInstanceMetadata}.
1409
- # The {::Google::Longrunning::Operation#response response} field type is
1427
+ # The response field type is
1410
1428
  # {::Google::Cloud::Spanner::Admin::Instance::V1::Instance Instance}, if successful.
1411
1429
  #
1412
1430
  # Authorization requires `spanner.instances.update` permission on
@@ -1499,7 +1517,7 @@ module Google
1499
1517
  @instance_admin_stub.update_instance request, options do |result, operation|
1500
1518
  result = ::Gapic::Operation.new result, @operations_client, options: options
1501
1519
  yield result, operation if block_given?
1502
- return result
1520
+ throw :response, result
1503
1521
  end
1504
1522
  rescue ::Gapic::Rest::Error => e
1505
1523
  raise ::Google::Cloud::Error.from_error(e)
@@ -1589,7 +1607,6 @@ module Google
1589
1607
 
1590
1608
  @instance_admin_stub.delete_instance request, options do |result, operation|
1591
1609
  yield result, operation if block_given?
1592
- return result
1593
1610
  end
1594
1611
  rescue ::Gapic::Rest::Error => e
1595
1612
  raise ::Google::Cloud::Error.from_error(e)
@@ -1684,7 +1701,6 @@ module Google
1684
1701
 
1685
1702
  @instance_admin_stub.set_iam_policy request, options do |result, operation|
1686
1703
  yield result, operation if block_given?
1687
- return result
1688
1704
  end
1689
1705
  rescue ::Gapic::Rest::Error => e
1690
1706
  raise ::Google::Cloud::Error.from_error(e)
@@ -1771,7 +1787,6 @@ module Google
1771
1787
 
1772
1788
  @instance_admin_stub.get_iam_policy request, options do |result, operation|
1773
1789
  yield result, operation if block_given?
1774
- return result
1775
1790
  end
1776
1791
  rescue ::Gapic::Rest::Error => e
1777
1792
  raise ::Google::Cloud::Error.from_error(e)
@@ -1861,7 +1876,6 @@ module Google
1861
1876
 
1862
1877
  @instance_admin_stub.test_iam_permissions request, options do |result, operation|
1863
1878
  yield result, operation if block_given?
1864
- return result
1865
1879
  end
1866
1880
  rescue ::Gapic::Rest::Error => e
1867
1881
  raise ::Google::Cloud::Error.from_error(e)
@@ -1942,7 +1956,6 @@ module Google
1942
1956
 
1943
1957
  @instance_admin_stub.get_instance_partition request, options do |result, operation|
1944
1958
  yield result, operation if block_given?
1945
- return result
1946
1959
  end
1947
1960
  rescue ::Gapic::Rest::Error => e
1948
1961
  raise ::Google::Cloud::Error.from_error(e)
@@ -1950,7 +1963,7 @@ module Google
1950
1963
 
1951
1964
  ##
1952
1965
  # Creates an instance partition and begins preparing it to be used. The
1953
- # returned {::Google::Longrunning::Operation long-running operation}
1966
+ # returned long-running operation
1954
1967
  # can be used to track the progress of preparing the new instance partition.
1955
1968
  # The instance partition name is assigned by the caller. If the named
1956
1969
  # instance partition already exists, `CreateInstancePartition` returns
@@ -1977,13 +1990,13 @@ module Google
1977
1990
  # API.
1978
1991
  # * The instance partition's state becomes `READY`.
1979
1992
  #
1980
- # The returned {::Google::Longrunning::Operation long-running operation} will
1993
+ # The returned long-running operation will
1981
1994
  # have a name of the format
1982
1995
  # `<instance_partition_name>/operations/<operation_id>` and can be used to
1983
1996
  # track creation of the instance partition. The
1984
- # {::Google::Longrunning::Operation#metadata metadata} field type is
1997
+ # metadata field type is
1985
1998
  # {::Google::Cloud::Spanner::Admin::Instance::V1::CreateInstancePartitionMetadata CreateInstancePartitionMetadata}.
1986
- # The {::Google::Longrunning::Operation#response response} field type is
1999
+ # The response field type is
1987
2000
  # {::Google::Cloud::Spanner::Admin::Instance::V1::InstancePartition InstancePartition}, if
1988
2001
  # successful.
1989
2002
  #
@@ -2075,7 +2088,7 @@ module Google
2075
2088
  @instance_admin_stub.create_instance_partition request, options do |result, operation|
2076
2089
  result = ::Gapic::Operation.new result, @operations_client, options: options
2077
2090
  yield result, operation if block_given?
2078
- return result
2091
+ throw :response, result
2079
2092
  end
2080
2093
  rescue ::Gapic::Rest::Error => e
2081
2094
  raise ::Google::Cloud::Error.from_error(e)
@@ -2167,7 +2180,6 @@ module Google
2167
2180
 
2168
2181
  @instance_admin_stub.delete_instance_partition request, options do |result, operation|
2169
2182
  yield result, operation if block_given?
2170
- return result
2171
2183
  end
2172
2184
  rescue ::Gapic::Rest::Error => e
2173
2185
  raise ::Google::Cloud::Error.from_error(e)
@@ -2175,8 +2187,7 @@ module Google
2175
2187
 
2176
2188
  ##
2177
2189
  # Updates an instance partition, and begins allocating or releasing resources
2178
- # as requested. The returned [long-running
2179
- # operation][google.longrunning.Operation] can be used to track the
2190
+ # as requested. The returned long-running operation can be used to track the
2180
2191
  # progress of updating the instance partition. If the named instance
2181
2192
  # partition does not exist, returns `NOT_FOUND`.
2182
2193
  #
@@ -2205,13 +2216,13 @@ module Google
2205
2216
  # partition's tables.
2206
2217
  # * The instance partition's new resource levels are readable via the API.
2207
2218
  #
2208
- # The returned {::Google::Longrunning::Operation long-running operation} will
2219
+ # The returned long-running operation will
2209
2220
  # have a name of the format
2210
2221
  # `<instance_partition_name>/operations/<operation_id>` and can be used to
2211
2222
  # track the instance partition modification. The
2212
- # {::Google::Longrunning::Operation#metadata metadata} field type is
2223
+ # metadata field type is
2213
2224
  # {::Google::Cloud::Spanner::Admin::Instance::V1::UpdateInstancePartitionMetadata UpdateInstancePartitionMetadata}.
2214
- # The {::Google::Longrunning::Operation#response response} field type is
2225
+ # The response field type is
2215
2226
  # {::Google::Cloud::Spanner::Admin::Instance::V1::InstancePartition InstancePartition}, if
2216
2227
  # successful.
2217
2228
  #
@@ -2307,19 +2318,18 @@ module Google
2307
2318
  @instance_admin_stub.update_instance_partition request, options do |result, operation|
2308
2319
  result = ::Gapic::Operation.new result, @operations_client, options: options
2309
2320
  yield result, operation if block_given?
2310
- return result
2321
+ throw :response, result
2311
2322
  end
2312
2323
  rescue ::Gapic::Rest::Error => e
2313
2324
  raise ::Google::Cloud::Error.from_error(e)
2314
2325
  end
2315
2326
 
2316
2327
  ##
2317
- # Lists instance partition [long-running
2318
- # operations][google.longrunning.Operation] in the given instance.
2328
+ # Lists instance partition long-running operations in the given instance.
2319
2329
  # An instance partition operation has a name of the form
2320
2330
  # `projects/<project>/instances/<instance>/instancePartitions/<instance_partition>/operations/<operation>`.
2321
2331
  # The long-running operation
2322
- # {::Google::Longrunning::Operation#metadata metadata} field type
2332
+ # metadata field type
2323
2333
  # `metadata.type_url` describes the type of the metadata. Operations returned
2324
2334
  # include those that have completed/failed/canceled within the last 7 days,
2325
2335
  # and pending operations. Operations returned are ordered by
@@ -2357,8 +2367,7 @@ module Google
2357
2367
  # must be one of: `<`, `>`, `<=`, `>=`, `!=`, `=`, or `:`.
2358
2368
  # Colon `:` is the contains operator. Filter rules are not case sensitive.
2359
2369
  #
2360
- # The following fields in the {::Google::Longrunning::Operation Operation}
2361
- # are eligible for filtering:
2370
+ # The following fields in the Operation are eligible for filtering:
2362
2371
  #
2363
2372
  # * `name` - The name of the long-running operation
2364
2373
  # * `done` - False if the operation is in progress, else true.
@@ -2405,7 +2414,8 @@ module Google
2405
2414
  # Optional. Deadline used while retrieving metadata for instance partition
2406
2415
  # operations. Instance partitions whose operation metadata cannot be
2407
2416
  # retrieved within this deadline will be added to
2408
- # [unreachable][ListInstancePartitionOperationsResponse.unreachable] in
2417
+ # {::Google::Cloud::Spanner::Admin::Instance::V1::ListInstancePartitionOperationsResponse#unreachable_instance_partitions unreachable_instance_partitions}
2418
+ # in
2409
2419
  # {::Google::Cloud::Spanner::Admin::Instance::V1::ListInstancePartitionOperationsResponse ListInstancePartitionOperationsResponse}.
2410
2420
  # @yield [result, operation] Access the result along with the TransportOperation object
2411
2421
  # @yieldparam result [::Gapic::Operation]
@@ -2465,7 +2475,7 @@ module Google
2465
2475
  @instance_admin_stub.list_instance_partition_operations request, options do |result, operation|
2466
2476
  result = ::Gapic::Operation.new result, @operations_client, options: options
2467
2477
  yield result, operation if block_given?
2468
- return result
2478
+ throw :response, result
2469
2479
  end
2470
2480
  rescue ::Gapic::Rest::Error => e
2471
2481
  raise ::Google::Cloud::Error.from_error(e)
@@ -2473,7 +2483,7 @@ module Google
2473
2483
 
2474
2484
  ##
2475
2485
  # Moves an instance to the target instance configuration. You can use the
2476
- # returned {::Google::Longrunning::Operation long-running operation} to track
2486
+ # returned long-running operation to track
2477
2487
  # the progress of moving the instance.
2478
2488
  #
2479
2489
  # `MoveInstance` returns `FAILED_PRECONDITION` if the instance meets any of
@@ -2504,13 +2514,13 @@ module Google
2504
2514
  # transaction abort rate. However, moving an instance doesn't cause any
2505
2515
  # downtime.
2506
2516
  #
2507
- # The returned {::Google::Longrunning::Operation long-running operation} has
2517
+ # The returned long-running operation has
2508
2518
  # a name of the format
2509
2519
  # `<instance_name>/operations/<operation_id>` and can be used to track
2510
2520
  # the move instance operation. The
2511
- # {::Google::Longrunning::Operation#metadata metadata} field type is
2521
+ # metadata field type is
2512
2522
  # {::Google::Cloud::Spanner::Admin::Instance::V1::MoveInstanceMetadata MoveInstanceMetadata}.
2513
- # The {::Google::Longrunning::Operation#response response} field type is
2523
+ # The response field type is
2514
2524
  # {::Google::Cloud::Spanner::Admin::Instance::V1::Instance Instance},
2515
2525
  # if successful.
2516
2526
  # Cancelling the operation sets its metadata's
@@ -2616,7 +2626,7 @@ module Google
2616
2626
  @instance_admin_stub.move_instance request, options do |result, operation|
2617
2627
  result = ::Gapic::Operation.new result, @operations_client, options: options
2618
2628
  yield result, operation if block_given?
2619
- return result
2629
+ throw :response, result
2620
2630
  end
2621
2631
  rescue ::Gapic::Rest::Error => e
2622
2632
  raise ::Google::Cloud::Error.from_error(e)
@@ -2696,6 +2706,11 @@ module Google
2696
2706
  # default endpoint URL. The default value of nil uses the environment
2697
2707
  # universe (usually the default "googleapis.com" universe).
2698
2708
  # @return [::String,nil]
2709
+ # @!attribute [rw] logger
2710
+ # A custom logger to use for request/response debug logging, or the value
2711
+ # `:default` (the default) to construct a default logger, or `nil` to
2712
+ # explicitly disable logging.
2713
+ # @return [::Logger,:default,nil]
2699
2714
  #
2700
2715
  class Configuration
2701
2716
  extend ::Gapic::Config
@@ -2717,6 +2732,7 @@ module Google
2717
2732
  config_attr :retry_policy, nil, ::Hash, ::Proc, nil
2718
2733
  config_attr :quota_project, nil, ::String, nil
2719
2734
  config_attr :universe_domain, nil, ::String, nil
2735
+ config_attr :logger, :default, ::Logger, nil, :default
2720
2736
 
2721
2737
  # @private
2722
2738
  def initialize parent_config = nil