google-cloud-bigtable-admin-v2 1.4.0 → 1.6.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.
@@ -98,7 +98,7 @@ module Google
98
98
  initial_delay: 1.0, max_delay: 60.0, multiplier: 2, retry_codes: [14, 4]
99
99
  }
100
100
 
101
- default_config.rpcs.check_consistency.timeout = 60.0
101
+ default_config.rpcs.check_consistency.timeout = 3600.0
102
102
  default_config.rpcs.check_consistency.retry_policy = {
103
103
  initial_delay: 1.0, max_delay: 60.0, multiplier: 2, retry_codes: [14, 4]
104
104
  }
@@ -239,8 +239,19 @@ module Google
239
239
  universe_domain: @config.universe_domain,
240
240
  channel_args: @config.channel_args,
241
241
  interceptors: @config.interceptors,
242
- channel_pool_config: @config.channel_pool
242
+ channel_pool_config: @config.channel_pool,
243
+ logger: @config.logger
243
244
  )
245
+
246
+ @bigtable_table_admin_stub.stub_logger&.info do |entry|
247
+ entry.set_system_name
248
+ entry.set_service
249
+ entry.message = "Created client for #{entry.service}"
250
+ entry.set_credentials_fields credentials
251
+ entry.set "customEndpoint", @config.endpoint if @config.endpoint
252
+ entry.set "defaultTimeout", @config.timeout if @config.timeout
253
+ entry.set "quotaProject", @quota_project_id if @quota_project_id
254
+ end
244
255
  end
245
256
 
246
257
  ##
@@ -250,6 +261,15 @@ module Google
250
261
  #
251
262
  attr_reader :operations_client
252
263
 
264
+ ##
265
+ # The logger used for request/response debug logging.
266
+ #
267
+ # @return [Logger]
268
+ #
269
+ def logger
270
+ @bigtable_table_admin_stub.logger
271
+ end
272
+
253
273
  # Service calls
254
274
 
255
275
  ##
@@ -358,7 +378,6 @@ module Google
358
378
 
359
379
  @bigtable_table_admin_stub.call_rpc :create_table, request, options: options do |response, operation|
360
380
  yield response, operation if block_given?
361
- return response
362
381
  end
363
382
  rescue ::GRPC::BadStatus => e
364
383
  raise ::Google::Cloud::Error.from_error(e)
@@ -468,7 +487,7 @@ module Google
468
487
  @bigtable_table_admin_stub.call_rpc :create_table_from_snapshot, request, options: options do |response, operation|
469
488
  response = ::Gapic::Operation.new response, @operations_client, options: options
470
489
  yield response, operation if block_given?
471
- return response
490
+ throw :response, response
472
491
  end
473
492
  rescue ::GRPC::BadStatus => e
474
493
  raise ::Google::Cloud::Error.from_error(e)
@@ -575,7 +594,7 @@ module Google
575
594
  @bigtable_table_admin_stub.call_rpc :list_tables, request, options: options do |response, operation|
576
595
  response = ::Gapic::PagedEnumerable.new @bigtable_table_admin_stub, :list_tables, request, response, operation, options
577
596
  yield response, operation if block_given?
578
- return response
597
+ throw :response, response
579
598
  end
580
599
  rescue ::GRPC::BadStatus => e
581
600
  raise ::Google::Cloud::Error.from_error(e)
@@ -666,7 +685,6 @@ module Google
666
685
 
667
686
  @bigtable_table_admin_stub.call_rpc :get_table, request, options: options do |response, operation|
668
687
  yield response, operation if block_given?
669
- return response
670
688
  end
671
689
  rescue ::GRPC::BadStatus => e
672
690
  raise ::Google::Cloud::Error.from_error(e)
@@ -774,7 +792,7 @@ module Google
774
792
  @bigtable_table_admin_stub.call_rpc :update_table, request, options: options do |response, operation|
775
793
  response = ::Gapic::Operation.new response, @operations_client, options: options
776
794
  yield response, operation if block_given?
777
- return response
795
+ throw :response, response
778
796
  end
779
797
  rescue ::GRPC::BadStatus => e
