google-cloud-bigtable 1.2.2 → 2.2.1

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.
Files changed (88) hide show
  1. checksums.yaml +4 -4
  2. data/AUTHENTICATION.md +1 -1
  3. data/CHANGELOG.md +57 -0
  4. data/CONTRIBUTING.md +1 -1
  5. data/OVERVIEW.md +4 -4
  6. data/lib/google-cloud-bigtable.rb +30 -27
  7. data/lib/google/cloud/bigtable.rb +18 -26
  8. data/lib/google/cloud/bigtable/app_profile.rb +3 -3
  9. data/lib/google/cloud/bigtable/app_profile/list.rb +6 -4
  10. data/lib/google/cloud/bigtable/backup.rb +445 -0
  11. data/lib/google/cloud/bigtable/backup/job.rb +87 -0
  12. data/lib/google/cloud/bigtable/backup/list.rb +167 -0
  13. data/lib/google/cloud/bigtable/chunk_processor.rb +1 -1
  14. data/lib/google/cloud/bigtable/cluster.rb +101 -2
  15. data/lib/google/cloud/bigtable/cluster/list.rb +2 -2
  16. data/lib/google/cloud/bigtable/column_family.rb +2 -2
  17. data/lib/google/cloud/bigtable/column_family_map.rb +11 -11
  18. data/lib/google/cloud/bigtable/column_range.rb +2 -2
  19. data/lib/google/cloud/bigtable/credentials.rb +36 -2
  20. data/lib/google/cloud/bigtable/gc_rule.rb +7 -7
  21. data/lib/google/cloud/bigtable/instance.rb +8 -8
  22. data/lib/google/cloud/bigtable/instance/cluster_map.rb +1 -1
  23. data/lib/google/cloud/bigtable/instance/list.rb +2 -2
  24. data/lib/google/cloud/bigtable/longrunning_job.rb +13 -2
  25. data/lib/google/cloud/bigtable/mutation_entry.rb +16 -15
  26. data/lib/google/cloud/bigtable/mutation_operations.rb +6 -6
  27. data/lib/google/cloud/bigtable/project.rb +1 -1
  28. data/lib/google/cloud/bigtable/read_modify_write_rule.rb +2 -2
  29. data/lib/google/cloud/bigtable/read_operations.rb +2 -2
  30. data/lib/google/cloud/bigtable/routing_policy.rb +2 -2
  31. data/lib/google/cloud/bigtable/row_filter/chain_filter.rb +3 -3
  32. data/lib/google/cloud/bigtable/row_filter/condition_filter.rb +3 -3
  33. data/lib/google/cloud/bigtable/row_filter/interleave_filter.rb +3 -3
  34. data/lib/google/cloud/bigtable/row_filter/simple_filter.rb +3 -3
  35. data/lib/google/cloud/bigtable/row_range.rb +2 -2
  36. data/lib/google/cloud/bigtable/rows_mutator.rb +3 -3
  37. data/lib/google/cloud/bigtable/rows_reader.rb +10 -10
  38. data/lib/google/cloud/bigtable/sample_row_key.rb +2 -2
  39. data/lib/google/cloud/bigtable/service.rb +282 -245
  40. data/lib/google/cloud/bigtable/table.rb +5 -4
  41. data/lib/google/cloud/bigtable/table/cluster_state.rb +27 -6
  42. data/lib/google/cloud/bigtable/table/list.rb +2 -2
  43. data/lib/google/cloud/bigtable/table/restore_job.rb +117 -0
  44. data/lib/google/cloud/bigtable/value_range.rb +2 -2
  45. data/lib/google/cloud/bigtable/version.rb +1 -1
  46. metadata +16 -94
  47. data/lib/google/bigtable/admin/v2/bigtable_instance_admin_pb.rb +0 -145
  48. data/lib/google/bigtable/admin/v2/bigtable_instance_admin_services_pb.rb +0 -90
  49. data/lib/google/bigtable/admin/v2/bigtable_table_admin_pb.rb +0 -208
  50. data/lib/google/bigtable/admin/v2/bigtable_table_admin_services_pb.rb +0 -154
  51. data/lib/google/bigtable/admin/v2/common_pb.rb +0 -30
  52. data/lib/google/bigtable/admin/v2/instance_pb.rb +0 -74
  53. data/lib/google/bigtable/admin/v2/table_pb.rb +0 -127
  54. data/lib/google/bigtable/v2/bigtable_pb.rb +0 -113
  55. data/lib/google/bigtable/v2/bigtable_services_pb.rb +0 -68
  56. data/lib/google/bigtable/v2/data_pb.rb +0 -156
  57. data/lib/google/cloud/bigtable/admin.rb +0 -202
  58. data/lib/google/cloud/bigtable/admin/credentials.rb +0 -27
  59. data/lib/google/cloud/bigtable/admin/v2.rb +0 -223
  60. data/lib/google/cloud/bigtable/admin/v2/bigtable_instance_admin_client.rb +0 -1451
  61. data/lib/google/cloud/bigtable/admin/v2/bigtable_instance_admin_client_config.json +0 -139
  62. data/lib/google/cloud/bigtable/admin/v2/bigtable_table_admin_client.rb +0 -1734
  63. data/lib/google/cloud/bigtable/admin/v2/bigtable_table_admin_client_config.json +0 -163
  64. data/lib/google/cloud/bigtable/admin/v2/credentials.rb +0 -51
  65. data/lib/google/cloud/bigtable/admin/v2/doc/google/bigtable/admin/v2/bigtable_instance_admin.rb +0 -297
  66. data/lib/google/cloud/bigtable/admin/v2/doc/google/bigtable/admin/v2/bigtable_table_admin.rb +0 -587
  67. data/lib/google/cloud/bigtable/admin/v2/doc/google/bigtable/admin/v2/instance.rb +0 -193
  68. data/lib/google/cloud/bigtable/admin/v2/doc/google/bigtable/admin/v2/table.rb +0 -303
  69. data/lib/google/cloud/bigtable/admin/v2/doc/google/iam/v1/iam_policy.rb +0 -64
  70. data/lib/google/cloud/bigtable/admin/v2/doc/google/iam/v1/options.rb +0 -33
  71. data/lib/google/cloud/bigtable/admin/v2/doc/google/iam/v1/policy.rb +0 -151
  72. data/lib/google/cloud/bigtable/admin/v2/doc/google/longrunning/operations.rb +0 -51
  73. data/lib/google/cloud/bigtable/admin/v2/doc/google/protobuf/any.rb +0 -131
  74. data/lib/google/cloud/bigtable/admin/v2/doc/google/protobuf/duration.rb +0 -91
  75. data/lib/google/cloud/bigtable/admin/v2/doc/google/protobuf/empty.rb +0 -29
  76. data/lib/google/cloud/bigtable/admin/v2/doc/google/protobuf/field_mask.rb +0 -222
  77. data/lib/google/cloud/bigtable/admin/v2/doc/google/protobuf/timestamp.rb +0 -113
  78. data/lib/google/cloud/bigtable/admin/v2/doc/google/rpc/status.rb +0 -39
  79. data/lib/google/cloud/bigtable/admin/v2/doc/google/type/expr.rb +0 -45
  80. data/lib/google/cloud/bigtable/v2.rb +0 -146
  81. data/lib/google/cloud/bigtable/v2/bigtable_client.rb +0 -591
  82. data/lib/google/cloud/bigtable/v2/bigtable_client_config.json +0 -83
  83. data/lib/google/cloud/bigtable/v2/credentials.rb +0 -46
  84. data/lib/google/cloud/bigtable/v2/doc/google/bigtable/v2/bigtable.rb +0 -290
  85. data/lib/google/cloud/bigtable/v2/doc/google/bigtable/v2/data.rb +0 -493
  86. data/lib/google/cloud/bigtable/v2/doc/google/protobuf/any.rb +0 -131
  87. data/lib/google/cloud/bigtable/v2/doc/google/protobuf/wrappers.rb +0 -34
  88. data/lib/google/cloud/bigtable/v2/doc/google/rpc/status.rb +0 -39
