google-cloud-bigtable-v2 0.3.1 → 0.3.5

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: ac30c91605fc285b7f0ae6f6c0d0953b60f036455f6275188c4e08f1287a0cf0
4
- data.tar.gz: e3657d5b51f6a14d9d74bfc5a6b254701d34982d07c6d28cf31451d2a91f16df
3
+ metadata.gz: 3c90c50444567ff4682d49633255ca1d40c05171d436b68fe53dce1a5be39fb2
4
+ data.tar.gz: ddc37a4b38bef15f7edd20a9298058b58d046c146090f2608cde9d7466217470
5
5
  SHA512:
6
- metadata.gz: '095a67d83c4e12d85fbfe2baa86e9c0760e3aabbe2959afc8d2ec348296069ef0b008b9412ce40d3ac605f0e27b781d607b0ea40c82468f9a973ccf6a1734c48'
7
- data.tar.gz: dec8cce78be89b0b9071a87f63573c19f0e6c2da3586e366f1a5055cd69a254443187e4fcf938ebf20c8571f8789957d5057cb40b78156013e50b2f44e6fdc93
6
+ metadata.gz: '08db2e86395447945430a3285bda40bb62de085207e97e9ed3de7debd83143b2fd5985d4d7e27c91211633b17660e00c59a6ed17fca277980abd30b97aa3c395'
7
+ data.tar.gz: 5abf0be8fe9ee217b2668c6d06b1c8ff9d30258cd0a8c39aa3580f9c4faa8fce682994638cdd6797dc37c2c177d2552f087907d1f4f663a63860acd46dd6818b
data/.yardopts CHANGED
@@ -1,5 +1,5 @@
1
1
  --no-private
2
- --title=Cloud Bigtable V2 API
2
+ --title="Cloud Bigtable V2 API"
3
3
  --exclude _pb\.rb$
4
4
  --markup markdown
5
5
  --markup-provider redcarpet
data/AUTHENTICATION.md CHANGED
@@ -66,11 +66,11 @@ The environment variables that google-cloud-bigtable-v2
66
66
  checks for credentials are configured on the service Credentials class (such as
67
67
  {::Google::Cloud::Bigtable::V2::Bigtable::Credentials}):
68
68
 
69
- 1. `BIGTABLE_CREDENTIALS` - Path to JSON file, or JSON contents
70
- 2. `BIGTABLE_KEYFILE` - Path to JSON file, or JSON contents
71
- 3. `GOOGLE_CLOUD_CREDENTIALS` - Path to JSON file, or JSON contents
72
- 4. `GOOGLE_CLOUD_KEYFILE` - Path to JSON file, or JSON contents
73
- 5. `GOOGLE_APPLICATION_CREDENTIALS` - Path to JSON file
69
+ * `BIGTABLE_CREDENTIALS` - Path to JSON file, or JSON contents
70
+ * `BIGTABLE_KEYFILE` - Path to JSON file, or JSON contents
71
+ * `GOOGLE_CLOUD_CREDENTIALS` - Path to JSON file, or JSON contents
72
+ * `GOOGLE_CLOUD_KEYFILE` - Path to JSON file, or JSON contents
73
+ * `GOOGLE_APPLICATION_CREDENTIALS` - Path to JSON file
74
74
 
75
75
  ```ruby
76
76
  require "google/cloud/bigtable/v2"
@@ -82,8 +82,8 @@ client = ::Google::Cloud::Bigtable::V2::Bigtable::Client.new
82
82
 
83
83
  ### Configuration
84
84
 
85
- The **Credentials JSON** can be configured instead of placing them in
86
- environment variables. Either on an individual client initialization:
85
+ The path to the **Credentials JSON** file can be configured instead of storing
86
+ it in an environment variable. Either on an individual client initialization:
87
87
 
88
88
  ```ruby
89
89
  require "google/cloud/bigtable/v2"
@@ -93,7 +93,7 @@ client = ::Google::Cloud::Bigtable::V2::Bigtable::Client.new do |config|
93
93
  end
94
94
  ```
95
95
 
96
- Or configured globally for all clients:
96
+ Or globally for all clients:
97
97
 
98
98
  ```ruby
99
99
  require "google/cloud/bigtable/v2"
@@ -120,15 +120,6 @@ To configure your system for this, simply:
120
120
  **NOTE:** This is _not_ recommended for running in production. The Cloud SDK
121
121
  *should* only be used during development.