780
798
  raise ::Google::Cloud::Error.from_error(e)
@@ -862,7 +880,6 @@ module Google
862
880
 
863
881
  @bigtable_table_admin_stub.call_rpc :delete_table, request, options: options do |response, operation|
864
882
  yield response, operation if block_given?
865
- return response
866
883
  end
867
884
  rescue ::GRPC::BadStatus => e
868
885
  raise ::Google::Cloud::Error.from_error(e)
@@ -958,7 +975,7 @@ module Google
958
975
  @bigtable_table_admin_stub.call_rpc :undelete_table, request, options: options do |response, operation|
959
976
  response = ::Gapic::Operation.new response, @operations_client, options: options
960
977
  yield response, operation if block_given?
961
- return response
978
+ throw :response, response
962
979
  end
963
980
  rescue ::GRPC::BadStatus => e
964
981
  raise ::Google::Cloud::Error.from_error(e)
@@ -1061,7 +1078,7 @@ module Google
1061
1078
  @bigtable_table_admin_stub.call_rpc :create_authorized_view, request, options: options do |response, operation|
1062
1079
  response = ::Gapic::Operation.new response, @operations_client, options: options
1063
1080
  yield response, operation if block_given?
1064
- return response
1081
+ throw :response, response
1065
1082
  end
1066
1083
  rescue ::GRPC::BadStatus => e
1067
1084
  raise ::Google::Cloud::Error.from_error(e)
@@ -1169,7 +1186,7 @@ module Google
1169
1186
  @bigtable_table_admin_stub.call_rpc :list_authorized_views, request, options: options do |response, operation|
1170
1187
  response = ::Gapic::PagedEnumerable.new @bigtable_table_admin_stub, :list_authorized_views, request, response, operation, options
1171
1188
  yield response, operation if block_given?
1172
- return response
1189
+ throw :response, response
1173
1190
  end
1174
1191
  rescue ::GRPC::BadStatus => e
1175
1192
  raise ::Google::Cloud::Error.from_error(e)
@@ -1260,7 +1277,6 @@ module Google
1260
1277
 
1261
1278
  @bigtable_table_admin_stub.call_rpc :get_authorized_view, request, options: options do |response, operation|
1262
1279
  yield response, operation if block_given?
1263
- return response
1264
1280
  end
1265
1281
  rescue ::GRPC::BadStatus => e
1266
1282
  raise ::Google::Cloud::Error.from_error(e)
@@ -1368,7 +1384,7 @@ module Google
1368
1384
  @bigtable_table_admin_stub.call_rpc :update_authorized_view, request, options: options do |response, operation|
1369
1385
  response = ::Gapic::Operation.new response, @operations_client, options: options
1370
1386
  yield response, operation if block_given?
1371
- return response
1387
+ throw :response, response
1372
1388
  end
1373
1389
  rescue ::GRPC::BadStatus => e
1374
1390
  raise ::Google::Cloud::Error.from_error(e)
@@ -1461,7 +1477,6 @@ module Google
1461
1477
 
1462
1478
  @bigtable_table_admin_stub.call_rpc :delete_authorized_view, request, options: options do |response, operation|
1463
1479
  yield response, operation if block_given?
1464
- return response
1465
1480
  end
1466
1481
  rescue ::GRPC::BadStatus => e
1467
1482
  raise ::Google::Cloud::Error.from_error(e)
@@ -1559,7 +1574,6 @@ module Google
1559
1574
 
1560
1575
  @bigtable_table_admin_stub.call_rpc :modify_column_families, request, options: options do |response, operation|
1561
1576
  yield response, operation if block_given?
1562
- return response
1563
1577
  end
1564
1578
  rescue ::GRPC::BadStatus => e
1565
1579
  raise ::Google::Cloud::Error.from_error(e)
@@ -1592,9 +1606,13 @@ module Google
1592
1606
  # @param row_key_prefix [::String]
1593
1607
  # Delete all rows that start with this row key prefix. Prefix cannot be
1594
1608
  # zero length.
1609
+ #
1610
+ # Note: The following fields are mutually exclusive: `row_key_prefix`, `delete_all_data_from_table`. If a field in that set is populated, all other fields in the set will automatically be cleared.
1595
1611
  # @param delete_all_data_from_table [::Boolean]