@@ -56,7 +56,7 @@ module Google
56
56
  # @param family [String] Column family name.
57
57
  #
58
58
  def initialize family
59
- @grpc = Google::Bigtable::V2::ColumnRange.new family_name: family
59
+ @grpc = Google::Cloud::Bigtable::V2::ColumnRange.new family_name: family
60
60
  end
61
61
 
62
62
  ##
@@ -183,7 +183,7 @@ module Google
183
183
 
184
184
  # @private
185
185
  #
186
- # @return [Google::Bigtable::V2::ColumnRange]
186
+ # @return [Google::Cloud::Bigtable::V2::ColumnRange]
187
187
  #
188
188
  def to_grpc
189
189
  @grpc
@@ -13,12 +13,46 @@
13
13
  # limitations under the License.
14
14
 
15
15
 
16
- require "google/cloud/bigtable/v2/credentials"
16
+ require "google/cloud/bigtable/v2/bigtable/credentials"
17
17
 
18
18
  module Google
19
19
  module Cloud
20
20
  module Bigtable
21
- class Credentials < Google::Cloud::Bigtable::V2::Credentials
21
+ ##
22
+ # # Credentials
23
+ #
24
+ # Represents the authentication and authorization used to connect to the
25
+ # Bigtable API.
26
+ #
27
+ # @example
28
+ # require "google/cloud/bigtable"
29
+ #
30
+ # keyfile = "/path/to/keyfile.json"
31
+ # creds = Google::Cloud::Bigtable::Credentials.new keyfile
32
+ #
33
+ # bigtable = Google::Cloud::Bigtable.new(
34
+ # project_id: "my-project",
35
+ # credentials: creds
36
+ # )
37
+ #
38
+ # bigtable.project_id #=> "my-project"
39
+ #
40
+ class Credentials < Google::Cloud::Bigtable::V2::Bigtable::Credentials
41
+ self.scope = [
42
+ "https://www.googleapis.com/auth/bigtable.admin",
43
+ "https://www.googleapis.com/auth/bigtable.admin.cluster",
44
+ "https://www.googleapis.com/auth/bigtable.admin.instance",
45
+ "https://www.googleapis.com/auth/bigtable.admin.table",
46
+ "https://www.googleapis.com/auth/bigtable.data",
47
+ "https://www.googleapis.com/auth/bigtable.data.readonly",
48
+ "https://www.googleapis.com/auth/cloud-bigtable.admin",
49
+ "https://www.googleapis.com/auth/cloud-bigtable.admin.cluster",
50
+ "https://www.googleapis.com/auth/cloud-bigtable.admin.table",
51
+ "https://www.googleapis.com/auth/cloud-bigtable.data",
52
+ "https://www.googleapis.com/auth/cloud-bigtable.data.readonly",
53
+ "https://www.googleapis.com/auth/cloud-platform",
54
+ "https://www.googleapis.com/auth/cloud-platform.read-only"
55
+ ]
22
56
  end