122
122
 
123
- [gce-how-to]: https://cloud.google.com/compute/docs/authentication#using
124
- [dev-console]: https://console.cloud.google.com/project
125
-
126
- [enable-apis]: https://raw.githubusercontent.com/GoogleCloudPlatform/gcloud-common/master/authentication/enable-apis.png
127
-
128
- [create-new-service-account]: https://raw.githubusercontent.com/GoogleCloudPlatform/gcloud-common/master/authentication/create-new-service-account.png
129
- [create-new-service-account-existing-keys]: https://raw.githubusercontent.com/GoogleCloudPlatform/gcloud-common/master/authentication/create-new-service-account-existing-keys.png
130
- [reuse-service-account]: https://raw.githubusercontent.com/GoogleCloudPlatform/gcloud-common/master/authentication/reuse-service-account.png
131
-
132
123
  ## Creating a Service Account
133
124
 
134
125
  Google Cloud requires **Service Account Credentials** to
@@ -139,31 +130,22 @@ If you are not running this client within
139
130
  [Google Cloud Platform environments](#google-cloud-platform-environments), you
140
131
  need a Google Developers service account.
141
132
 
142
- 1. Visit the [Google Developers Console][dev-console].
133
+ 1. Visit the [Google Cloud Console](https://console.cloud.google.com/project).
143
134
  2. Create a new project or click on an existing project.
144
- 3. Activate the slide-out navigation tray and select **API Manager**. From
135
+ 3. Activate the menu in the upper left and select **APIs & Services**. From
145
136
  here, you will enable the APIs that your application requires.
146
137
 
147
- ![Enable the APIs that your application requires][enable-apis]
148
-
149
138
  *Note: You may need to enable billing in order to use these services.*
150
139
 
151
140
  4. Select **Credentials** from the side navigation.
152
141
 
153
- You should see a screen like one of the following.
154
-
155
- ![Create a new service account][create-new-service-account]
156
-
157
- ![Create a new service account With Existing Keys][create-new-service-account-existing-keys]
158
-
159
- Find the "Add credentials" drop down and select "Service account" to be
160
- guided through downloading a new JSON key file.
142
+ Find the "Create credentials" drop down near the top of the page, and select
143
+ "Service account" to be guided through downloading a new JSON key file.
161
144
 
162
145
  If you want to re-use an existing service account, you can easily generate a
163
- new key file. Just select the account you wish to re-use, and click "Generate
164
- new JSON key":
165
-
166
- ![Re-use an existing service account][reuse-service-account]
146
+ new key file. Just select the account you wish to re-use, click the pencil
147
+ tool on the right side to edit the service account, select the **Keys** tab,
148
+ and then select **Add Key**.
167
149
 
168
150
  The key file you download will be used by this library to authenticate API
169
151
  requests and should be stored in a secure location.
data/README.md CHANGED
@@ -33,7 +33,7 @@ In order to use this library, you first need to go through the following steps:
33
33
  require "google/cloud/bigtable/v2"
34
34
 
35
35
  client = ::Google::Cloud::Bigtable::V2::Bigtable::Client.new
36
- request = my_create_request
36
+ request = ::Google::Cloud::Bigtable::V2::ReadRowsRequest.new # (request fields as keyword arguments...)
37
37
  response = client.read_rows request
38
38
  ```
39
39
 
@@ -1,8 +1,6 @@
1
1
  # Generated by the protocol buffer compiler. DO NOT EDIT!
2
2
  # source: google/bigtable/v2/bigtable.proto
3
3
 
4
- require 'google/protobuf'
5
-
6
4
  require 'google/api/annotations_pb'
7
5
  require 'google/api/client_pb'
8
6
  require 'google/api/field_behavior_pb'
@@ -10,6 +8,8 @@ require 'google/api/resource_pb'
10
8
  require 'google/bigtable/v2/data_pb'
11
9
  require 'google/protobuf/wrappers_pb'
12
10
  require 'google/rpc/status_pb'
11
+ require 'google/protobuf'
12
+
13
13
  Google::Protobuf::DescriptorPool.generated_pool.build do
14
14
  add_file("google/bigtable/v2/bigtable.proto", :syntax => :proto3) do
15
15
  add_message "google.bigtable.v2.ReadRowsRequest" do
@@ -41,13 +41,12 @@ module Google
41
41
  # See {::Google::Cloud::Bigtable::V2::Bigtable::Client::Configuration}
42
42
  # for a description of the configuration fields.
43
43
  #
44
- # ## Example
44
+ # @example
45
45
  #
46
- # To modify the configuration for all Bigtable clients:
47
- #
48
- # ::Google::Cloud::Bigtable::V2::Bigtable::Client.configure do |config|
49
- # config.timeout = 10.0
50
- # end
46
+ # # Modify the configuration for all Bigtable clients
47
+ # ::Google::Cloud::Bigtable::V2::Bigtable::Client.configure do |config|
48
+ # config.timeout = 10.0
49
+ # end
51
50
  #
52
51
  # @yield [config] Configure the Client client.
53
52
  # @yieldparam config [Client::Configuration]
@@ -67,50 +66,32 @@ module Google
67
66
 
68
67
  default_config.rpcs.read_rows.timeout = 43_200.0
69
68
  default_config.rpcs.read_rows.retry_policy = {
70
- initial_delay: 0.01,
71
- max_delay: 60.0,
72
- multiplier: 2,
73
- retry_codes: []
69
+ initial_delay: 0.01, max_delay: 60.0, multiplier: 2, retry_codes: []
74
70
  }
75
71
 
76
72
  default_config.rpcs.sample_row_keys.timeout = 60.0
77
73
  default_config.rpcs.sample_row_keys.retry_policy = {
78
- initial_delay: 0.01,
79
- max_delay: 60.0,
80
- multiplier: 2,
81
- retry_codes: []
74
+ initial_delay: 0.01, max_delay: 60.0, multiplier: 2, retry_codes: []
82
75
  }
83
76
 
84
77
  default_config.rpcs.mutate_row.timeout = 60.0
85
78
  default_config.rpcs.mutate_row.retry_policy = {
86
- initial_delay: 0.01,
87
- max_delay: 60.0,
88
- multiplier: 2,
89
- retry_codes: [14, 4]
79
+ initial_delay: 0.01, max_delay: 60.0, multiplier: 2, retry_codes: [14, 4]
90
80
  }
91
81
 
92
82
  default_config.rpcs.mutate_rows.timeout = 600.0
93
83
  default_config.rpcs.mutate_rows.retry_policy = {
94
- initial_delay: 0.01,
95
- max_delay: 60.0,
96
- multiplier: 2,
97
- retry_codes: []
84
+ initial_delay: 0.01, max_delay: 60.0, multiplier: 2, retry_codes: []
98
85
  }
99
86
 
100
87
  default_config.rpcs.check_and_mutate_row.timeout = 20.0
101
88
  default_config.rpcs.check_and_mutate_row.retry_policy = {
102
- initial_delay: 0.01,
103
- max_delay: 60.0,
104
- multiplier: 2,
105
- retry_codes: []
89
+ initial_delay: 0.01, max_delay: 60.0, multiplier: 2, retry_codes: []
106
90
  }
107
91
 
108
92
  default_config.rpcs.read_modify_write_row.timeout = 20.0
109
93
  default_config.rpcs.read_modify_write_row.retry_policy = {
110
- initial_delay: 0.01,
111
- max_delay: 60.0,
112
- multiplier: 2,
113
- retry_codes: []
94
+ initial_delay: 0.01, max_delay: 60.0, multiplier: 2, retry_codes: []
114
95
  }
115
96
 
116
97
  default_config
@@ -142,19 +123,15 @@ module Google
142
123
  ##
143
124
  # Create a new Bigtable client object.
144
125
  #
145
- # ## Examples
146
- #
147
- # To create a new Bigtable client with the default
148
- # configuration:
126
+ # @example
149
127
  #
150
- # client = ::Google::Cloud::Bigtable::V2::Bigtable::Client.new
128
+ # # Create a client using the default configuration
129
+ # client = ::Google::Cloud::Bigtable::V2::Bigtable::Client.new
151
130
  #
152
- # To create a new Bigtable client with a custom
153
- # configuration:
154
- #
155
- # client = ::Google::Cloud::Bigtable::V2::Bigtable::Client.new do |config|
156
- # config.timeout = 10.0
157
- # end
131
+ # # Create a client using a custom configuration
132
+ # client = ::Google::Cloud::Bigtable::V2::Bigtable::Client.new do |config|
133
+ # config.timeout = 10.0
134
+ # end
158
135
  #
159
136
  # @yield [config] Configure the Bigtable client.
160
137
  # @yieldparam config [Client::Configuration]
@@ -174,14 +151,13 @@ module Google
174
151
 
175
152
  # Create credentials
176
153
  credentials = @config.credentials
177
- # Use self-signed JWT if the scope and endpoint are unchanged from default,
154
+ # Use self-signed JWT if the endpoint is unchanged from default,
178
155
  # but only if the default endpoint does not have a region prefix.
179
- enable_self_signed_jwt = @config.scope == Client.configure.scope &&
180
- @config.endpoint == Client.configure.endpoint &&
156
+ enable_self_signed_jwt = @config.endpoint == Client.configure.endpoint &&
181
157
  !@config.endpoint.split(".").first.include?("-")
182
158
  credentials ||= Credentials.default scope: @config.scope,
183
159
  enable_self_signed_jwt: enable_self_signed_jwt
184
- if credentials.is_a?(String) || credentials.is_a?(Hash)
160
+ if credentials.is_a?(::String) || credentials.is_a?(::Hash)
185
161
  credentials = Credentials.new credentials, scope: @config.scope
186
162
  end
187
163
  @quota_project_id = @config.quota_project
@@ -244,6 +220,24 @@ module Google
244
220
  #
245
221
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
246
222
  #
223
+ # @example Basic example
224
+ # require "google/cloud/bigtable/v2"
225
+ #
226
+ # # Create a client object. The client can be reused for multiple calls.
227
+ # client = Google::Cloud::Bigtable::V2::Bigtable::Client.new
228
+ #
229
+ # # Create a request. To set request fields, pass in keyword arguments.
230
+ # request = Google::Cloud::Bigtable::V2::ReadRowsRequest.new
231
+ #
232
+ # # Call the read_rows method.
233
+ # result = client.read_rows request
234
+ #
235
+ # # The returned object is a streamed enumerable yielding elements of
236
+ # # type ::Google::Cloud::Bigtable::V2::ReadRowsResponse.
237
+ # result.each do |response|
238
+ # p response
239
+ # end
240
+ #
247
241
  def read_rows request, options = nil
248
242
  raise ::ArgumentError, "request must be provided" if request.nil?
249
243
 
@@ -261,16 +255,20 @@ module Google
261
255
  gapic_version: ::Google::Cloud::Bigtable::V2::VERSION
262
256
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
263
257
 
264
- header_params = {
265
- "table_name" => request.table_name
266
- }
258
+ header_params = {}
259
+ if request.table_name
260
+ header_params["table_name"] = request.table_name
261
+ end
262
+
267
263
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
268
264
  metadata[:"x-goog-request-params"] ||= request_params_header
269
265
 
270
266
  options.apply_defaults timeout: @config.rpcs.read_rows.timeout,
271
267
  metadata: metadata,
272
268
  retry_policy: @config.rpcs.read_rows.retry_policy
273
- options.apply_defaults metadata: @config.metadata,
269
+
270
+ options.apply_defaults timeout: @config.timeout,
271
+ metadata: @config.metadata,
274
272
  retry_policy: @config.retry_policy
275
273
 
276
274
  @bigtable_stub.call_rpc :read_rows, request, options: options do |response, operation|
@@ -318,6 +316,24 @@ module Google
318
316
  #
319
317
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
320
318
  #
319
+ # @example Basic example
320
+ # require "google/cloud/bigtable/v2"
321
+ #
322
+ # # Create a client object. The client can be reused for multiple calls.
323
+ # client = Google::Cloud::Bigtable::V2::Bigtable::Client.new
324
+ #
325
+ # # Create a request. To set request fields, pass in keyword arguments.
326
+ # request = Google::Cloud::Bigtable::V2::SampleRowKeysRequest.new
327
+ #
328
+ # # Call the sample_row_keys method.
329
+ # result = client.sample_row_keys request
330
+ #
331
+ # # The returned object is a streamed enumerable yielding elements of
332
+ # # type ::Google::Cloud::Bigtable::V2::SampleRowKeysResponse.
333
+ # result.each do |response|
334
+ # p response
335
+ # end
336
+ #
321
337
  def sample_row_keys request, options = nil
322
338
  raise ::ArgumentError, "request must be provided" if request.nil?
323
339
 
@@ -335,16 +351,20 @@ module Google
335
351
  gapic_version: ::Google::Cloud::Bigtable::V2::VERSION
336
352
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
337
353
 
338
- header_params = {
339
- "table_name" => request.table_name
340
- }
354
+ header_params = {}
355
+ if request.table_name
356
+ header_params["table_name"] = request.table_name
357
+ end
358
+
341
359
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
342
360
  metadata[:"x-goog-request-params"] ||= request_params_header
343
361
 
344
362
  options.apply_defaults timeout: @config.rpcs.sample_row_keys.timeout,
345
363
  metadata: metadata,
346
364
  retry_policy: @config.rpcs.sample_row_keys.retry_policy
347
- options.apply_defaults metadata: @config.metadata,
365
+
366
+ options.apply_defaults timeout: @config.timeout,
367
+ metadata: @config.metadata,
348
368
  retry_policy: @config.retry_policy
349
369
 
350
370
  @bigtable_stub.call_rpc :sample_row_keys, request, options: options do |response, operation|
@@ -396,6 +416,21 @@ module Google
396
416
  #
397
417
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
398
418
  #
419
+ # @example Basic example
420
+ # require "google/cloud/bigtable/v2"
421
+ #
422
+ # # Create a client object. The client can be reused for multiple calls.
423
+ # client = Google::Cloud::Bigtable::V2::Bigtable::Client.new
424
+ #
425
+ # # Create a request. To set request fields, pass in keyword arguments.
426
+ # request = Google::Cloud::Bigtable::V2::MutateRowRequest.new
427
+ #
428
+ # # Call the mutate_row method.
429
+ # result = client.mutate_row request
430
+ #
431
+ # # The returned object is of type Google::Cloud::Bigtable::V2::MutateRowResponse.
432
+ # p result
433
+ #
399
434
  def mutate_row request, options = nil
400
435
  raise ::ArgumentError, "request must be provided" if request.nil?
401
436
 
@@ -413,16 +448,20 @@ module Google
413
448
  gapic_version: ::Google::Cloud::Bigtable::V2::VERSION
414
449
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
415
450
 
416
- header_params = {
417
- "table_name" => request.table_name
418
- }
451
+ header_params = {}
452
+ if request.table_name
453
+ header_params["table_name"] = request.table_name
454
+ end
455
+
419
456
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
420
457
  metadata[:"x-goog-request-params"] ||= request_params_header
421
458
 
422
459
  options.apply_defaults timeout: @config.rpcs.mutate_row.timeout,
423
460
  metadata: metadata,
424
461
  retry_policy: @config.rpcs.mutate_row.retry_policy
425
- options.apply_defaults metadata: @config.metadata,
462
+
463
+ options.apply_defaults timeout: @config.timeout,
464
+ metadata: @config.metadata,
426
465
  retry_policy: @config.retry_policy
427
466
 
428
467
  @bigtable_stub.call_rpc :mutate_row, request, options: options do |response, operation|
@@ -473,6 +512,24 @@ module Google
473
512
  #
474
513
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
475
514
  #
515
+ # @example Basic example
516
+ # require "google/cloud/bigtable/v2"
517
+ #
518
+ # # Create a client object. The client can be reused for multiple calls.
519
+ # client = Google::Cloud::Bigtable::V2::Bigtable::Client.new
520
+ #
521
+ # # Create a request. To set request fields, pass in keyword arguments.
522
+ # request = Google::Cloud::Bigtable::V2::MutateRowsRequest.new
523
+ #
524
+ # # Call the mutate_rows method.
525
+ # result = client.mutate_rows request
526
+ #
527
+ # # The returned object is a streamed enumerable yielding elements of
528
+ # # type ::Google::Cloud::Bigtable::V2::MutateRowsResponse.
529
+ # result.each do |response|
530
+ # p response
531
+ # end
532
+ #
476
533
  def mutate_rows request, options = nil
477
534
  raise ::ArgumentError, "request must be provided" if request.nil?
478
535
 
@@ -490,16 +547,20 @@ module Google
490
547
  gapic_version: ::Google::Cloud::Bigtable::V2::VERSION
491
548
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
492
549
 
493
- header_params = {
494
- "table_name" => request.table_name
495
- }
550
+ header_params = {}
551
+ if request.table_name
552
+ header_params["table_name"] = request.table_name
553
+ end
554
+
496
555
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
497
556
  metadata[:"x-goog-request-params"] ||= request_params_header
498
557
 
499
558
  options.apply_defaults timeout: @config.rpcs.mutate_rows.timeout,
500
559
  metadata: metadata,
501
560
  retry_policy: @config.rpcs.mutate_rows.retry_policy
502
- options.apply_defaults metadata: @config.metadata,
561
+
562
+ options.apply_defaults timeout: @config.timeout,
563
+ metadata: @config.metadata,
503
564
  retry_policy: @config.retry_policy
504
565
 
505
566
  @bigtable_stub.call_rpc :mutate_rows, request, options: options do |response, operation|
@@ -564,6 +625,21 @@ module Google
564
625
  #
565
626
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
566
627
  #
628
+ # @example Basic example
629
+ # require "google/cloud/bigtable/v2"
630
+ #
631
+ # # Create a client object. The client can be reused for multiple calls.
632
+ # client = Google::Cloud::Bigtable::V2::Bigtable::Client.new
633
+ #
634
+ # # Create a request. To set request fields, pass in keyword arguments.
635
+ # request = Google::Cloud::Bigtable::V2::CheckAndMutateRowRequest.new
636
+ #
637
+ # # Call the check_and_mutate_row method.
638
+ # result = client.check_and_mutate_row request
639
+ #
640
+ # # The returned object is of type Google::Cloud::Bigtable::V2::CheckAndMutateRowResponse.
641
+ # p result
642
+ #
567
643
  def check_and_mutate_row request, options = nil
568
644
  raise ::ArgumentError, "request must be provided" if request.nil?
569
645
 
@@ -581,16 +657,20 @@ module Google
581
657
  gapic_version: ::Google::Cloud::Bigtable::V2::VERSION
582
658
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
583
659
 
584
- header_params = {
585
- "table_name" => request.table_name
586
- }
660
+ header_params = {}
661
+ if request.table_name
662
+ header_params["table_name"] = request.table_name
663
+ end
664
+
587
665
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
588
666
  metadata[:"x-goog-request-params"] ||= request_params_header
589
667
 
590
668
  options.apply_defaults timeout: @config.rpcs.check_and_mutate_row.timeout,
591
669
  metadata: metadata,
592
670
  retry_policy: @config.rpcs.check_and_mutate_row.retry_policy
593
- options.apply_defaults metadata: @config.metadata,
671
+
672
+ options.apply_defaults timeout: @config.timeout,
673
+ metadata: @config.metadata,
594
674
  retry_policy: @config.retry_policy
595
675
 
596
676
  @bigtable_stub.call_rpc :check_and_mutate_row, request, options: options do |response, operation|
@@ -646,6 +726,21 @@ module Google
646
726
  #
647
727
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
648
728
  #
729
+ # @example Basic example
730
+ # require "google/cloud/bigtable/v2"
731
+ #
732
+ # # Create a client object. The client can be reused for multiple calls.
733
+ # client = Google::Cloud::Bigtable::V2::Bigtable::Client.new
734
+ #
735
+ # # Create a request. To set request fields, pass in keyword arguments.
736
+ # request = Google::Cloud::Bigtable::V2::ReadModifyWriteRowRequest.new
737
+ #
738
+ # # Call the read_modify_write_row method.
739
+ # result = client.read_modify_write_row request
740
+ #
741
+ # # The returned object is of type Google::Cloud::Bigtable::V2::ReadModifyWriteRowResponse.
742
+ # p result
743
+ #
649
744
  def read_modify_write_row request, options = nil
650
745
  raise ::ArgumentError, "request must be provided" if request.nil?
651
746
 
@@ -663,16 +758,20 @@ module Google
663
758
  gapic_version: ::Google::Cloud::Bigtable::V2::VERSION
664
759
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
665
760
 
666
- header_params = {
667
- "table_name" => request.table_name
668
- }
761
+ header_params = {}
762
+ if request.table_name
763
+ header_params["table_name"] = request.table_name
764
+ end
765
+
669
766
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
670
767
  metadata[:"x-goog-request-params"] ||= request_params_header
671
768
 
672
769
  options.apply_defaults timeout: @config.rpcs.read_modify_write_row.timeout,
673
770
  metadata: metadata,
674
771
  retry_policy: @config.rpcs.read_modify_write_row.retry_policy
675
- options.apply_defaults metadata: @config.metadata,
772
+
773
+ options.apply_defaults timeout: @config.timeout,
774
+ metadata: @config.metadata,
676
775
  retry_policy: @config.retry_policy
677
776
 
678
777
  @bigtable_stub.call_rpc :read_modify_write_row, request, options: options do |response, operation|
@@ -696,22 +795,21 @@ module Google
696
795
  # Configuration can be applied globally to all clients, or to a single client
697
796
  # on construction.
698
797
  #
699
- # # Examples
700
- #
701
- # To modify the global config, setting the timeout for read_rows
702
- # to 20 seconds, and all remaining timeouts to 10 seconds:
703
- #
704
- # ::Google::Cloud::Bigtable::V2::Bigtable::Client.configure do |config|
705
- # config.timeout = 10.0
706
- # config.rpcs.read_rows.timeout = 20.0
707
- # end
708
- #
709
- # To apply the above configuration only to a new client:
710
- #
711
- # client = ::Google::Cloud::Bigtable::V2::Bigtable::Client.new do |config|
712
- # config.timeout = 10.0
713
- # config.rpcs.read_rows.timeout = 20.0
714
- # end
798
+ # @example
799
+ #
800
+ # # Modify the global config, setting the timeout for
801
+ # # read_rows to 20 seconds,
802
+ # # and all remaining timeouts to 10 seconds.
803
+ # ::Google::Cloud::Bigtable::V2::Bigtable::Client.configure do |config|
804
+ # config.timeout = 10.0
805
+ # config.rpcs.read_rows.timeout = 20.0
806
+ # end
807
+ #
808
+ # # Apply the above configuration only to a new client.
809
+ # client = ::Google::Cloud::Bigtable::V2::Bigtable::Client.new do |config|
810
+ # config.timeout = 10.0
811
+ # config.rpcs.read_rows.timeout = 20.0
812
+ # end
715
813
  #
716
814
  # @!attribute [rw] endpoint
717
815
  # The hostname or hostname:port of the service endpoint.
@@ -21,7 +21,7 @@ module Google
21
21
  module Cloud
22
22
  module Bigtable
23
23
  module V2
24
- VERSION = "0.3.1"
24
+ VERSION = "0.3.5"
25
25
  end
26
26
  end
27
27
  end
@@ -57,9 +57,15 @@ module Google
57
57
 
58
58
  # Denotes that a (repeated) field is an unordered list.
59
59
  # This indicates that the service may provide the elements of the list
60
- # in any arbitrary order, rather than the order the user originally
60
+ # in any arbitrary order, rather than the order the user originally
61
61
  # provided. Additionally, the list's order may or may not be stable.
62
62
  UNORDERED_LIST = 6
63
+
64
+ # Denotes that this field returns a non-empty default value if not set.
65
+ # This indicates that if the user provides the empty value in a request,
66
+ # a non-empty value will be returned. The user will not be aware of what
67
+ # non-empty value to expect.
68
+ NON_EMPTY_DEFAULT = 7
63
69
  end
64
70
  end
65
71
  end
@@ -33,11 +33,7 @@ module Google
33
33
  # // For Kubernetes resources, the format is {api group}/{kind}.
34
34
  # option (google.api.resource) = {
35
35
  # type: "pubsub.googleapis.com/Topic"
36
- # name_descriptor: {
37
- # pattern: "projects/{project}/topics/{topic}"
38
- # parent_type: "cloudresourcemanager.googleapis.com/Project"
39
- # parent_name_extractor: "projects/{project}"
40
- # }
36
+ # pattern: "projects/{project}/topics/{topic}"
41
37
  # };
42
38
  # }
43
39
  #
@@ -45,10 +41,7 @@ module Google
45
41
  #
46
42
  # resources:
47
43
  # - type: "pubsub.googleapis.com/Topic"
48
- # name_descriptor:
49
- # - pattern: "projects/{project}/topics/{topic}"
50
- # parent_type: "cloudresourcemanager.googleapis.com/Project"
51
- # parent_name_extractor: "projects/{project}"
44
+ # pattern: "projects/{project}/topics/{topic}"
52
45
  #
53
46
  # Sometimes, resources have multiple patterns, typically because they can
54
47
  # live under multiple parents.
@@ -58,26 +51,10 @@ module Google
58
51
  # message LogEntry {
59
52
  # option (google.api.resource) = {
60
53
  # type: "logging.googleapis.com/LogEntry"
61
- # name_descriptor: {
62
- # pattern: "projects/{project}/logs/{log}"
63
- # parent_type: "cloudresourcemanager.googleapis.com/Project"
64
- # parent_name_extractor: "projects/{project}"
65
- # }
66
- # name_descriptor: {
67
- # pattern: "folders/{folder}/logs/{log}"
68
- # parent_type: "cloudresourcemanager.googleapis.com/Folder"
69
- # parent_name_extractor: "folders/{folder}"
70
- # }
71
- # name_descriptor: {
72
- # pattern: "organizations/{organization}/logs/{log}"
73
- # parent_type: "cloudresourcemanager.googleapis.com/Organization"
74
- # parent_name_extractor: "organizations/{organization}"
75
- # }
76
- # name_descriptor: {
77
- # pattern: "billingAccounts/{billing_account}/logs/{log}"
78
- # parent_type: "billing.googleapis.com/BillingAccount"
79
- # parent_name_extractor: "billingAccounts/{billing_account}"
80
- # }
54
+ # pattern: "projects/{project}/logs/{log}"
55
+ # pattern: "folders/{folder}/logs/{log}"
56
+ # pattern: "organizations/{organization}/logs/{log}"
57
+ # pattern: "billingAccounts/{billing_account}/logs/{log}"
81
58
  # };
82
59
  # }
83
60
  #
@@ -85,48 +62,10 @@ module Google
85
62
  #
86
63
  # resources:
87
64
  # - type: 'logging.googleapis.com/LogEntry'
88
- # name_descriptor:
89
- # - pattern: "projects/{project}/logs/{log}"
90
- # parent_type: "cloudresourcemanager.googleapis.com/Project"
91
- # parent_name_extractor: "projects/{project}"
92
- # - pattern: "folders/{folder}/logs/{log}"
93
- # parent_type: "cloudresourcemanager.googleapis.com/Folder"
94
- # parent_name_extractor: "folders/{folder}"
95
- # - pattern: "organizations/{organization}/logs/{log}"
96
- # parent_type: "cloudresourcemanager.googleapis.com/Organization"
97
- # parent_name_extractor: "organizations/{organization}"
98
- # - pattern: "billingAccounts/{billing_account}/logs/{log}"
99
- # parent_type: "billing.googleapis.com/BillingAccount"
100
- # parent_name_extractor: "billingAccounts/{billing_account}"
101
- #
102
- # For flexible resources, the resource name doesn't contain parent names, but
103
- # the resource itself has parents for policy evaluation.
104
- #
105
- # Example:
106
- #
107
- # message Shelf {
108
- # option (google.api.resource) = {
109
- # type: "library.googleapis.com/Shelf"
110
- # name_descriptor: {
111
- # pattern: "shelves/{shelf}"
112
- # parent_type: "cloudresourcemanager.googleapis.com/Project"
113
- # }
114
- # name_descriptor: {
115
- # pattern: "shelves/{shelf}"
116
- # parent_type: "cloudresourcemanager.googleapis.com/Folder"
117
- # }
118
- # };
119
- # }
120
- #
121
- # The ResourceDescriptor Yaml config will look like:
122
- #
123
- # resources:
124
- # - type: 'library.googleapis.com/Shelf'
125
- # name_descriptor:
126
- # - pattern: "shelves/{shelf}"
127
- # parent_type: "cloudresourcemanager.googleapis.com/Project"
128
- # - pattern: "shelves/{shelf}"
129
- # parent_type: "cloudresourcemanager.googleapis.com/Folder"
65
+ # pattern: "projects/{project}/logs/{log}"
66
+ # pattern: "folders/{folder}/logs/{log}"
67
+ # pattern: "organizations/{organization}/logs/{log}"
68
+ # pattern: "billingAccounts/{billing_account}/logs/{log}"
130
69
  # @!attribute [rw] type
131
70
  # @return [::String]
132
71
  # The resource type. It must be in the format of
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: google-cloud-bigtable-v2
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.1
4
+ version: 0.3.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Google LLC
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-06-17 00:00:00.000000000 Z
11
+ date: 2022-01-11 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.5'
19
+ version: '0.7'
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.5'
29
+ version: '0.7'
30
30
  - - "<"
31
31
  - !ruby/object:Gem::Version
32
32
  version: 2.a
@@ -207,7 +207,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
207
207
  - !ruby/object:Gem::Version
208
208
  version: '0'
209
209
  requirements: []
210
- rubygems_version: 3.2.17
210
+ rubygems_version: 3.3.4
211
211
  signing_key:
212
212
  specification_version: 4
213
213
  summary: API Client library for the Cloud Bigtable V2 API