1596
1612
  # Delete all rows in the table. Setting this to false is a no-op.
1597
1613
  #
1614
+ # Note: The following fields are mutually exclusive: `delete_all_data_from_table`, `row_key_prefix`. If a field in that set is populated, all other fields in the set will automatically be cleared.
1615
+ #
1598
1616
  # @yield [response, operation] Access the result along with the RPC operation
1599
1617
  # @yieldparam response [::Google::Protobuf::Empty]
1600
1618
  # @yieldparam operation [::GRPC::ActiveCall::Operation]
@@ -1654,7 +1672,6 @@ module Google
1654
1672
 
1655
1673
  @bigtable_table_admin_stub.call_rpc :drop_row_range, request, options: options do |response, operation|
1656
1674
  yield response, operation if block_given?
1657
- return response
1658
1675
  end
1659
1676
  rescue ::GRPC::BadStatus => e
1660
1677
  raise ::Google::Cloud::Error.from_error(e)
@@ -1745,7 +1762,6 @@ module Google
1745
1762
 
1746
1763
  @bigtable_table_admin_stub.call_rpc :generate_consistency_token, request, options: options do |response, operation|
1747
1764
  yield response, operation if block_given?
1748
- return response
1749
1765
  end
1750
1766
  rescue ::GRPC::BadStatus => e
1751
1767
  raise ::Google::Cloud::Error.from_error(e)
@@ -1781,11 +1797,15 @@ module Google
1781
1797
  # Checks that reads using an app profile with `StandardIsolation` can
1782
1798
  # see all writes committed before the token was created, even if the
1783
1799
  # read and write target different clusters.
1800
+ #
1801
+ # Note: The following fields are mutually exclusive: `standard_read_remote_writes`, `data_boost_read_local_writes`. If a field in that set is populated, all other fields in the set will automatically be cleared.
1784
1802
  # @param data_boost_read_local_writes [::Google::Cloud::Bigtable::Admin::V2::DataBoostReadLocalWrites, ::Hash]
1785
1803
  # Checks that reads using an app profile with `DataBoostIsolationReadOnly`
1786
1804
  # can see all writes committed before the token was created, but only if
1787
1805
  # the read and write target the same cluster.
1788
1806
  #
1807
+ # Note: The following fields are mutually exclusive: `data_boost_read_local_writes`, `standard_read_remote_writes`. If a field in that set is populated, all other fields in the set will automatically be cleared.
1808
+ #
1789
1809
  # @yield [response, operation] Access the result along with the RPC operation
1790
1810
  # @yieldparam response [::Google::Cloud::Bigtable::Admin::V2::CheckConsistencyResponse]
1791
1811
  # @yieldparam operation [::GRPC::ActiveCall::Operation]
@@ -1845,7 +1865,6 @@ module Google
1845
1865
 
1846
1866
  @bigtable_table_admin_stub.call_rpc :check_consistency, request, options: options do |response, operation|
1847
1867
  yield response, operation if block_given?
1848
- return response
1849
1868
  end
1850
1869
  rescue ::GRPC::BadStatus => e
1851
1870
  raise ::Google::Cloud::Error.from_error(e)
@@ -1964,7 +1983,7 @@ module Google
1964
1983
  @bigtable_table_admin_stub.call_rpc :snapshot_table, request, options: options do |response, operation|
1965
1984
  response = ::Gapic::Operation.new response, @operations_client, options: options
1966
1985
  yield response, operation if block_given?
1967
- return response
1986
+ throw :response, response
1968
1987
  end
1969
1988
  rescue ::GRPC::BadStatus => e
1970
1989
  raise ::Google::Cloud::Error.from_error(e)
@@ -2058,7 +2077,6 @@ module Google
2058
2077
 
2059
2078
  @bigtable_table_admin_stub.call_rpc :get_snapshot, request, options: options do |response, operation|
2060
2079
  yield response, operation if block_given?
2061
- return response
2062
2080
  end
2063
2081
  rescue ::GRPC::BadStatus => e