23
57
  end
24
58
  end
@@ -66,10 +66,10 @@ module Google
66
66
  # @private
67
67
  # Creates a new GC Rule instance.
68
68
  #
69
- # @param grpc [Google::Bigtable::Admin::V2::GcRule | nil]
69
+ # @param grpc [Google::Cloud::Bigtable::Admin::V2::GcRule | nil]
70
70
  #
71
71
  def initialize grpc = nil
72
- @grpc = grpc || Google::Bigtable::Admin::V2::GcRule.new
72
+ @grpc = grpc || Google::Cloud::Bigtable::Admin::V2::GcRule.new
73
73
  end
74
74
 
75
75
  ##
@@ -146,7 +146,7 @@ module Google
146
146
  # List of GcRule with nested rules.
147
147
  #
148
148
  def intersection= rules
149
- @grpc.intersection = Google::Bigtable::Admin::V2::GcRule::Intersection.new rules: rules.map(&:to_grpc)
149
+ @grpc.intersection = Google::Cloud::Bigtable::Admin::V2::GcRule::Intersection.new rules: rules.map(&:to_grpc)
150
150
  end
151
151
 
152
152
  ##
@@ -186,7 +186,7 @@ module Google
186
186
  # List of GcRule with nested rules.
187
187
  #
188
188
  def union= rules
189
- @grpc.union = Google::Bigtable::Admin::V2::GcRule::Union.new rules: rules.map(&:to_grpc)
189
+ @grpc.union = Google::Cloud::Bigtable::Admin::V2::GcRule::Union.new rules: rules.map(&:to_grpc)
190
190
  end
191
191
 
192
192
  ##
@@ -314,7 +314,7 @@ module Google
314
314
 
315
315
  # @private
316
316
  # Get gRPC instance of GC Rule
317
- # @return [Google::Bigtable::Admin::V2::GcRule]
317
+ # @return [Google::Cloud::Bigtable::Admin::V2::GcRule]
318
318
  def to_grpc
319
319
  @grpc
320
320
  end
@@ -322,8 +322,8 @@ module Google
322
322
  # @private
