google-area120-tables-v1alpha1 0.8.0 → 0.9.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: cd23db904ab27bd5a3e6edf96bb8584fc650e4a35b5ff5142cb8f94d67d1ec50
4
- data.tar.gz: 05625162537d0887e63503d731b26707c07da1d7e6b90187279d48d18afdf364
3
+ metadata.gz: 52890d2347d33e4418b5cb02f31e913dd20c315dae4f32e8841e50fa47bc814a
4
+ data.tar.gz: 3c214ef478b722ed0b3591cbf909979b320035d1f08d37622de96b59691fc434
5
5
  SHA512:
6
- metadata.gz: cd6901b7e4a66f8d2543f8277ab908f964d385e24d9c723454ece2d8fc86a10e0edf3bb12530228ee2f313abbde49438cb7b48d45e0dee7360e6316c1f6cd970
7
- data.tar.gz: 77d4a88aeba4cfd022a082e59427a7a1ada9a6c15b49766c79c26a994ac14873a67d509266a7e2cb17fe65c8c917fbd2c4b16e4c1e577c57a1a09a3c979c17a3
6
+ metadata.gz: 1cef5009399d22813a80e591627d1b08c5a26667748b25e7a735c2d035f83e1461e0a764f59ad29b7647e9e8baeda9453205347cd360b7f65b19c76c4883e03c
7
+ data.tar.gz: e2878bb71d561cb1070195d3884cb65b34554a9e5a97be9f465448cb5b9f40bbdf3a93a7624fd1ef04a508b776f471144a1c1daf93e15e8cae859bb34032671c
data/README.md CHANGED
@@ -43,33 +43,43 @@ for class and method documentation.
43
43
  See also the [Product Documentation](https://tables.area120.google.com/u/0/about#/)
44
44
  for general usage information.
45
45
 
46
- ## Enabling Logging
47
-
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/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
- 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
- and the gRPC [spec_helper.rb](https://github.com/grpc/grpc/blob/master/src/ruby/spec/spec_helper.rb) for additional information.
53
-
54
- Configuring a Ruby stdlib logger:
46
+ ## Debug Logging
47
+
48
+ This library comes with opt-in Debug Logging that can help you troubleshoot
49
+ your application's integration with the API. When logging is activated, key
50
+ events such as requests and responses, along with data payloads and metadata
51
+ such as headers and client configuration, are logged to the standard error
52
+ stream.
53
+
54
+ **WARNING:** Client Library Debug Logging includes your data payloads in
55
+ plaintext, which could include sensitive data such as PII for yourself or your
56
+ customers, private keys, or other security data that could be compromising if
57
+ leaked. Always practice good data hygiene with your application logs, and follow
58
+ the principle of least access. Google also recommends that Client Library Debug
59
+ Logging be enabled only temporarily during active debugging, and not used
60
+ permanently in production.
61
+
62
+ To enable logging, set the environment variable `GOOGLE_SDK_RUBY_LOGGING_GEMS`
63
+ to the value `all`. Alternatively, you can set the value to a comma-delimited
64
+ list of client library gem names. This will select the default logging behavior,
65
+ which writes logs to the standard error stream. On a local workstation, this may
66
+ result in logs appearing on the console. When running on a Google Cloud hosting
67
+ service such as [Google Cloud Run](https://cloud.google.com/run), this generally
68
+ results in logs appearing alongside your application logs in the
69
+ [Google Cloud Logging](https://cloud.google.com/logging/) service.
70
+
71
+ You can customize logging by modifying the `logger` configuration when
72
+ constructing a client object. For example:
55
73
 
56
74
  ```ruby
75
+ require "google/area120/tables/v1alpha1"
57
76
  require "logger"
58
77
 
59
- module MyLogger
60
- LOGGER = Logger.new $stderr, level: Logger::WARN
61
- def logger
62
- LOGGER
63
- end
64
- end
65
-
66
- # Define a gRPC module-level logger method before grpc/logconfig.rb loads.
67
- module GRPC
68
- extend MyLogger
78
+ client = ::Google::Area120::Tables::V1alpha1::TablesService::Client.new do |config|
79
+ config.logger = Logger.new "my-app.log"
69
80
  end
70
81
  ```
71
82
 
72
-
73
83
  ## Google Cloud Samples
74
84
 
75
85
  To browse ready to use code samples check [Google Cloud Samples](https://cloud.google.com/docs/samples).
@@ -41,6 +41,9 @@ module Google
41
41
  # resources, named `workspaces/*`.
42
42
  #
43
43
  class Client
44
+ # @private
45
+ API_VERSION = ""
46
+
44
47
  # @private
45
48
  DEFAULT_ENDPOINT_TEMPLATE = "area120tables.$UNIVERSE_DOMAIN$"
46
49
 
@@ -194,8 +197,28 @@ module Google
194
197
  universe_domain: @config.universe_domain,
195
198
  channel_args: @config.channel_args,
196
199
  interceptors: @config.interceptors,
197
- channel_pool_config: @config.channel_pool
200
+ channel_pool_config: @config.channel_pool,
201
+ logger: @config.logger
198
202
  )
203
+
204
+ @tables_service_stub.stub_logger&.info do |entry|
205
+ entry.set_system_name
206
+ entry.set_service
207
+ entry.message = "Created client for #{entry.service}"
208
+ entry.set_credentials_fields credentials
209
+ entry.set "customEndpoint", @config.endpoint if @config.endpoint
210
+ entry.set "defaultTimeout", @config.timeout if @config.timeout
211
+ entry.set "quotaProject", @quota_project_id if @quota_project_id
212
+ end
213
+ end
214
+
215
+ ##
216
+ # The logger used for request/response debug logging.
217
+ #
218
+ # @return [Logger]
219
+ #
220
+ def logger
221
+ @tables_service_stub.logger
199
222
  end
200
223
 
201
224
  # Service calls
@@ -256,10 +279,11 @@ module Google
256
279
  # Customize the options with defaults
257
280
  metadata = @config.rpcs.get_table.metadata.to_h
258
281
 
259
- # Set x-goog-api-client and x-goog-user-project headers
282
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
260
283
  metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
261
284
  lib_name: @config.lib_name, lib_version: @config.lib_version,
262
285
  gapic_version: ::Google::Area120::Tables::V1alpha1::VERSION
286
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
263
287
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
264
288
 
265
289
  header_params = {}
@@ -280,7 +304,6 @@ module Google
280
304
 
281
305
  @tables_service_stub.call_rpc :get_table, request, options: options do |response, operation|
282
306
  yield response, operation if block_given?
283
- return response
284
307
  end
285
308
  rescue ::GRPC::BadStatus => e
286
309
  raise ::Google::Cloud::Error.from_error(e)
@@ -355,10 +378,11 @@ module Google
355
378
  # Customize the options with defaults
356
379
  metadata = @config.rpcs.list_tables.metadata.to_h
357
380
 
358
- # Set x-goog-api-client and x-goog-user-project headers
381
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
359
382
  metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
360
383
  lib_name: @config.lib_name, lib_version: @config.lib_version,
361
384
  gapic_version: ::Google::Area120::Tables::V1alpha1::VERSION
385
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
362
386
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
363
387
 
364
388
  options.apply_defaults timeout: @config.rpcs.list_tables.timeout,
@@ -372,7 +396,7 @@ module Google
372
396
  @tables_service_stub.call_rpc :list_tables, request, options: options do |response, operation|
373
397
  response = ::Gapic::PagedEnumerable.new @tables_service_stub, :list_tables, request, response, operation, options
374
398
  yield response, operation if block_given?
375
- return response
399
+ throw :response, response
376
400
  end
377
401
  rescue ::GRPC::BadStatus => e
378
402
  raise ::Google::Cloud::Error.from_error(e)
@@ -434,10 +458,11 @@ module Google
434
458
  # Customize the options with defaults
435
459
  metadata = @config.rpcs.get_workspace.metadata.to_h
436
460
 
437
- # Set x-goog-api-client and x-goog-user-project headers
461
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
438
462
  metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
439
463
  lib_name: @config.lib_name, lib_version: @config.lib_version,
440
464
  gapic_version: ::Google::Area120::Tables::V1alpha1::VERSION
465
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
441
466
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
442
467
 
443
468
  header_params = {}
@@ -458,7 +483,6 @@ module Google
458
483
 
459
484
  @tables_service_stub.call_rpc :get_workspace, request, options: options do |response, operation|
460
485
  yield response, operation if block_given?
461
- return response
462
486
  end
463
487
  rescue ::GRPC::BadStatus => e
464
488
  raise ::Google::Cloud::Error.from_error(e)
@@ -533,10 +557,11 @@ module Google
533
557
  # Customize the options with defaults
534
558
  metadata = @config.rpcs.list_workspaces.metadata.to_h
535
559
 
536
- # Set x-goog-api-client and x-goog-user-project headers
560
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
537
561
  metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
538
562
  lib_name: @config.lib_name, lib_version: @config.lib_version,
539
563
  gapic_version: ::Google::Area120::Tables::V1alpha1::VERSION
564
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
540
565
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
541
566
 
542
567
  options.apply_defaults timeout: @config.rpcs.list_workspaces.timeout,
@@ -550,7 +575,7 @@ module Google
550
575
  @tables_service_stub.call_rpc :list_workspaces, request, options: options do |response, operation|
551
576
  response = ::Gapic::PagedEnumerable.new @tables_service_stub, :list_workspaces, request, response, operation, options
552
577
  yield response, operation if block_given?
553
- return response
578
+ throw :response, response
554
579
  end
555
580
  rescue ::GRPC::BadStatus => e
556
581
  raise ::Google::Cloud::Error.from_error(e)
@@ -615,10 +640,11 @@ module Google
615
640
  # Customize the options with defaults
616
641
  metadata = @config.rpcs.get_row.metadata.to_h
617
642
 
618
- # Set x-goog-api-client and x-goog-user-project headers
643
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
619
644
  metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
620
645
  lib_name: @config.lib_name, lib_version: @config.lib_version,
621
646
  gapic_version: ::Google::Area120::Tables::V1alpha1::VERSION
647
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
622
648
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
623
649
 
624
650
  header_params = {}
@@ -639,7 +665,6 @@ module Google
639
665
 
640
666
  @tables_service_stub.call_rpc :get_row, request, options: options do |response, operation|
641
667
  yield response, operation if block_given?
642
- return response
643
668
  end
644
669
  rescue ::GRPC::BadStatus => e
645
670
  raise ::Google::Cloud::Error.from_error(e)
@@ -724,10 +749,11 @@ module Google
724
749
  # Customize the options with defaults
725
750
  metadata = @config.rpcs.list_rows.metadata.to_h
726
751
 
727
- # Set x-goog-api-client and x-goog-user-project headers
752
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
728
753
  metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
729
754
  lib_name: @config.lib_name, lib_version: @config.lib_version,
730
755
  gapic_version: ::Google::Area120::Tables::V1alpha1::VERSION
756
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
731
757
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
732
758
 
733
759
  header_params = {}
@@ -749,7 +775,7 @@ module Google
749
775
  @tables_service_stub.call_rpc :list_rows, request, options: options do |response, operation|
750
776
  response = ::Gapic::PagedEnumerable.new @tables_service_stub, :list_rows, request, response, operation, options
751
777
  yield response, operation if block_given?
752
- return response
778
+ throw :response, response
753
779
  end
754
780
  rescue ::GRPC::BadStatus => e
755
781
  raise ::Google::Cloud::Error.from_error(e)
@@ -816,10 +842,11 @@ module Google
816
842
  # Customize the options with defaults
817
843
  metadata = @config.rpcs.create_row.metadata.to_h
818
844
 
819
- # Set x-goog-api-client and x-goog-user-project headers
845
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
820
846
  metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
821
847
  lib_name: @config.lib_name, lib_version: @config.lib_version,
822
848
  gapic_version: ::Google::Area120::Tables::V1alpha1::VERSION
849
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
823
850
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
824
851
 
825
852
  header_params = {}
@@ -840,7 +867,6 @@ module Google
840
867
 
841
868
  @tables_service_stub.call_rpc :create_row, request, options: options do |response, operation|
842
869
  yield response, operation if block_given?
843
- return response
844
870
  end
845
871
  rescue ::GRPC::BadStatus => e
846
872
  raise ::Google::Cloud::Error.from_error(e)
@@ -906,10 +932,11 @@ module Google
906
932
  # Customize the options with defaults
907
933
  metadata = @config.rpcs.batch_create_rows.metadata.to_h
908
934
 
909
- # Set x-goog-api-client and x-goog-user-project headers
935
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
910
936
  metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
911
937
  lib_name: @config.lib_name, lib_version: @config.lib_version,
912
938
  gapic_version: ::Google::Area120::Tables::V1alpha1::VERSION
939
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
913
940
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
914
941
 
915
942
  header_params = {}
@@ -930,7 +957,6 @@ module Google
930
957
 
931
958
  @tables_service_stub.call_rpc :batch_create_rows, request, options: options do |response, operation|
932
959
  yield response, operation if block_given?
933
- return response
934
960
  end
935
961
  rescue ::GRPC::BadStatus => e
936
962
  raise ::Google::Cloud::Error.from_error(e)
@@ -996,10 +1022,11 @@ module Google
996
1022
  # Customize the options with defaults
997
1023
  metadata = @config.rpcs.update_row.metadata.to_h
998
1024
 
999
- # Set x-goog-api-client and x-goog-user-project headers
1025
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
1000
1026
  metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1001
1027
  lib_name: @config.lib_name, lib_version: @config.lib_version,
1002
1028
  gapic_version: ::Google::Area120::Tables::V1alpha1::VERSION
1029
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
1003
1030
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1004
1031
 
1005
1032
  header_params = {}
@@ -1020,7 +1047,6 @@ module Google
1020
1047
 
1021
1048
  @tables_service_stub.call_rpc :update_row, request, options: options do |response, operation|
1022
1049
  yield response, operation if block_given?
1023
- return response
1024
1050
  end
1025
1051
  rescue ::GRPC::BadStatus => e
1026
1052
  raise ::Google::Cloud::Error.from_error(e)
@@ -1086,10 +1112,11 @@ module Google
1086
1112
  # Customize the options with defaults
1087
1113
  metadata = @config.rpcs.batch_update_rows.metadata.to_h
1088
1114
 
1089
- # Set x-goog-api-client and x-goog-user-project headers
1115
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
1090
1116
  metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1091
1117
  lib_name: @config.lib_name, lib_version: @config.lib_version,
1092
1118
  gapic_version: ::Google::Area120::Tables::V1alpha1::VERSION
1119
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
1093
1120
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1094
1121
 
1095
1122
  header_params = {}
@@ -1110,7 +1137,6 @@ module Google
1110
1137
 
1111
1138
  @tables_service_stub.call_rpc :batch_update_rows, request, options: options do |response, operation|
1112
1139
  yield response, operation if block_given?
1113
- return response
1114
1140
  end
1115
1141
  rescue ::GRPC::BadStatus => e
1116
1142
  raise ::Google::Cloud::Error.from_error(e)
@@ -1172,10 +1198,11 @@ module Google
1172
1198
  # Customize the options with defaults
1173
1199
  metadata = @config.rpcs.delete_row.metadata.to_h
1174
1200
 
1175
- # Set x-goog-api-client and x-goog-user-project headers
1201
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
1176
1202
  metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1177
1203
  lib_name: @config.lib_name, lib_version: @config.lib_version,
1178
1204
  gapic_version: ::Google::Area120::Tables::V1alpha1::VERSION
1205
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
1179
1206
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1180
1207
 
1181
1208
  header_params = {}
@@ -1196,7 +1223,6 @@ module Google
1196
1223
 
1197
1224
  @tables_service_stub.call_rpc :delete_row, request, options: options do |response, operation|
1198
1225
  yield response, operation if block_given?
1199
- return response
1200
1226
  end
1201
1227
  rescue ::GRPC::BadStatus => e
1202
1228
  raise ::Google::Cloud::Error.from_error(e)
@@ -1263,10 +1289,11 @@ module Google
1263
1289
  # Customize the options with defaults
1264
1290
  metadata = @config.rpcs.batch_delete_rows.metadata.to_h
1265
1291
 
1266
- # Set x-goog-api-client and x-goog-user-project headers
1292
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
1267
1293
  metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1268
1294
  lib_name: @config.lib_name, lib_version: @config.lib_version,
1269
1295
  gapic_version: ::Google::Area120::Tables::V1alpha1::VERSION
1296
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
1270
1297
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1271
1298
 
1272
1299
  header_params = {}
@@ -1287,7 +1314,6 @@ module Google
1287
1314
 
1288
1315
  @tables_service_stub.call_rpc :batch_delete_rows, request, options: options do |response, operation|
1289
1316
  yield response, operation if block_given?
1290
- return response
1291
1317
  end
1292
1318
  rescue ::GRPC::BadStatus => e
1293
1319
  raise ::Google::Cloud::Error.from_error(e)
@@ -1376,6 +1402,11 @@ module Google
1376
1402
  # default endpoint URL. The default value of nil uses the environment
1377
1403
  # universe (usually the default "googleapis.com" universe).
1378
1404
  # @return [::String,nil]
1405
+ # @!attribute [rw] logger
1406
+ # A custom logger to use for request/response debug logging, or the value
1407
+ # `:default` (the default) to construct a default logger, or `nil` to
1408
+ # explicitly disable logging.
1409
+ # @return [::Logger,:default,nil]
1379
1410
  #
1380
1411
  class Configuration
1381
1412
  extend ::Gapic::Config
@@ -1400,6 +1431,7 @@ module Google
1400
1431
  config_attr :retry_policy, nil, ::Hash, ::Proc, nil
1401
1432
  config_attr :quota_project, nil, ::String, nil
1402
1433
  config_attr :universe_domain, nil, ::String, nil
1434
+ config_attr :logger, :default, ::Logger, nil, :default
1403
1435
 
1404
1436
  # @private
1405
1437
  def initialize parent_config = nil
@@ -43,6 +43,9 @@ module Google
43
43
  # resources, named `workspaces/*`.
44
44
  #
45
45
  class Client
46
+ # @private
47
+ API_VERSION = ""
48
+
46
49
  # @private
47
50
  DEFAULT_ENDPOINT_TEMPLATE = "area120tables.$UNIVERSE_DOMAIN$"
48
51
 
@@ -187,8 +190,28 @@ module Google
187
190
  endpoint: @config.endpoint,
188
191
  endpoint_template: DEFAULT_ENDPOINT_TEMPLATE,
189
192
  universe_domain: @config.universe_domain,
190
- credentials: credentials
193
+ credentials: credentials,
194
+ logger: @config.logger
191
195
  )
196
+
197
+ @tables_service_stub.logger(stub: true)&.info do |entry|
198
+ entry.set_system_name
199
+ entry.set_service
200
+ entry.message = "Created client for #{entry.service}"
201
+ entry.set_credentials_fields credentials
202
+ entry.set "customEndpoint", @config.endpoint if @config.endpoint
203
+ entry.set "defaultTimeout", @config.timeout if @config.timeout
204
+ entry.set "quotaProject", @quota_project_id if @quota_project_id
205
+ end
206
+ end
207
+
208
+ ##
209
+ # The logger used for request/response debug logging.
210
+ #
211
+ # @return [Logger]
212
+ #
213
+ def logger
214
+ @tables_service_stub.logger
192
215
  end
193
216
 
194
217
  # Service calls
@@ -248,12 +271,13 @@ module Google
248
271
  # Customize the options with defaults
249
272
  call_metadata = @config.rpcs.get_table.metadata.to_h
250
273
 
251
- # Set x-goog-api-client and x-goog-user-project headers
274
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
252
275
  call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
253
276
  lib_name: @config.lib_name, lib_version: @config.lib_version,
254
277
  gapic_version: ::Google::Area120::Tables::V1alpha1::VERSION,
255
278
  transports_version_send: [:rest]
256
279
 
280
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
257
281
  call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
258
282
 
259
283
  options.apply_defaults timeout: @config.rpcs.get_table.timeout,
@@ -266,7 +290,6 @@ module Google
266
290
 
267
291
  @tables_service_stub.get_table request, options do |result, operation|
268
292
  yield result, operation if block_given?
269
- return result
270
293
  end
271
294
  rescue ::Gapic::Rest::Error => e
272
295
  raise ::Google::Cloud::Error.from_error(e)
@@ -340,12 +363,13 @@ module Google
340
363
  # Customize the options with defaults
341
364
  call_metadata = @config.rpcs.list_tables.metadata.to_h
342
365
 
343
- # Set x-goog-api-client and x-goog-user-project headers
366
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
344
367
  call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
345
368
  lib_name: @config.lib_name, lib_version: @config.lib_version,
346
369
  gapic_version: ::Google::Area120::Tables::V1alpha1::VERSION,
347
370
  transports_version_send: [:rest]
348
371
 
372
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
349
373
  call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
350
374
 
351
375
  options.apply_defaults timeout: @config.rpcs.list_tables.timeout,
@@ -359,7 +383,7 @@ module Google
359
383
  @tables_service_stub.list_tables request, options do |result, operation|
360
384
  result = ::Gapic::Rest::PagedEnumerable.new @tables_service_stub, :list_tables, "tables", request, result, options
361
385
  yield result, operation if block_given?
362
- return result
386
+ throw :response, result
363
387
  end
364
388
  rescue ::Gapic::Rest::Error => e
365
389
  raise ::Google::Cloud::Error.from_error(e)
@@ -420,12 +444,13 @@ module Google
420
444
  # Customize the options with defaults
421
445
  call_metadata = @config.rpcs.get_workspace.metadata.to_h
422
446
 
423
- # Set x-goog-api-client and x-goog-user-project headers
447
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
424
448
  call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
425
449
  lib_name: @config.lib_name, lib_version: @config.lib_version,
426
450
  gapic_version: ::Google::Area120::Tables::V1alpha1::VERSION,
427
451
  transports_version_send: [:rest]
428
452
 
453
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
429
454
  call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
430
455
 
431
456
  options.apply_defaults timeout: @config.rpcs.get_workspace.timeout,
@@ -438,7 +463,6 @@ module Google
438
463
 
439
464
  @tables_service_stub.get_workspace request, options do |result, operation|
440
465
  yield result, operation if block_given?
441
- return result
442
466
  end
443
467
  rescue ::Gapic::Rest::Error => e
444
468
  raise ::Google::Cloud::Error.from_error(e)
@@ -512,12 +536,13 @@ module Google
512
536
  # Customize the options with defaults
513
537
  call_metadata = @config.rpcs.list_workspaces.metadata.to_h
514
538
 
515
- # Set x-goog-api-client and x-goog-user-project headers
539
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
516
540
  call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
517
541
  lib_name: @config.lib_name, lib_version: @config.lib_version,
518
542
  gapic_version: ::Google::Area120::Tables::V1alpha1::VERSION,
519
543
  transports_version_send: [:rest]
520
544
 
545
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
521
546
  call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
522
547
 
523
548
  options.apply_defaults timeout: @config.rpcs.list_workspaces.timeout,
@@ -531,7 +556,7 @@ module Google
531
556
  @tables_service_stub.list_workspaces request, options do |result, operation|
532
557
  result = ::Gapic::Rest::PagedEnumerable.new @tables_service_stub, :list_workspaces, "workspaces", request, result, options
533
558
  yield result, operation if block_given?
534
- return result
559
+ throw :response, result
535
560
  end
536
561
  rescue ::Gapic::Rest::Error => e
537
562
  raise ::Google::Cloud::Error.from_error(e)
@@ -595,12 +620,13 @@ module Google
595
620
  # Customize the options with defaults
596
621
  call_metadata = @config.rpcs.get_row.metadata.to_h
597
622
 
598
- # Set x-goog-api-client and x-goog-user-project headers
623
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
599
624
  call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
600
625
  lib_name: @config.lib_name, lib_version: @config.lib_version,
601
626
  gapic_version: ::Google::Area120::Tables::V1alpha1::VERSION,
602
627
  transports_version_send: [:rest]
603
628
 
629
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
604
630
  call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
605
631
 
606
632
  options.apply_defaults timeout: @config.rpcs.get_row.timeout,
@@ -613,7 +639,6 @@ module Google
613
639
 
614
640
  @tables_service_stub.get_row request, options do |result, operation|
615
641
  yield result, operation if block_given?
616
- return result
617
642
  end
618
643
  rescue ::Gapic::Rest::Error => e
619
644
  raise ::Google::Cloud::Error.from_error(e)
@@ -697,12 +722,13 @@ module Google
697
722
  # Customize the options with defaults
698
723
  call_metadata = @config.rpcs.list_rows.metadata.to_h
699
724
 
700
- # Set x-goog-api-client and x-goog-user-project headers
725
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
701
726
  call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
702
727
  lib_name: @config.lib_name, lib_version: @config.lib_version,
703
728
  gapic_version: ::Google::Area120::Tables::V1alpha1::VERSION,
704
729
  transports_version_send: [:rest]
705
730
 
731
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
706
732
  call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
707
733
 
708
734
  options.apply_defaults timeout: @config.rpcs.list_rows.timeout,
@@ -716,7 +742,7 @@ module Google
716
742
  @tables_service_stub.list_rows request, options do |result, operation|
717
743
  result = ::Gapic::Rest::PagedEnumerable.new @tables_service_stub, :list_rows, "rows", request, result, options
718
744
  yield result, operation if block_given?
719
- return result
745
+ throw :response, result
720
746
  end
721
747
  rescue ::Gapic::Rest::Error => e
722
748
  raise ::Google::Cloud::Error.from_error(e)
@@ -782,12 +808,13 @@ module Google
782
808
  # Customize the options with defaults
783
809
  call_metadata = @config.rpcs.create_row.metadata.to_h
784
810
 
785
- # Set x-goog-api-client and x-goog-user-project headers
811
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
786
812
  call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
787
813
  lib_name: @config.lib_name, lib_version: @config.lib_version,
788
814
  gapic_version: ::Google::Area120::Tables::V1alpha1::VERSION,
789
815
  transports_version_send: [:rest]
790
816
 
817
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
791
818
  call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
792
819
 
793
820
  options.apply_defaults timeout: @config.rpcs.create_row.timeout,
@@ -800,7 +827,6 @@ module Google
800
827
 
801
828
  @tables_service_stub.create_row request, options do |result, operation|
802
829
  yield result, operation if block_given?
803
- return result
804
830
  end
805
831
  rescue ::Gapic::Rest::Error => e
806
832
  raise ::Google::Cloud::Error.from_error(e)
@@ -865,12 +891,13 @@ module Google
865
891
  # Customize the options with defaults
866
892
  call_metadata = @config.rpcs.batch_create_rows.metadata.to_h
867
893
 
868
- # Set x-goog-api-client and x-goog-user-project headers
894
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
869
895
  call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
870
896
  lib_name: @config.lib_name, lib_version: @config.lib_version,
871
897
  gapic_version: ::Google::Area120::Tables::V1alpha1::VERSION,
872
898
  transports_version_send: [:rest]
873
899
 
900
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
874
901
  call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
875
902
 
876
903
  options.apply_defaults timeout: @config.rpcs.batch_create_rows.timeout,
@@ -883,7 +910,6 @@ module Google
883
910
 
884
911
  @tables_service_stub.batch_create_rows request, options do |result, operation|
885
912
  yield result, operation if block_given?
886
- return result
887
913
  end
888
914
  rescue ::Gapic::Rest::Error => e
889
915
  raise ::Google::Cloud::Error.from_error(e)
@@ -948,12 +974,13 @@ module Google
948
974
  # Customize the options with defaults
949
975
  call_metadata = @config.rpcs.update_row.metadata.to_h
950
976
 
951
- # Set x-goog-api-client and x-goog-user-project headers
977
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
952
978
  call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
953
979
  lib_name: @config.lib_name, lib_version: @config.lib_version,
954
980
  gapic_version: ::Google::Area120::Tables::V1alpha1::VERSION,
955
981
  transports_version_send: [:rest]
956
982
 
983
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
957
984
  call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
958
985
 
959
986
  options.apply_defaults timeout: @config.rpcs.update_row.timeout,
@@ -966,7 +993,6 @@ module Google
966
993
 
967
994
  @tables_service_stub.update_row request, options do |result, operation|
968
995
  yield result, operation if block_given?
969
- return result
970
996
  end
971
997
  rescue ::Gapic::Rest::Error => e
972
998
  raise ::Google::Cloud::Error.from_error(e)
@@ -1031,12 +1057,13 @@ module Google
1031
1057
  # Customize the options with defaults
1032
1058
  call_metadata = @config.rpcs.batch_update_rows.metadata.to_h
1033
1059
 
1034
- # Set x-goog-api-client and x-goog-user-project headers
1060
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
1035
1061
  call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1036
1062
  lib_name: @config.lib_name, lib_version: @config.lib_version,
1037
1063
  gapic_version: ::Google::Area120::Tables::V1alpha1::VERSION,
1038
1064
  transports_version_send: [:rest]
1039
1065
 
1066
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
1040
1067
  call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1041
1068
 
1042
1069
  options.apply_defaults timeout: @config.rpcs.batch_update_rows.timeout,
@@ -1049,7 +1076,6 @@ module Google
1049
1076
 
1050
1077
  @tables_service_stub.batch_update_rows request, options do |result, operation|
1051
1078
  yield result, operation if block_given?
1052
- return result
1053
1079
  end
1054
1080
  rescue ::Gapic::Rest::Error => e
1055
1081
  raise ::Google::Cloud::Error.from_error(e)
@@ -1110,12 +1136,13 @@ module Google
1110
1136
  # Customize the options with defaults
1111
1137
  call_metadata = @config.rpcs.delete_row.metadata.to_h
1112
1138
 
1113
- # Set x-goog-api-client and x-goog-user-project headers
1139
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
1114
1140
  call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1115
1141
  lib_name: @config.lib_name, lib_version: @config.lib_version,
1116
1142
  gapic_version: ::Google::Area120::Tables::V1alpha1::VERSION,
1117
1143
  transports_version_send: [:rest]
1118
1144
 
1145
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
1119
1146
  call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1120
1147
 
1121
1148
  options.apply_defaults timeout: @config.rpcs.delete_row.timeout,
@@ -1128,7 +1155,6 @@ module Google
1128
1155
 
1129
1156
  @tables_service_stub.delete_row request, options do |result, operation|
1130
1157
  yield result, operation if block_given?
1131
- return result
1132
1158
  end
1133
1159
  rescue ::Gapic::Rest::Error => e
1134
1160
  raise ::Google::Cloud::Error.from_error(e)
@@ -1194,12 +1220,13 @@ module Google
1194
1220
  # Customize the options with defaults
1195
1221
  call_metadata = @config.rpcs.batch_delete_rows.metadata.to_h
1196
1222
 
1197
- # Set x-goog-api-client and x-goog-user-project headers
1223
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
1198
1224
  call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1199
1225
  lib_name: @config.lib_name, lib_version: @config.lib_version,
1200
1226
  gapic_version: ::Google::Area120::Tables::V1alpha1::VERSION,
1201
1227
  transports_version_send: [:rest]
1202
1228
 
1229
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
1203
1230
  call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1204
1231
 
1205
1232
  options.apply_defaults timeout: @config.rpcs.batch_delete_rows.timeout,
@@ -1212,7 +1239,6 @@ module Google
1212
1239
 
1213
1240
  @tables_service_stub.batch_delete_rows request, options do |result, operation|
1214
1241
  yield result, operation if block_given?
1215
- return result
1216
1242
  end
1217
1243
  rescue ::Gapic::Rest::Error => e
1218
1244
  raise ::Google::Cloud::Error.from_error(e)
@@ -1292,6 +1318,11 @@ module Google
1292
1318
  # default endpoint URL. The default value of nil uses the environment
1293
1319
  # universe (usually the default "googleapis.com" universe).
1294
1320
  # @return [::String,nil]
1321
+ # @!attribute [rw] logger
1322
+ # A custom logger to use for request/response debug logging, or the value
1323
+ # `:default` (the default) to construct a default logger, or `nil` to
1324
+ # explicitly disable logging.
1325
+ # @return [::Logger,:default,nil]
1295
1326
  #
1296
1327
  class Configuration
1297
1328
  extend ::Gapic::Config
@@ -1313,6 +1344,7 @@ module Google
1313
1344
  config_attr :retry_policy, nil, ::Hash, ::Proc, nil
1314
1345
  config_attr :quota_project, nil, ::String, nil
1315
1346
  config_attr :universe_domain, nil, ::String, nil
1347
+ config_attr :logger, :default, ::Logger, nil, :default
1316
1348
 
1317
1349
  # @private
1318
1350
  def initialize parent_config = nil
@@ -30,7 +30,8 @@ module Google
30
30
  # including transcoding, making the REST call, and deserialing the response.
31
31
  #
32
32
  class ServiceStub
33
- def initialize endpoint:, endpoint_template:, universe_domain:, credentials:
33
+ # @private
34
+ def initialize endpoint:, endpoint_template:, universe_domain:, credentials:, logger:
34
35
  # These require statements are intentionally placed here to initialize
35
36
  # the REST modules only when it's required.
36
37
  require "gapic/rest"
@@ -40,7 +41,9 @@ module Google
40
41
  universe_domain: universe_domain,
41
42
  credentials: credentials,
42
43
  numeric_enums: true,
43
- raise_faraday_errors: false
44
+ service_name: self.class,
45
+ raise_faraday_errors: false,
46
+ logger: logger
44
47
  end
45
48
 
46
49
  ##
@@ -61,6 +64,15 @@ module Google
61
64
  @client_stub.endpoint
62
65
  end
63
66
 
67
+ ##
68
+ # The logger used for request/response debug logging.
69
+ #
70
+ # @return [Logger]
71
+ #
72
+ def logger stub: false
73
+ stub ? @client_stub.stub_logger : @client_stub.logger
74
+ end
75
+
64
76
  ##
65
77
  # Baseline implementation for the get_table REST call
66
78
  #
@@ -87,16 +99,18 @@ module Google
87
99
 
88
100
  response = @client_stub.make_http_request(
89
101
  verb,
90
- uri: uri,
91
- body: body || "",
92
- params: query_string_params,
102
+ uri: uri,
103
+ body: body || "",
104
+ params: query_string_params,
105
+ method_name: "get_table",
93
106
  options: options
94
107
  )
95
108
  operation = ::Gapic::Rest::TransportOperation.new response
96
109
  result = ::Google::Area120::Tables::V1alpha1::Table.decode_json response.body, ignore_unknown_fields: true
97
-
98
- yield result, operation if block_given?
99
- result
110
+ catch :response do
111
+ yield result, operation if block_given?
112
+ result
113
+ end
100
114
  end
101
115
 
102
116
  ##
@@ -125,16 +139,18 @@ module Google
125
139
 
126
140
  response = @client_stub.make_http_request(
127
141
  verb,
128
- uri: uri,
129
- body: body || "",
130
- params: query_string_params,
142
+ uri: uri,
143
+ body: body || "",
144
+ params: query_string_params,
145
+ method_name: "list_tables",
131
146
  options: options
132
147
  )
133
148
  operation = ::Gapic::Rest::TransportOperation.new response
134
149
  result = ::Google::Area120::Tables::V1alpha1::ListTablesResponse.decode_json response.body, ignore_unknown_fields: true
135
-
136
- yield result, operation if block_given?
137
- result
150
+ catch :response do
151
+ yield result, operation if block_given?
152
+ result
153
+ end
138
154
  end
139
155
 
140
156
  ##
@@ -163,16 +179,18 @@ module Google
163
179
 
164
180
  response = @client_stub.make_http_request(
165
181
  verb,
166
- uri: uri,
167
- body: body || "",
168
- params: query_string_params,
182
+ uri: uri,
183
+ body: body || "",
184
+ params: query_string_params,
185
+ method_name: "get_workspace",
169
186
  options: options
170
187
  )
171
188
  operation = ::Gapic::Rest::TransportOperation.new response
172
189
  result = ::Google::Area120::Tables::V1alpha1::Workspace.decode_json response.body, ignore_unknown_fields: true
173
-
174
- yield result, operation if block_given?
175
- result
190
+ catch :response do
191
+ yield result, operation if block_given?
192
+ result
193
+ end
176
194
  end
177
195
 
178
196
  ##
@@ -201,16 +219,18 @@ module Google
201
219
 
202
220
  response = @client_stub.make_http_request(
203
221
  verb,
204
- uri: uri,
205
- body: body || "",
206
- params: query_string_params,
222
+ uri: uri,
223
+ body: body || "",
224
+ params: query_string_params,
225
+ method_name: "list_workspaces",
207
226
  options: options
208
227
  )
209
228
  operation = ::Gapic::Rest::TransportOperation.new response
210
229
  result = ::Google::Area120::Tables::V1alpha1::ListWorkspacesResponse.decode_json response.body, ignore_unknown_fields: true
211
-
212
- yield result, operation if block_given?
213
- result
230
+ catch :response do
231
+ yield result, operation if block_given?
232
+ result
233
+ end
214
234
  end
215
235
 
216
236
  ##
@@ -239,16 +259,18 @@ module Google
239
259
 
240
260
  response = @client_stub.make_http_request(
241
261
  verb,
242
- uri: uri,
243
- body: body || "",
244
- params: query_string_params,
262
+ uri: uri,
263
+ body: body || "",
264
+ params: query_string_params,
265
+ method_name: "get_row",
245
266
  options: options
246
267
  )
247
268
  operation = ::Gapic::Rest::TransportOperation.new response
248
269
  result = ::Google::Area120::Tables::V1alpha1::Row.decode_json response.body, ignore_unknown_fields: true
249
-
250
- yield result, operation if block_given?
251
- result
270
+ catch :response do
271
+ yield result, operation if block_given?
272
+ result
273
+ end
252
274
  end
253
275
 
254
276
  ##
@@ -277,16 +299,18 @@ module Google
277
299
 
278
300
  response = @client_stub.make_http_request(
279
301
  verb,
280
- uri: uri,
281
- body: body || "",
282
- params: query_string_params,
302
+ uri: uri,
303
+ body: body || "",
304
+ params: query_string_params,
305
+ method_name: "list_rows",
283
306
  options: options
284
307
  )
285
308
  operation = ::Gapic::Rest::TransportOperation.new response
286
309
  result = ::Google::Area120::Tables::V1alpha1::ListRowsResponse.decode_json response.body, ignore_unknown_fields: true
287
-
288
- yield result, operation if block_given?
289
- result
310
+ catch :response do
311
+ yield result, operation if block_given?
312
+ result
313
+ end
290
314
  end
291
315
 
292
316
  ##
@@ -315,16 +339,18 @@ module Google
315
339
 
316
340
  response = @client_stub.make_http_request(
317
341
  verb,
318
- uri: uri,
319
- body: body || "",
320
- params: query_string_params,
342
+ uri: uri,
343
+ body: body || "",
344
+ params: query_string_params,
345
+ method_name: "create_row",
321
346
  options: options
322
347
  )
323
348
  operation = ::Gapic::Rest::TransportOperation.new response
324
349
  result = ::Google::Area120::Tables::V1alpha1::Row.decode_json response.body, ignore_unknown_fields: true
325
-
326
- yield result, operation if block_given?
327
- result
350
+ catch :response do
351
+ yield result, operation if block_given?
352
+ result
353
+ end
328
354
  end
329
355
 
330
356
  ##
@@ -353,16 +379,18 @@ module Google
353
379
 
354
380
  response = @client_stub.make_http_request(
355
381
  verb,
356
- uri: uri,
357
- body: body || "",
358
- params: query_string_params,
382
+ uri: uri,
383
+ body: body || "",
384
+ params: query_string_params,
385
+ method_name: "batch_create_rows",
359
386
  options: options
360
387
  )
361
388
  operation = ::Gapic::Rest::TransportOperation.new response
362
389
  result = ::Google::Area120::Tables::V1alpha1::BatchCreateRowsResponse.decode_json response.body, ignore_unknown_fields: true
363
-
364
- yield result, operation if block_given?
365
- result
390
+ catch :response do
391
+ yield result, operation if block_given?
392
+ result
393
+ end
366
394
  end
367
395
 
368
396
  ##
@@ -391,16 +419,18 @@ module Google
391
419
 
392
420
  response = @client_stub.make_http_request(
393
421
  verb,
394
- uri: uri,
395
- body: body || "",
396
- params: query_string_params,
422
+ uri: uri,
423
+ body: body || "",
424
+ params: query_string_params,
425
+ method_name: "update_row",
397
426
  options: options
398
427
  )
399
428
  operation = ::Gapic::Rest::TransportOperation.new response
400
429
  result = ::Google::Area120::Tables::V1alpha1::Row.decode_json response.body, ignore_unknown_fields: true
401
-
402
- yield result, operation if block_given?
403
- result
430
+ catch :response do
431
+ yield result, operation if block_given?
432
+ result
433
+ end
404
434
  end
405
435
 
406
436
  ##
@@ -429,16 +459,18 @@ module Google
429
459
 
430
460
  response = @client_stub.make_http_request(
431
461
  verb,
432
- uri: uri,
433
- body: body || "",
434
- params: query_string_params,
462
+ uri: uri,
463
+ body: body || "",
464
+ params: query_string_params,
465
+ method_name: "batch_update_rows",
435
466
  options: options
436
467
  )
437
468
  operation = ::Gapic::Rest::TransportOperation.new response
438
469
  result = ::Google::Area120::Tables::V1alpha1::BatchUpdateRowsResponse.decode_json response.body, ignore_unknown_fields: true
439
-
440
- yield result, operation if block_given?
441
- result
470
+ catch :response do
471
+ yield result, operation if block_given?
472
+ result
473
+ end
442
474
  end
443
475
 
444
476
  ##
@@ -467,16 +499,18 @@ module Google
467
499
 
468
500
  response = @client_stub.make_http_request(
469
501
  verb,
470
- uri: uri,
471
- body: body || "",
472
- params: query_string_params,
502
+ uri: uri,
503
+ body: body || "",
504
+ params: query_string_params,
505
+ method_name: "delete_row",
473
506
  options: options
474
507
  )
475
508
  operation = ::Gapic::Rest::TransportOperation.new response
476
509
  result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true
477
-
478
- yield result, operation if block_given?
479
- result
510
+ catch :response do
511
+ yield result, operation if block_given?
512
+ result
513
+ end
480
514
  end
481
515
 
482
516
  ##
@@ -505,16 +539,18 @@ module Google
505
539
 
506
540
  response = @client_stub.make_http_request(
507
541
  verb,
508
- uri: uri,
509
- body: body || "",
510
- params: query_string_params,
542
+ uri: uri,
543
+ body: body || "",
544
+ params: query_string_params,
545
+ method_name: "batch_delete_rows",
511
546
  options: options
512
547
  )
513
548
  operation = ::Gapic::Rest::TransportOperation.new response
514
549
  result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true
515
-
516
- yield result, operation if block_given?
517
- result
550
+ catch :response do
551
+ yield result, operation if block_given?
552
+ result
553
+ end
518
554
  end
519
555
 
520
556
  ##
@@ -21,7 +21,7 @@ module Google
21
21
  module Area120
22
22
  module Tables
23
23
  module V1alpha1
24
- VERSION = "0.8.0"
24
+ VERSION = "0.9.0"
25
25
  end
26
26
  end
27
27
  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
@@ -118,6 +121,10 @@ module Google
118
121
  # @return [::String]
119
122
  # Optional link to proto reference documentation. Example:
120
123
  # https://cloud.google.com/pubsub/lite/docs/reference/rpc
124
+ # @!attribute [rw] rest_reference_documentation_uri
125
+ # @return [::String]
126
+ # Optional link to REST reference documentation. Example:
127
+ # https://cloud.google.com/pubsub/lite/docs/reference/rest
121
128
  class Publishing
122
129
  include ::Google::Protobuf::MessageExts
123
130
  extend ::Google::Protobuf::MessageExts::ClassMethods
@@ -192,9 +199,32 @@ module Google
192
199
  # @!attribute [rw] common
193
200
  # @return [::Google::Api::CommonLanguageSettings]
194
201
  # Some settings.
202
+ # @!attribute [rw] experimental_features
203
+ # @return [::Google::Api::PythonSettings::ExperimentalFeatures]
204
+ # Experimental features to be included during client library generation.
195
205
  class PythonSettings
196
206
  include ::Google::Protobuf::MessageExts
197
207
  extend ::Google::Protobuf::MessageExts::ClassMethods
208
+
209
+ # Experimental features to be included during client library generation.
210
+ # These fields will be deprecated once the feature graduates and is enabled
211
+ # by default.
212
+ # @!attribute [rw] rest_async_io_enabled
213
+ # @return [::Boolean]
214
+ # Enables generation of asynchronous REST clients if `rest` transport is
215
+ # enabled. By default, asynchronous REST clients will not be generated.
216
+ # This feature will be enabled by default 1 month after launching the
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.
224
+ class ExperimentalFeatures
225
+ include ::Google::Protobuf::MessageExts
226
+ extend ::Google::Protobuf::MessageExts::ClassMethods
227
+ end
198
228
  end
199
229
 
200
230
  # Settings for Node client libraries.
@@ -276,9 +306,28 @@ module Google
276
306
  # @!attribute [rw] common
277
307
  # @return [::Google::Api::CommonLanguageSettings]
278
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
279
319
  class GoSettings
280
320
  include ::Google::Protobuf::MessageExts
281
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
282
331
  end
283
332
 
284
333
  # Describes the generator configuration for a method.
@@ -286,6 +335,13 @@ module Google
286
335
  # @return [::String]
287
336
  # The fully qualified name of the method, for which the options below apply.
288
337
  # This is used to find the method to apply the options.
338
+ #
339
+ # Example:
340
+ #
341
+ # publishing:
342
+ # method_settings:
343
+ # - selector: google.storage.control.v2.StorageControl.CreateFolder
344
+ # # method settings for CreateFolder...
289
345
  # @!attribute [rw] long_running
290
346
  # @return [::Google::Api::MethodSettings::LongRunning]
291
347
  # Describes settings to use for long-running operations when generating
@@ -294,17 +350,14 @@ module Google
294
350
  #
295
351
  # Example of a YAML configuration::
296
352
  #
297
- # publishing:
298
- # method_settings:
353
+ # publishing:
354
+ # method_settings:
299
355
  # - selector: google.cloud.speech.v2.Speech.BatchRecognize
300
356
  # long_running:
301
- # initial_poll_delay:
302
- # seconds: 60 # 1 minute
357
+ # initial_poll_delay: 60s # 1 minute
303
358
  # poll_delay_multiplier: 1.5
304
- # max_poll_delay:
305
- # seconds: 360 # 6 minutes
306
- # total_poll_timeout:
307
- # seconds: 54000 # 90 minutes
359
+ # max_poll_delay: 360s # 6 minutes
360
+ # total_poll_timeout: 54000s # 90 minutes
308
361
  # @!attribute [rw] auto_populated_fields
309
362
  # @return [::Array<::String>]
310
363
  # List of top-level fields of the request message, that should be
@@ -313,8 +366,8 @@ module Google
313
366
  #
314
367
  # Example of a YAML configuration:
315
368
  #
316
- # publishing:
317
- # method_settings:
369
+ # publishing:
370
+ # method_settings:
318
371
  # - selector: google.example.v1.ExampleService.CreateExample
319
372
  # auto_populated_fields:
320
373
  # - request_id
@@ -350,6 +403,17 @@ module Google
350
403
  end
351
404
  end
352
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
+
353
417
  # The organization for which the client libraries are being published.
354
418
  # Affects the url where generated docs are published, etc.
355
419
  module ClientLibraryOrganization
@@ -124,8 +124,13 @@ module Google
124
124
  # @return [::String]
125
125
  # The plural name used in the resource name and permission names, such as
126
126
  # 'projects' for the resource name of 'projects/\\{project}' and the permission
127
- # name of 'cloudresourcemanager.googleapis.com/projects.get'. It is the same
128
- # concept of the `plural` field in k8s CRD spec
127
+ # name of 'cloudresourcemanager.googleapis.com/projects.get'. One exception
128
+ # to this is for Nested Collections that have stuttering names, as defined
129
+ # in [AIP-122](https://google.aip.dev/122#nested-collections), where the
130
+ # collection ID in the resource name pattern does not necessarily directly
131
+ # match the `plural` value.
132
+ #
133
+ # It is the same concept of the `plural` field in k8s CRD spec
129
134
  # https://kubernetes.io/docs/tasks/access-kubernetes-api/custom-resources/custom-resource-definitions/
130
135
  #
131
136
  # Note: The plural form is required even for singleton resources. See
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: google-area120-tables-v1alpha1
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.8.0
4
+ version: 0.9.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Google LLC
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2024-02-26 00:00:00.000000000 Z
11
+ date: 2024-12-10 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: gapic-common
@@ -16,7 +16,7 @@ dependencies:
16
16
  requirements:
17
17
  - - ">="
18
18
  - !ruby/object:Gem::Version
19
- version: 0.21.1
19
+ version: 0.24.0
20
20
  - - "<"
21
21
  - !ruby/object:Gem::Version
22
22
  version: 2.a
@@ -26,7 +26,7 @@ dependencies:
26
26
  requirements:
27
27
  - - ">="
28
28
  - !ruby/object:Gem::Version
29
- version: 0.21.1
29
+ version: 0.24.0
30
30
  - - "<"
31
31
  - !ruby/object:Gem::Version
32
32
  version: 2.a
@@ -99,7 +99,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
99
99
  - !ruby/object:Gem::Version
100
100
  version: '0'
101
101
  requirements: []
102
- rubygems_version: 3.5.6
102
+ rubygems_version: 3.5.23
103
103
  signing_key:
104
104
  specification_version: 4
105
105
  summary: API Client library for the Area 120 Tables V1alpha1 API