2064
2082
  raise ::Google::Cloud::Error.from_error(e)
@@ -2164,7 +2182,7 @@ module Google
2164
2182
  @bigtable_table_admin_stub.call_rpc :list_snapshots, request, options: options do |response, operation|
2165
2183
  response = ::Gapic::PagedEnumerable.new @bigtable_table_admin_stub, :list_snapshots, request, response, operation, options
2166
2184
  yield response, operation if block_given?
2167
- return response
2185
+ throw :response, response
2168
2186
  end
2169
2187
  rescue ::GRPC::BadStatus => e
2170
2188
  raise ::Google::Cloud::Error.from_error(e)
@@ -2258,7 +2276,6 @@ module Google
2258
2276
 
2259
2277
  @bigtable_table_admin_stub.call_rpc :delete_snapshot, request, options: options do |response, operation|
2260
2278
  yield response, operation if block_given?
2261
- return response
2262
2279
  end
2263
2280
  rescue ::GRPC::BadStatus => e
2264
2281
  raise ::Google::Cloud::Error.from_error(e)
@@ -2370,7 +2387,7 @@ module Google
2370
2387
  @bigtable_table_admin_stub.call_rpc :create_backup, request, options: options do |response, operation|
2371
2388
  response = ::Gapic::Operation.new response, @operations_client, options: options
2372
2389
  yield response, operation if block_given?
2373
- return response
2390
+ throw :response, response
2374
2391
  end
2375
2392
  rescue ::GRPC::BadStatus => e
2376
2393
  raise ::Google::Cloud::Error.from_error(e)
@@ -2458,7 +2475,6 @@ module Google
2458
2475
 
2459
2476
  @bigtable_table_admin_stub.call_rpc :get_backup, request, options: options do |response, operation|
2460
2477
  yield response, operation if block_given?
2461
- return response
2462
2478
  end
2463
2479
  rescue ::GRPC::BadStatus => e
2464
2480
  raise ::Google::Cloud::Error.from_error(e)
@@ -2554,7 +2570,6 @@ module Google
2554
2570
 
2555
2571
  @bigtable_table_admin_stub.call_rpc :update_backup, request, options: options do |response, operation|
2556
2572
  yield response, operation if block_given?
2557
- return response
2558
2573
  end
2559
2574
  rescue ::GRPC::BadStatus => e
2560
2575
  raise ::Google::Cloud::Error.from_error(e)
@@ -2642,7 +2657,6 @@ module Google
2642
2657
 
2643
2658
  @bigtable_table_admin_stub.call_rpc :delete_backup, request, options: options do |response, operation|
2644
2659
  yield response, operation if block_given?
2645
- return response
2646
2660
  end
2647
2661
  rescue ::GRPC::BadStatus => e
2648
2662
  raise ::Google::Cloud::Error.from_error(e)
@@ -2803,7 +2817,7 @@ module Google
2803
2817
  @bigtable_table_admin_stub.call_rpc :list_backups, request, options: options do |response, operation|
2804
2818
  response = ::Gapic::PagedEnumerable.new @bigtable_table_admin_stub, :list_backups, request, response, operation, options
2805
2819
  yield response, operation if block_given?
2806
- return response
2820
+ throw :response, response
2807
2821
  end
2808
2822
  rescue ::GRPC::BadStatus => e
2809
2823
  raise ::Google::Cloud::Error.from_error(e)
@@ -2912,7 +2926,7 @@ module Google
2912
2926
  @bigtable_table_admin_stub.call_rpc :restore_table, request, options: options do |response, operation|
2913
2927
  response = ::Gapic::Operation.new response, @operations_client, options: options
2914
2928
  yield response, operation if block_given?
2915
- return response
2929
+ throw :response, response
2916
2930
  end
2917
2931
  rescue ::GRPC::BadStatus => e
2918
2932
  raise ::Google::Cloud::Error.from_error(e)
@@ -3030,7 +3044,7 @@ module Google
3030
3044
  @bigtable_table_admin_stub.call_rpc :copy_backup, request, options: options do |response, operation|
3031
3045
  response = ::Gapic::Operation.new response, @operations_client, options: options