323
323
  #
324
324
  # Creates a new GcRule instance from a
325
- # Google::Bigtable::Admin::V2::GcRule.
326
- # @param grpc [Google::Bigtable::Admin::V2::GcRule]
325
+ # Google::Cloud::Bigtable::Admin::V2::GcRule.
326
+ # @param grpc [Google::Cloud::Bigtable::Admin::V2::GcRule]
327
327
  # @return [Google::Cloud::Bigtable::GcRule]
328
328
  def self.from_grpc grpc
329
329
  new grpc
@@ -431,7 +431,7 @@ module Google
431
431
  location: location
432
432
  }.delete_if { |_, v| v.nil? }
433
433
 
434
- cluster = Google::Bigtable::Admin::V2::Cluster.new attrs
434
+ cluster = Google::Cloud::Bigtable::Admin::V2::Cluster.new attrs
435
435
  grpc = service.create_cluster instance_id, cluster_id, cluster
436
436
  Cluster::Job.from_grpc grpc, service
437
437
  end
@@ -509,8 +509,8 @@ module Google
509
509
  #
510
510
  # entry = table.new_mutation_entry("user-1")
511
511
  # entry.set_cell(
512
- # "cf-1",
513
- # "field-1",
512
+ # "cf1",
513
+ # "field1",
514
514
  # "XYZ",
515
515
  # timestamp: (Time.now.to_f * 1000000).round(-3) # microseconds
516
516
  # ).delete_cells("cf2", "field02")
@@ -566,7 +566,7 @@ module Google
566
566
  # * Tablet 3 : `[customer_1, customer_2) => {"customer_1"}`
567
567
  # * Tablet 4 : `[customer_2, other) => {"customer_2"}`
568
568
  # * Tablet 5 : `[other, ) => {"other", "zz"}`
569
- # A hash in the form of `Google::Bigtable::Admin::V2::CreateTableRequest::Split`
569
+ # A hash in the form of `Google::Cloud::Bigtable::Admin::V2::CreateTableRequest::Split`
570
570
  # can also be provided.
571
571
  # @yield [column_families] A block for adding column families.
572
572
  # @yieldparam [Google::Cloud::Bigtable::ColumnFamilyMap] column_families
@@ -709,7 +709,7 @@ module Google
709
709
  def create_app_profile name, routing_policy, description: nil, etag: nil, ignore_warnings: false
710
710
  ensure_service!
711
711
  routing_policy_grpc = routing_policy.to_grpc
712
- if routing_policy_grpc.is_a? Google::Bigtable::Admin::V2::AppProfile::MultiClusterRoutingUseAny
712
+ if routing_policy_grpc.is_a? Google::Cloud::Bigtable::Admin::V2::AppProfile::MultiClusterRoutingUseAny
713
713
  multi_cluster_routing = routing_policy_grpc
714
714
  else
715
715
  single_cluster_routing = routing_policy_grpc
@@ -725,7 +725,7 @@ module Google
725
725
  grpc = service.create_app_profile(
726
726
  instance_id,
727
727
  name,
728
- Google::Bigtable::Admin::V2::AppProfile.new(app_profile_attrs),
728
+ Google::Cloud::Bigtable::Admin::V2::AppProfile.new(app_profile_attrs),
729
729
  ignore_warnings: ignore_warnings
730
730
  )
731
731
  AppProfile.from_grpc grpc, service
@@ -909,9 +909,9 @@ module Google
909
909
  # @private
910
910
  #
911
911
  # Creates a new Instance instance from a
912
- # Google::Bigtable::Admin::V2::Instance.
912
+ # Google::Cloud::Bigtable::Admin::V2::Instance.
913
913
  #
914
- # @param grpc [Google::Bigtable::Admin::V2::Instance]
914
+ # @param grpc [Google::Cloud::Bigtable::Admin::V2::Instance]
915
915
  # @param service [Google::Cloud::Bigtable::Service]
916
916
  # @return [Google::Cloud::Bigtable::Instance]
917
917
  #
@@ -65,7 +65,7 @@ module Google
65
65
  default_storage_type: storage_type
66
66
  }.delete_if { |_, v| v.nil? }
67
67
 
68
- self[name] = Google::Bigtable::Admin::V2::Cluster.new attrs
68
+ self[name] = Google::Cloud::Bigtable::Admin::V2::Cluster.new attrs
69
69
  end
70
70
  end
71
71
  end