3032
3046
  yield response, operation if block_given?
3033
- return response
3047
+ throw :response, response
3034
3048
  end
3035
3049
  rescue ::GRPC::BadStatus => e
3036
3050
  raise ::Google::Cloud::Error.from_error(e)
@@ -3122,7 +3136,6 @@ module Google
3122
3136
 
3123
3137
  @bigtable_table_admin_stub.call_rpc :get_iam_policy, request, options: options do |response, operation|
3124
3138
  yield response, operation if block_given?
3125
- return response
3126
3139
  end
3127
3140
  rescue ::GRPC::BadStatus => e
3128
3141
  raise ::Google::Cloud::Error.from_error(e)
@@ -3221,7 +3234,6 @@ module Google
3221
3234
 
3222
3235
  @bigtable_table_admin_stub.call_rpc :set_iam_policy, request, options: options do |response, operation|
3223
3236
  yield response, operation if block_given?
3224
- return response
3225
3237
  end
3226
3238
  rescue ::GRPC::BadStatus => e
3227
3239
  raise ::Google::Cloud::Error.from_error(e)
@@ -3314,7 +3326,6 @@ module Google
3314
3326
 
3315
3327
  @bigtable_table_admin_stub.call_rpc :test_iam_permissions, request, options: options do |response, operation|
3316
3328
  yield response, operation if block_given?
3317
- return response
3318
3329
  end
3319
3330
  rescue ::GRPC::BadStatus => e
3320
3331
  raise ::Google::Cloud::Error.from_error(e)
@@ -3364,6 +3375,13 @@ module Google
3364
3375
  # * (`GRPC::Core::Channel`) a gRPC channel with included credentials
3365
3376
  # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object
3366
3377
  # * (`nil`) indicating no credentials
3378
+ #
3379
+ # Warning: If you accept a credential configuration (JSON file or Hash) from an
3380
+ # external source for authentication to Google Cloud, you must validate it before
3381
+ # providing it to a Google API client library. Providing an unvalidated credential
3382
+ # configuration to Google APIs can compromise the security of your systems and data.
3383
+ # For more information, refer to [Validate credential configurations from external
3384
+ # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials).
3367
3385
  # @return [::Object]
3368
3386
  # @!attribute [rw] scope
3369
3387
  # The OAuth scopes
@@ -3403,6 +3421,11 @@ module Google
3403
3421
  # default endpoint URL. The default value of nil uses the environment
3404
3422
  # universe (usually the default "googleapis.com" universe).
3405
3423
  # @return [::String,nil]
3424
+ # @!attribute [rw] logger
3425
+ # A custom logger to use for request/response debug logging, or the value
3426
+ # `:default` (the default) to construct a default logger, or `nil` to
3427
+ # explicitly disable logging.
3428
+ # @return [::Logger,:default,nil]
3406
3429
  #
3407
3430
  class Configuration
3408
3431
  extend ::Gapic::Config
@@ -3427,6 +3450,7 @@ module Google
3427
3450
  config_attr :retry_policy, nil, ::Hash, ::Proc, nil
3428
3451
  config_attr :quota_project, nil, ::String, nil
3429
3452
  config_attr :universe_domain, nil, ::String, nil
3453
+ config_attr :logger, :default, ::Logger, nil, :default
3430
3454
 
3431
3455
  # @private
3432
3456
  def initialize parent_config = nil
@@ -0,0 +1,110 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Copyright 2025 Google LLC
4
+ #
5
+ # Licensed under the Apache License, Version 2.0 (the "License");
6
+ # you may not use this file except in compliance with the License.
7
+ # You may obtain a copy of the License at
8
+ #
9
+ # https://www.apache.org/licenses/LICENSE-2.0
10
+ #
11
+ # Unless required by applicable law or agreed to in writing, software
12
+ # distributed under the License is distributed on an "AS IS" BASIS,
13
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ # See the License for the specific language governing permissions and
15
+ # limitations under the License.
16
+
17
+
18
+ module Google
19
+ module Cloud
20
+ module Bigtable
21
+ module Admin
22
+ module V2
23
+ class GcRule # rubocop:disable Style/Documentation
24
+ ##
25
+ # Construct a GcRule for max_num_versions
26
+ #
27
+ # @param value [Integer] The max_num_versions
28
+ # @return [Google::Cloud::Bigtable::Admin::V2::GcRule]
29
+ #
30
+ def self.max_num_versions value
31
+ new max_num_versions: value
32
+ end
33
+
34
+ ##
35
+ # Construct a GcRule for max_age
36
+ #
37
+ # @param value [Google::Protobuf::Duration] The max_age
38
+ # @return [Google::Cloud::Bigtable::Admin::V2::GcRule]
39
+ #
40
+ def self.max_age value
41
+ new max_age: value
42
+ end
43
+
44
+ ##
45
+ # Construct a GcRule that is an intersection of rules
46
+ #
47
+ # @param rules [Array<Google::Cloud::Bigtable::Admin::V2::GcRule>] The component rules
48
+ # @return [Google::Cloud::Bigtable::Admin::V2::GcRule]
49
+ #
50
+ def self.intersection *rules
51
+ rules = Array(rules.first) if rules.size == 1
52
+ intersection = Google::Cloud::Bigtable::Admin::V2::GcRule::Intersection.new rules: rules
53
+ new intersection: intersection
54
+ end
55
+
56
+ ##
57
+ # Construct a GcRule that is a union of rules
58
+ #
59
+ # @param rules [Array<Google::Cloud::Bigtable::Admin::V2::GcRule>] The component rules
60
+ # @return [Google::Cloud::Bigtable::Admin::V2::GcRule]
61
+ #
62
+ def self.union *rules
63
+ rules = Array(rules.first) if rules.size == 1
64
+ union = Google::Cloud::Bigtable::Admin::V2::GcRule::Union.new rules: rules
65
+ new union: union
66
+ end
67
+
68
+ # @private
69
+ def []= key, value
70
+ _oneof_warning key, rule if !value.nil? && !rule.nil? && key != rule.to_s
71
+ super
72
+ end
73
+
74
+ # @private
75
+ def max_num_versions= value
76
+ _oneof_warning "max_num_versions", rule if !value.nil? && !rule.nil? && rule != :max_num_versions
77
+ super
78
+ end
79
+
80
+ # @private
81
+ def max_age= value
82
+ _oneof_warning "max_age", rule if !value.nil? && !rule.nil? && rule != :max_age
83
+ super
84
+ end
85
+
86
+ # @private
87
+ def intersection= value
88
+ _oneof_warning "intersection", rule if !value.nil? && !rule.nil? && rule != :intersection
89
+ super
90
+ end
91
+
92
+ # @private
93
+ def union= value
94
+ _oneof_warning "union", rule if !value.nil? && !rule.nil? && rule != :union
95
+ super
96
+ end
97
+
98
+ private
99
+
100
+ def _oneof_warning cur, last
101
+ warn "WARNING: #{caller(2).first}: At most one GcRule field can be set. " \
102
+ "Setting GcRule##{cur} automatically clears GcRule##{last}. " \
103
+ "To suppress this warning, explicitly clear GcRule##{last} to nil first."
104
+ end
105
+ end
106
+ end
107
+ end
108
+ end
109
+ end
110
+ end
@@ -125,14 +125,6 @@ module Google
125
125
  # Lists operations that match the specified filter in the request. If the
126
126
  # server doesn't support this method, it returns `UNIMPLEMENTED`.
127
127
  #
128
- # NOTE: the `name` binding allows API services to override the binding
129
- # to use different resource name schemes, such as `users/*/operations`. To
130
- # override the binding, API services can add a binding such as
131
- # `"/v1/{name=users/*}/operations"` to their service configuration.
132
- # For backwards compatibility, the default name includes the operations
133
- # collection id, however overriding users must ensure the name binding
134
- # is the parent resource, without the operations collection id.
135
- #
136
128
  # @overload list_operations(request, options = nil)
137
129
  # Pass arguments to `list_operations` via a request object, either of type
138
130
  # {::Google::Longrunning::ListOperationsRequest} or an equivalent Hash.