@@ -106,7 +106,7 @@ module Google
106
106
  # @yield [instance] The block for accessing each instance.
107
107
  # @yieldparam [Instance] instance The instance object.
108
108
  #
109
- # @return [Enumerator]
109
+ # @return [Enumerator,nil] An enumerator is returned if no block is given, otherwise `nil`.
110
110
  #
111
111
  # @example Iterating each instance by passing a block:
112
112
  # require "google/cloud/bigtable"
@@ -138,7 +138,7 @@ module Google
138
138
  end
139
139
 
140
140
  # @private
141
- # New Instance::List from a Google::Bigtable::Admin::V2::Instance object.
141
+ # New Instance::List from a Google::Cloud::Bigtable::Admin::V2::Instance object.
142
142
  def self.from_grpc grpc, service
143
143
  instances = List.new(Array(grpc.instances).map do |instance|
144
144
  Instance.from_grpc instance, service
@@ -29,7 +29,7 @@ module Google
29
29
  #
30
30
  class LongrunningJob
31
31
  # @private
32
- # The Google::Gax::Operation gRPC object.
32
+ # The Gapic::Operation gRPC object.
33
33
  attr_accessor :grpc
34
34
 
35
35
  # @private
@@ -97,8 +97,19 @@ module Google
97
97
  @grpc.wait_until_done!
98
98
  end
99
99
 
100
+ ##
101
+ # @private Gets the metadata object of the operation.
102
+ #
103
+ # @return [Object, nil] `nil` if the operation is not complete.
104
+ #
105
+ def metadata
106
+ return nil unless done?
107
+ return nil unless @grpc.grpc_op.result == :response
108
+ @grpc.metadata
109
+ end
110
+
100
111
  # @private
101
- # New BasicJob from a Google::Gax::Operation object.
112
+ # New BasicJob from a Gapic::Operation object.
102
113
  def self.from_grpc grpc, service
103
114
  new.tap do |job|
104
115
  job.grpc = grpc
@@ -59,7 +59,7 @@ module Google
59
59
 
60
60
  # @private
61
61
  # mutations gRPC list
62
- # @return [Array<Google::Bigtable::V2::Mutation>]
62
+ # @return [Array<Google::Cloud::Bigtable::V2::Mutation>]
63
63
  attr_accessor :mutations
64
64
 
65
65
  ##
@@ -104,8 +104,8 @@ module Google
104
104
  # @example With timestamp.
105
105
  # entry = Google::Cloud::Bigtable::MutationEntry.new("user-1")
106
106
  # entry.set_cell(
107
- # "cf-1",
108
- # "field-1",
107
+ # "cf1",
108
+ # "field1",
109
109
  # "XYZ",
110
110
  # timestamp: (Time.now.to_f * 1000000).round(-3) # microseconds
111
111
  # )
@@ -123,7 +123,7 @@ module Google
123
123
  options[:timestamp_micros] = timestamp
124
124
  @retryable = timestamp != -1
125
125
  end
126
- @mutations << Google::Bigtable::V2::Mutation.new(set_cell: options)
126
+ @mutations << Google::Cloud::Bigtable::V2::Mutation.new(set_cell: options)
127
127
  self
128
128
  end
129
129
 
@@ -156,14 +156,14 @@ module Google
156
156
  #
157
157
  # @example Without timestamp range.
158
158
  # entry = Google::Cloud::Bigtable::MutationEntry.new("user-1")
159
- # entry.delete_cells("cf-1", "field-1")
159
+ # entry.delete_cells("cf1", "field1")
160
160
  #
161
161
  # @example With timestamp range.
162
162
  # entry = Google::Cloud::Bigtable::MutationEntry.new("user-1")
163
163
  # timestamp_micros = (Time.now.to_f * 1000000).round(-3)
164
164
  # entry.delete_cells(
165
165
  # "cf1",
166
- # "field-1",
166
+ # "field1",
167
167
  # timestamp_from: timestamp_micros - 5000000,
168
168
  # timestamp_to: timestamp_micros
169
169
  # )
@@ -172,19 +172,20 @@ module Google
172
172
  # timestamp_micros = (Time.now.to_f * 1000000).round(-3)
173
173
  # entry.delete_cells(
174
174
  # "cf1",
175
- # "field-1",
175
+ # "field1",
176
176
  # timestamp_from: timestamp_micros - 5000000
177
177
  # )
178
178
  #
179
179
  def delete_cells family, qualifier, timestamp_from: nil, timestamp_to: nil
180
- grpc = Google::Bigtable::V2::Mutation::DeleteFromColumn.new family_name: family, column_qualifier: qualifier
180
+ grpc = Google::Cloud::Bigtable::V2::Mutation::DeleteFromColumn.new \
181
+ family_name: family, column_qualifier: qualifier
181
182
  if timestamp_from || timestamp_to
182
- time_range = Google::Bigtable::V2::TimestampRange.new
183
+ time_range = Google::Cloud::Bigtable::V2::TimestampRange.new
183
184
  time_range.start_timestamp_micros = timestamp_from if timestamp_from
184
185
  time_range.end_timestamp_micros = timestamp_to if timestamp_to
185
186
  grpc.time_range = time_range
186
187
  end
187
- @mutations << Google::Bigtable::V2::Mutation.new(delete_from_column: grpc)
188
+ @mutations << Google::Cloud::Bigtable::V2::Mutation.new(delete_from_column: grpc)
188
189
  self
189
190
  end
190
191
 
@@ -200,10 +201,10 @@ module Google
200
201
  #
201
202
  # @example
202
203
  # entry = Google::Cloud::Bigtable::MutationEntry.new("user-1")
203
- # entry.delete_from_family("cf-1")
204
+ # entry.delete_from_family("cf1")
204
205
  #
205
206
  def delete_from_family family
206
- @mutations << Google::Bigtable::V2::Mutation.new(delete_from_family: { family_name: family })
207
+ @mutations << Google::Cloud::Bigtable::V2::Mutation.new(delete_from_family: { family_name: family })
207
208
  self
208
209
  end
209
210
 
@@ -219,7 +220,7 @@ module Google
219
220
  # entry.delete_from_row
220
221
  #
221
222
  def delete_from_row
222
- @mutations << Google::Bigtable::V2::Mutation.new(delete_from_row: {})
223
+ @mutations << Google::Cloud::Bigtable::V2::Mutation.new(delete_from_row: {})
223
224
  self
224
225
  end
225
226
 
@@ -245,10 +246,10 @@ module Google
245
246
  #
246
247
  # Convert mutation entry to gRPC protobuf object.
247
248
  #
248
- # @return [Google::Bigtable::V2::MutateRowsRequest::Entry]
249
+ # @return [Google::Cloud::Bigtable::V2::MutateRowsRequest::Entry]
249
250
  #
250
251
  def to_grpc
251
- Google::Bigtable::V2::MutateRowsRequest::Entry.new row_key: @row_key, mutations: @mutations
252
+ Google::Cloud::Bigtable::V2::MutateRowsRequest::Entry.new row_key: @row_key, mutations: @mutations
252
253
  end
253
254
  end
254
255
  end
@@ -65,8 +65,8 @@ module Google
65
65
  #
66
66
  # entry = table.new_mutation_entry("user-1")
67
67
  # entry.set_cell(
68
- # "cf-1",
69
- # "field-1",
68
+ # "cf1",
69
+ # "field1",
70
70
  # "XYZ",
71
71
  # timestamp: (Time.now.to_f * 1000000).round(-3) # microseconds
72
72
  # ).delete_cells("cf2", "field02")
@@ -89,7 +89,7 @@ module Google
89
89
  # applied in arbitrary order (even between entries for the same row).
90
90
  # At least one entry must be specified, and in total the entries can
91
91
  # contain a maximum of 100,000 mutations.
92
- # @return [Array<Google::Bigtable::V2::MutateRowsResponse::Entry>]
92
+ # @return [Array<Google::Cloud::Bigtable::V2::MutateRowsResponse::Entry>]
93
93
  #
94
94
  # @example
95
95
  # require "google/cloud/bigtable"
@@ -219,8 +219,8 @@ module Google
219
219
  # predicate_filter = Google::Cloud::Bigtable::RowFilter.key("user-10")
220
220
  # on_match_mutations = Google::Cloud::Bigtable::MutationEntry.new
221
221
  # on_match_mutations.set_cell(
222
- # "cf-1",
223
- # "field-1",
222
+ # "cf1",
223
+ # "field1",
224
224
  # "XYZ",
225
225
  # timestamp: (Time.now.to_f * 1000000).round(-3) # microseconds
226
226
  # ).delete_cells("cf2", "field02")
@@ -346,7 +346,7 @@ module Google
346
346
 
347
347
  ##
348
348
  # @private New MutationEntry::Response from a
349
- # Google::Bigtable::V2::MutateRowsResponse::Entry object.
349
+ # Google::Cloud::Bigtable::V2::MutateRowsResponse::Entry object.
350
350
  def self.from_grpc grpc
351
351
  new grpc.index, Status.from_grpc(grpc.status)
352
352
  end
@@ -227,7 +227,7 @@ module Google
227
227
  labels = Hash[labels.map { |k, v| [String(k), String(v)] }] if labels
228
228
 
229
229
  instance_attrs = { display_name: display_name, type: type, labels: labels }.delete_if { |_, v| v.nil? }
230
- instance = Google::Bigtable::Admin::V2::Instance.new instance_attrs
230
+ instance = Google::Cloud::Bigtable::Admin::V2::Instance.new instance_attrs
231
231
  clusters ||= Instance::ClusterMap.new
232
232
  yield clusters if block_given?
233
233
 
@@ -44,7 +44,7 @@ module Google
44
44
  # The qualifier of the column to which the read/modify/write should be applied.
45
45
  #
46
46
  def initialize family, qualifier
47
- @grpc = Google::Bigtable::V2::ReadModifyWriteRule.new
47
+ @grpc = Google::Cloud::Bigtable::V2::ReadModifyWriteRule.new
48
48
  @grpc.family_name = family
49
49
  @grpc.column_qualifier = qualifier
50
50
  end
@@ -123,7 +123,7 @@ module Google
123
123
  #
124
124
  # Get gRPC protobuf instance.
125
125
  #
126
- # @return [Google::Bigtable::V2::ReadModifyWriteRule]
126
+ # @return [Google::Cloud::Bigtable::V2::ReadModifyWriteRule]
127
127
  #
128
128
  def to_grpc
129
129
  @grpc
@@ -309,7 +309,7 @@ module Google
309
309
  #
310
310
  # @param row_keys [Array<String>]
311
311
  # @param row_ranges [Google::Cloud::Bigtable::RowRange | Array<Google::Cloud::Bigtable::RowRange>]
312
- # @return [Google::Bigtable::V2::RowSet]
312
+ # @return [Google::Cloud::Bigtable::V2::RowSet]
313
313
  #
314
314
  def build_row_set row_keys, row_ranges
315
315
  row_set = {}
@@ -320,7 +320,7 @@ module Google
320
320
  row_set[:row_ranges] = row_ranges.map(&:to_grpc)
321
321
  end
322
322
 
323
- Google::Bigtable::V2::RowSet.new row_set
323
+ Google::Cloud::Bigtable::V2::RowSet.new row_set
324
324
  end
325
325
  end
326
326
  end
@@ -99,7 +99,7 @@ module Google
99
99
  class MultiClusterRoutingUseAny < RoutingPolicy
100
100
  # @private
101
101
  def to_grpc
102
- Google::Bigtable::Admin::V2::AppProfile::MultiClusterRoutingUseAny.new
102
+ Google::Cloud::Bigtable::Admin::V2::AppProfile::MultiClusterRoutingUseAny.new
103
103
  end
104
104
  end
105
105
 
@@ -161,7 +161,7 @@ module Google
161
161
 
162
162
  # @private
163
163
  def to_grpc
164
- Google::Bigtable::Admin::V2::AppProfile::SingleClusterRouting.new(
164
+ Google::Cloud::Bigtable::Admin::V2::AppProfile::SingleClusterRouting.new(
165
165
  cluster_id: cluster_id,
166
166
  allow_transactional_writes: allow_transactional_writes
167
167
  )
@@ -564,11 +564,11 @@ module Google
564
564
  #
565
565
  # Gets a gRPC object of RowFilter with a chain filter.
566
566
  #
567
- # @return [Google::Bigtable::V2::RowFilter]
567
+ # @return [Google::Cloud::Bigtable::V2::RowFilter]
568
568
  #
569
569
  def to_grpc
570
- Google::Bigtable::V2::RowFilter.new(
571
- chain: Google::Bigtable::V2::RowFilter::Chain.new(filters: @filters.map(&:to_grpc))
570
+ Google::Cloud::Bigtable::V2::RowFilter.new(
571
+ chain: Google::Cloud::Bigtable::V2::RowFilter::Chain.new(filters: @filters.map(&:to_grpc))
572
572
  )
573
573
  end
574
574