@@ -222,7 +214,7 @@ module Google
222
214
  wrap_lro_operation = ->(op_response) { ::Gapic::Operation.new op_response, @operations_client }
223
215
  response = ::Gapic::PagedEnumerable.new @operations_stub, :list_operations, request, response, operation, options, format_resource: wrap_lro_operation
224
216
  yield response, operation if block_given?
225
- return response
217
+ throw :response, response
226
218
  end
227
219
  rescue ::GRPC::BadStatus => e
228
220
  raise ::Google::Cloud::Error.from_error(e)
@@ -318,7 +310,7 @@ module Google
318
310
  @operations_stub.call_rpc :get_operation, request, options: options do |response, operation|
319
311
  response = ::Gapic::Operation.new response, @operations_client, options: options
320
312
  yield response, operation if block_given?
321
- return response
313
+ throw :response, response
322
314
  end
323
315
  rescue ::GRPC::BadStatus => e
324
316
  raise ::Google::Cloud::Error.from_error(e)
@@ -407,7 +399,6 @@ module Google
407
399
 
408
400
  @operations_stub.call_rpc :delete_operation, request, options: options do |response, operation|
409
401
  yield response, operation if block_given?
410
- return response
411
402
  end
412
403
  rescue ::GRPC::BadStatus => e
413
404
  raise ::Google::Cloud::Error.from_error(e)
@@ -422,8 +413,9 @@ module Google
422
413
  # other methods to check whether the cancellation succeeded or whether the
423
414
  # operation completed despite cancellation. On successful cancellation,
424
415
  # the operation is not deleted; instead, it becomes an operation with
425
- # an {::Google::Longrunning::Operation#error Operation.error} value with a {::Google::Rpc::Status#code google.rpc.Status.code} of 1,
426
- # corresponding to `Code.CANCELLED`.
416
+ # an {::Google::Longrunning::Operation#error Operation.error} value with a
417
+ # {::Google::Rpc::Status#code google.rpc.Status.code} of `1`, corresponding to
418
+ # `Code.CANCELLED`.
427
419
  #
428
420
  # @overload cancel_operation(request, options = nil)
429
421
  # Pass arguments to `cancel_operation` via a request object, either of type
@@ -502,7 +494,6 @@ module Google
502
494
 
503
495
  @operations_stub.call_rpc :cancel_operation, request, options: options do |response, operation|
504
496
  yield response, operation if block_given?
505
- return response
506
497
  end
507
498
  rescue ::GRPC::BadStatus => e
508
499
  raise ::Google::Cloud::Error.from_error(e)
@@ -600,7 +591,7 @@ module Google
600
591
  @operations_stub.call_rpc :wait_operation, request, options: options do |response, operation|
601
592
  response = ::Gapic::Operation.new response, @operations_client, options: options
602
593
  yield response, operation if block_given?
603
- return response
594
+ throw :response, response
604
595
  end
605
596
  rescue ::GRPC::BadStatus => e
606
597
  raise ::Google::Cloud::Error.from_error(e)
@@ -650,6 +641,13 @@ module Google
650
641
  # * (`GRPC::Core::Channel`) a gRPC channel with included credentials
651
642
  # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object
652
643
  # * (`nil`) indicating no credentials
644
+ #
645
+ # Warning: If you accept a credential configuration (JSON file or Hash) from an
646
+ # external source for authentication to Google Cloud, you must validate it before
647
+ # providing it to a Google API client library. Providing an unvalidated credential
648
+ # configuration to Google APIs can compromise the security of your systems and data.
649
+ # For more information, refer to [Validate credential configurations from external
650
+ # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials).
653
651
  # @return [::Object]
654
652
  # @!attribute [rw] scope
655
653
  # The OAuth scopes
@@ -689,6 +687,11 @@ module Google
689
687
  # default endpoint URL. The default value of nil uses the environment
690
688
  # universe (usually the default "googleapis.com" universe).
691
689
  # @return [::String,nil]
690
+ # @!attribute [rw] logger
691
+ # A custom logger to use for request/response debug logging, or the value
692
+ # `:default` (the default) to construct a default logger, or `nil` to
693
+ # explicitly disable logging.
694
+ # @return [::Logger,:default,nil]
692
695
  #
693
696
  class Configuration
694
697
  extend ::Gapic::Config
@@ -713,6 +716,7 @@ module Google
713
716
  config_attr :retry_policy, nil, ::Hash, ::Proc, nil
714
717
  config_attr :quota_project, nil, ::String, nil
715
718
  config_attr :universe_domain, nil, ::String, nil
719
+ config_attr :logger, :default, ::Logger, nil, :default
716
720
 
717
721
  # @private
718
722
  def initialize parent_config = nil
@@ -22,7 +22,7 @@ module Google
22
22
  module Bigtable
23
23
  module Admin
24
24
  module V2
25
- VERSION = "1.4.0"
25
+ VERSION = "1.6.0"
26
26
  end
27
27
  end
28
28
  end
@@ -28,6 +28,9 @@ module Google
28
28
  # @!attribute [rw] destinations
29
29
  # @return [::Array<::Google::Api::ClientLibraryDestination>]
30
30
  # The destination where API teams want this client library to be published.
31
+ # @!attribute [rw] selective_gapic_generation
32
+ # @return [::Google::Api::SelectiveGapicGeneration]
33
+ # Configuration for which RPCs should be generated in the GAPIC client.
31
34
  class CommonLanguageSettings
32
35
  include ::Google::Protobuf::MessageExts
33
36
  extend ::Google::Protobuf::MessageExts::ClassMethods
@@ -212,6 +215,12 @@ module Google
212
215
  # enabled. By default, asynchronous REST clients will not be generated.
213
216
  # This feature will be enabled by default 1 month after launching the
214
217
  # feature in preview packages.
218
+ # @!attribute [rw] protobuf_pythonic_types_enabled
219
+ # @return [::Boolean]
220
+ # Enables generation of protobuf code using new types that are more
221
+ # Pythonic which are included in `protobuf>=5.29.x`. This feature will be
222
+ # enabled by default 1 month after launching the feature in preview
223
+ # packages.
215
224
  class ExperimentalFeatures
216
225
  include ::Google::Protobuf::MessageExts
217
226
  extend ::Google::Protobuf::MessageExts::ClassMethods
@@ -297,9 +306,28 @@ module Google
297
306
  # @!attribute [rw] common
298
307
  # @return [::Google::Api::CommonLanguageSettings]
299
308
  # Some settings.
309
+ # @!attribute [rw] renamed_services
310
+ # @return [::Google::Protobuf::Map{::String => ::String}]
311
+ # Map of service names to renamed services. Keys are the package relative
312
+ # service names and values are the name to be used for the service client
313
+ # and call options.
314
+ #
315
+ # publishing:
316
+ # go_settings:
317
+ # renamed_services:
318
+ # Publisher: TopicAdmin
300
319
  class GoSettings
301
320
  include ::Google::Protobuf::MessageExts
302
321
  extend ::Google::Protobuf::MessageExts::ClassMethods
322
+
323
+ # @!attribute [rw] key
324
+ # @return [::String]
325
+ # @!attribute [rw] value
326
+ # @return [::String]
327
+ class RenamedServicesEntry
328
+ include ::Google::Protobuf::MessageExts
329
+ extend ::Google::Protobuf::MessageExts::ClassMethods
330
+ end
303
331
  end
304
332
 
305
333
  # Describes the generator configuration for a method.
@@ -375,6 +403,17 @@ module Google
375
403
  end
376
404
  end
377
405
 
406
+ # This message is used to configure the generation of a subset of the RPCs in
407
+ # a service for client libraries.
408
+ # @!attribute [rw] methods
409
+ # @return [::Array<::String>]
410
+ # An allowlist of the fully qualified names of RPCs that should be included
411
+ # on public client surfaces.
412
+ class SelectiveGapicGeneration
413
+ include ::Google::Protobuf::MessageExts
414
+ extend ::Google::Protobuf::MessageExts::ClassMethods
415
+ end
416
+
378
417
  # The organization for which the client libraries are being published.
379
418
  # Affects the url where generated docs are published, etc.
380
419
  module ClientLibraryOrganization