google-cloud-bigtable 1.3.0 → 2.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (84) hide show
  1. checksums.yaml +4 -4
  2. data/AUTHENTICATION.md +1 -1
  3. data/CHANGELOG.md +26 -0
  4. data/lib/google-cloud-bigtable.rb +29 -27
  5. data/lib/google/cloud/bigtable.rb +18 -26
  6. data/lib/google/cloud/bigtable/app_profile.rb +3 -3
  7. data/lib/google/cloud/bigtable/app_profile/list.rb +4 -2
  8. data/lib/google/cloud/bigtable/backup.rb +2 -2
  9. data/lib/google/cloud/bigtable/backup/list.rb +2 -2
  10. data/lib/google/cloud/bigtable/chunk_processor.rb +1 -1
  11. data/lib/google/cloud/bigtable/cluster.rb +2 -2
  12. data/lib/google/cloud/bigtable/cluster/list.rb +1 -1
  13. data/lib/google/cloud/bigtable/column_family.rb +2 -2
  14. data/lib/google/cloud/bigtable/column_family_map.rb +10 -10
  15. data/lib/google/cloud/bigtable/column_range.rb +2 -2
  16. data/lib/google/cloud/bigtable/credentials.rb +36 -2
  17. data/lib/google/cloud/bigtable/gc_rule.rb +7 -7
  18. data/lib/google/cloud/bigtable/instance.rb +6 -6
  19. data/lib/google/cloud/bigtable/instance/cluster_map.rb +1 -1
  20. data/lib/google/cloud/bigtable/instance/list.rb +1 -1
  21. data/lib/google/cloud/bigtable/longrunning_job.rb +2 -2
  22. data/lib/google/cloud/bigtable/mutation_entry.rb +10 -9
  23. data/lib/google/cloud/bigtable/mutation_operations.rb +2 -2
  24. data/lib/google/cloud/bigtable/project.rb +1 -1
  25. data/lib/google/cloud/bigtable/read_modify_write_rule.rb +2 -2
  26. data/lib/google/cloud/bigtable/read_operations.rb +2 -2
  27. data/lib/google/cloud/bigtable/routing_policy.rb +2 -2
  28. data/lib/google/cloud/bigtable/row_filter/chain_filter.rb +3 -3
  29. data/lib/google/cloud/bigtable/row_filter/condition_filter.rb +3 -3
  30. data/lib/google/cloud/bigtable/row_filter/interleave_filter.rb +3 -3
  31. data/lib/google/cloud/bigtable/row_filter/simple_filter.rb +3 -3
  32. data/lib/google/cloud/bigtable/row_range.rb +2 -2
  33. data/lib/google/cloud/bigtable/rows_mutator.rb +3 -3
  34. data/lib/google/cloud/bigtable/rows_reader.rb +10 -10
  35. data/lib/google/cloud/bigtable/sample_row_key.rb +2 -2
  36. data/lib/google/cloud/bigtable/service.rb +198 -281
  37. data/lib/google/cloud/bigtable/table.rb +5 -4
  38. data/lib/google/cloud/bigtable/table/cluster_state.rb +2 -2
  39. data/lib/google/cloud/bigtable/table/list.rb +1 -1
  40. data/lib/google/cloud/bigtable/value_range.rb +2 -2
  41. data/lib/google/cloud/bigtable/version.rb +1 -1
  42. metadata +11 -93
  43. data/lib/google/bigtable/admin/v2/bigtable_instance_admin_pb.rb +0 -145
  44. data/lib/google/bigtable/admin/v2/bigtable_instance_admin_services_pb.rb +0 -90
  45. data/lib/google/bigtable/admin/v2/bigtable_table_admin_pb.rb +0 -208
  46. data/lib/google/bigtable/admin/v2/bigtable_table_admin_services_pb.rb +0 -154
  47. data/lib/google/bigtable/admin/v2/common_pb.rb +0 -30
  48. data/lib/google/bigtable/admin/v2/instance_pb.rb +0 -74
  49. data/lib/google/bigtable/admin/v2/table_pb.rb +0 -127
  50. data/lib/google/bigtable/v2/bigtable_pb.rb +0 -113
  51. data/lib/google/bigtable/v2/bigtable_services_pb.rb +0 -68
  52. data/lib/google/bigtable/v2/data_pb.rb +0 -156
  53. data/lib/google/cloud/bigtable/admin.rb +0 -202
  54. data/lib/google/cloud/bigtable/admin/credentials.rb +0 -27
  55. data/lib/google/cloud/bigtable/admin/v2.rb +0 -223
  56. data/lib/google/cloud/bigtable/admin/v2/bigtable_instance_admin_client.rb +0 -1451
  57. data/lib/google/cloud/bigtable/admin/v2/bigtable_instance_admin_client_config.json +0 -139
  58. data/lib/google/cloud/bigtable/admin/v2/bigtable_table_admin_client.rb +0 -1734
  59. data/lib/google/cloud/bigtable/admin/v2/bigtable_table_admin_client_config.json +0 -163
  60. data/lib/google/cloud/bigtable/admin/v2/credentials.rb +0 -51
  61. data/lib/google/cloud/bigtable/admin/v2/doc/google/bigtable/admin/v2/bigtable_instance_admin.rb +0 -297
  62. data/lib/google/cloud/bigtable/admin/v2/doc/google/bigtable/admin/v2/bigtable_table_admin.rb +0 -587
  63. data/lib/google/cloud/bigtable/admin/v2/doc/google/bigtable/admin/v2/instance.rb +0 -193
  64. data/lib/google/cloud/bigtable/admin/v2/doc/google/bigtable/admin/v2/table.rb +0 -303
  65. data/lib/google/cloud/bigtable/admin/v2/doc/google/iam/v1/iam_policy.rb +0 -64
  66. data/lib/google/cloud/bigtable/admin/v2/doc/google/iam/v1/options.rb +0 -33
  67. data/lib/google/cloud/bigtable/admin/v2/doc/google/iam/v1/policy.rb +0 -151
  68. data/lib/google/cloud/bigtable/admin/v2/doc/google/longrunning/operations.rb +0 -51
  69. data/lib/google/cloud/bigtable/admin/v2/doc/google/protobuf/any.rb +0 -131
  70. data/lib/google/cloud/bigtable/admin/v2/doc/google/protobuf/duration.rb +0 -91
  71. data/lib/google/cloud/bigtable/admin/v2/doc/google/protobuf/empty.rb +0 -29
  72. data/lib/google/cloud/bigtable/admin/v2/doc/google/protobuf/field_mask.rb +0 -222
  73. data/lib/google/cloud/bigtable/admin/v2/doc/google/protobuf/timestamp.rb +0 -113
  74. data/lib/google/cloud/bigtable/admin/v2/doc/google/rpc/status.rb +0 -39
  75. data/lib/google/cloud/bigtable/admin/v2/doc/google/type/expr.rb +0 -45
  76. data/lib/google/cloud/bigtable/v2.rb +0 -146
  77. data/lib/google/cloud/bigtable/v2/bigtable_client.rb +0 -591
  78. data/lib/google/cloud/bigtable/v2/bigtable_client_config.json +0 -83
  79. data/lib/google/cloud/bigtable/v2/credentials.rb +0 -46
  80. data/lib/google/cloud/bigtable/v2/doc/google/bigtable/v2/bigtable.rb +0 -290
  81. data/lib/google/cloud/bigtable/v2/doc/google/bigtable/v2/data.rb +0 -493
  82. data/lib/google/cloud/bigtable/v2/doc/google/protobuf/any.rb +0 -131
  83. data/lib/google/cloud/bigtable/v2/doc/google/protobuf/wrappers.rb +0 -34
  84. data/lib/google/cloud/bigtable/v2/doc/google/rpc/status.rb +0 -39
@@ -59,14 +59,14 @@ module Google
59
59
  ##
60
60
  # Read rows
61
61
  #
62
- # @param rows [Google::Bigtable::V2::RowSet]
62
+ # @param rows [Google::Cloud::Bigtable::V2::RowSet]
63
63
  # The row keys and/or ranges to read.
64
64
  # If not specified, reads from all rows.
65
- # Alternatively, provide a hash in the form of `Google::Bigtable::V2::RowSet`.
66
- # @param filter [Google::Bigtable::V2::RowFilter | Hash]
65
+ # Alternatively, provide a hash in the form of `Google::Cloud::Bigtable::V2::RowSet`.
66
+ # @param filter [Google::Cloud::Bigtable::V2::RowFilter | Hash]
67
67
  # The filter to apply to the contents of the specified row(s). If unset,
68
68
  # reads the entirety of each row.
69
- # A hash in the form of `Google::Bigtable::V2::RowFilter`
69
+ # A hash in the form of `Google::Cloud::Bigtable::V2::RowFilter`
70
70
  # can also be provided.
71
71
  # @param rows_limit [Integer]
72
72
  # The read will terminate after committing to N rows' worth of results.
@@ -111,12 +111,12 @@ module Google
111
111
  # @param rows_limit [Integer]
112
112
  # The read will terminate after committing to N rows' worth of results.
113
113
  # The default (zero) is to return all results.
114
- # @param row_set [Google::Bigtable::V2::RowSet]
114
+ # @param row_set [Google::Cloud::Bigtable::V2::RowSet]
115
115
  # The row keys and/or ranges to read.
116
116
  # If not specified, reads from all rows.
117
- # A hash of the same form as `Google::Bigtable::V2::RowSet`
117
+ # A hash of the same form as `Google::Cloud::Bigtable::V2::RowSet`
118
118
  # can also be provided.
119
- # @return [Integer, Google::Bigtable::V2::RowSet]
119
+ # @return [Integer, Google::Cloud::Bigtable::V2::RowSet]
120
120
  #
121
121
  def retry_options rows_limit, row_set
122
122
  return [rows_limit, row_set] unless last_key
@@ -142,7 +142,7 @@ module Google
142
142
 
143
143
  if row_set.row_ranges.empty?
144
144
  row_set.row_ranges <<
145
- Google::Bigtable::V2::RowRange.new(start_key_open: last_key)
145
+ Google::Cloud::Bigtable::V2::RowRange.new(start_key_open: last_key)
146
146
  end
147
147
 
148
148
  # 3. Remove all individual keys before and up to the last read key
@@ -166,7 +166,7 @@ module Google
166
166
  ##
167
167
  # Checks if the start key was already read for the range.
168
168
  #
169
- # @param range [Google::Bigtable::V2::RowRange]
169
+ # @param range [Google::Cloud::Bigtable::V2::RowRange]
170
170
  # @return [Boolean]
171
171
  #
172
172
  def start_key_read? range
@@ -182,7 +182,7 @@ module Google
182
182
  ##
183
183
  # Checks if the end key was already read for the range.
184
184
  #
185
- # @param range [Google::Bigtable::V2::RowRange]
185
+ # @param range [Google::Cloud::Bigtable::V2::RowRange]
186
186
  # @return [Boolean]
187
187
  #
188
188
  def end_key_read? range
@@ -72,8 +72,8 @@ module Google
72
72
  # @private
73
73
  #
74
74
  # Creates a new SampleRowKey instance from a
75
- # Google::Bigtable::V2::SampleRowKey.
76
- # @param grpc [Google::Bigtable::V2::SampleRowKeysResponse]
75
+ # Google::Cloud::Bigtable::V2::SampleRowKey.
76
+ # @param grpc [Google::Cloud::Bigtable::V2::SampleRowKeysResponse]
77
77
  # @return [Google::Cloud::Bigtable::SampleRowKey]
78
78
  #
79
79
  def self.from_grpc grpc
@@ -18,9 +18,8 @@
18
18
  require "google/cloud/bigtable/version"
19
19
  require "google/cloud/bigtable/errors"
20
20
  require "google/cloud/bigtable/credentials"
21
- require "google/cloud/bigtable/admin/v2/bigtable_instance_admin_client"
22
- require "google/cloud/bigtable/admin/v2/bigtable_table_admin_client"
23
- require "google/cloud/bigtable/v2/bigtable_client"
21
+ require "google/cloud/bigtable/v2"
22
+ require "google/cloud/bigtable/admin/v2"
24
23
 
25
24
  module Google
26
25
  module Cloud
@@ -29,7 +28,7 @@ module Google
29
28
  # gRPC Cloud Bigtable service, including API methods.
30
29
  class Service
31
30
  # @private
32
- attr_accessor :project_id, :credentials, :host, :timeout, :client_config
31
+ attr_accessor :project_id, :credentials, :host, :host_admin, :timeout
33
32
 
34
33
  # @private
35
34
  # Creates a new Service instance.
@@ -49,109 +48,74 @@ module Google
49
48
  # generally, to give OAuth credentials.
50
49
  # @param timeout [Integer]
51
50
  # The default timeout, in seconds, for calls made through this client.
52
- # @param client_config [Hash]
53
- # A hash for call options for each method. See Google::Gax#construct_settings for the structure of this data.
54
- # Falls back to the default config if not specified or the specified config is missing data points.
55
51
  #
56
- def initialize project_id, credentials, host: nil, timeout: nil, client_config: nil
52
+ def initialize project_id, credentials, host: nil, host_admin: nil, timeout: nil
57
53
  @project_id = project_id
58
54
  @credentials = credentials
59
55
  @host = host
56
+ @host_admin = host_admin
60
57
  @timeout = timeout
61
- @client_config = client_config || {}
62
58
  end
63
59
 
64
- def channel default_host
65
- require "grpc"
66
- GRPC::Core::Channel.new((host || default_host), chan_args, chan_creds)
67
- end
68
-
69
- def chan_args
70
- { "grpc.max_send_message_length" => -1,
71
- "grpc.max_receive_message_length" => -1,
72
- "grpc.service_config_disable_resolution" => 1 }
73
- end
74
-
75
- def chan_creds
76
- return credentials if insecure?
77
- require "grpc"
78
- GRPC::Core::ChannelCredentials.new.compose GRPC::Core::CallCredentials.new credentials.client.updater_proc
79
- end
80
-
81
- ##
82
- # Creates or returns an instance of an instance admin client.
83
- #
84
- # @return [Google::Cloud::Bigtable::Admin::V2::BigtableInstanceAdminClient]
85
- #
86
60
  def instances
87
61
  return mocked_instances if mocked_instances
88
- @instances ||= Admin::V2::BigtableInstanceAdminClient.new(
89
- credentials: channel(Admin::V2::BigtableInstanceAdminClient::SERVICE_ADDRESS),
90
- timeout: timeout,
91
- client_config: client_config,
92
- lib_name: "gccl",
93
- lib_version: Google::Cloud::Bigtable::VERSION
94
- )
62
+ @instances ||= Admin::V2::BigtableInstanceAdmin::Client.new do |config|
63
+ config.credentials = credentials if credentials
64
+ config.timeout = timeout if timeout
65
+ config.endpoint = host_admin if host_admin
66
+ config.lib_name = "gccl"
67
+ config.lib_version = Google::Cloud::Bigtable::VERSION
68
+ config.metadata = { "google-cloud-resource-prefix": "projects/#{@project_id}" }
69
+ end
95
70
  end
96
71
  attr_accessor :mocked_instances
97
72
 
98
- ##
99
- # Creates or returns an instance of a table admin client.
100
- #
101
- # @return [Google::Cloud::Bigtable::Admin::V2::BigtableTableAdminClient]
102
- #
103
73
  def tables
104
74
  return mocked_tables if mocked_tables
105
- @tables ||= Admin::V2::BigtableTableAdminClient.new(
106
- credentials: channel(Admin::V2::BigtableTableAdminClient::SERVICE_ADDRESS),
107
- timeout: timeout,
108
- client_config: client_config,
109
- lib_name: "gccl",
110
- lib_version: Google::Cloud::Bigtable::VERSION
111
- )
75
+ @tables ||= Admin::V2::BigtableTableAdmin::Client.new do |config|
76
+ config.credentials = credentials if credentials
77
+ config.timeout = timeout if timeout
78
+ config.endpoint = host_admin if host_admin
79
+ config.lib_name = "gccl"
80
+ config.lib_version = Google::Cloud::Bigtable::VERSION
81
+ config.metadata = { "google-cloud-resource-prefix": "projects/#{@project_id}" }
82
+ end
112
83
  end
113
84
  attr_accessor :mocked_tables
114
85
 
115
- ##
116
- # Creates an instance of a data client.
117
- #
118
- # @return [Google::Cloud::Bigtable::V2::BigtableClient]
119
- #
120
86
  def client
121
87
  return mocked_client if mocked_client
122
- @client ||= V2::BigtableClient.new(
123
- credentials: channel(V2::BigtableClient::SERVICE_ADDRESS),
124
- timeout: timeout,
125
- client_config: client_config,
126
- lib_name: "gccl",
127
- lib_version: Google::Cloud::Bigtable::VERSION
128
- )
88
+ @client ||= V2::Bigtable::Client.new do |config|
89
+ config.credentials = credentials if credentials
90
+ config.timeout = timeout if timeout
91
+ config.endpoint = host if host
92
+ config.lib_name = "gccl"
93
+ config.lib_version = Google::Cloud::Bigtable::VERSION
94
+ config.metadata = { "google-cloud-resource-prefix": "projects/#{@project_id}" }
95
+ end
129
96
  end
130
97
  attr_accessor :mocked_client
131
98
 
132
- def insecure?
133
- credentials == :this_channel_is_insecure
134
- end
135
-
136
99
  ##
137
100
  # Creates an instance within a project.
138
101
  #
139
102
  # @param instance_id [String]
140
103
  # The permanent identifier to be used for the new instance.
141
104
  #
142
- # @param instance [Google::Bigtable::Admin::V2::Instance | Hash]
143
- # @param clusters [Hash{String => Google::Bigtable::Admin::V2::Cluster | Hash}]
105
+ # @param instance [Google::Cloud::Bigtable::Admin::V2::Instance | Hash]
106
+ # @param clusters [Hash{String => Google::Cloud::Bigtable::Admin::V2::Cluster | Hash}]
144
107
  # The clusters to be created in the instance.
145
108
  # Note that the cluster ID is the last segment of a cluster name. In the
146
109
  # following cluster name, 'mycluster' is the cluster ID:
147
110
  # +projects/myproject/instances/myinstance/clusters/mycluster+.
148
- # Alternatively, provide a hash in the form of `Google::Bigtable::Admin::V2::Cluster`
149
- # @return [Google::Gax::Operation]
111
+ # Alternatively, provide a hash in the form of `Google::Cloud::Bigtable::Admin::V2::Cluster`
112
+ # @return [Gapic::Operation]
150
113
  #
151
114
  def create_instance instance_id, instance, clusters
152
- execute do
153
- instances.create_instance project_path, instance_id, instance, clusters
154
- end
115
+ instances.create_instance parent: project_path,
116
+ instance_id: instance_id,
117
+ instance: instance,
118
+ clusters: clusters
155
119
  end
156
120
 
157
121
  ##
@@ -159,12 +123,10 @@ module Google
159
123
  #
160
124
  # @param token [String]
161
125
  # The value of +next_page_token+ returned by a previous call.
162
- # @return [Google::Bigtable::Admin::V2::ListInstancesResponse]
126
+ # @return [Google::Cloud::Bigtable::Admin::V2::ListInstancesResponse]
163
127
  #
164
128
  def list_instances token: nil
165
- execute do
166
- instances.list_instances project_path, page_token: token
167
- end
129
+ instances.list_instances parent: project_path, page_token: token
168
130
  end
169
131
 
170
132
  ##
@@ -172,30 +134,26 @@ module Google
172
134
  #
173
135
  # @param instance_id [String]
174
136
  # Unique ID of the requested instance.
175
- # @return [Google::Bigtable::Admin::V2::Instance]
137
+ # @return [Google::Cloud::Bigtable::Admin::V2::Instance]
176
138
  #
177
139
  def get_instance instance_id
178
- execute do
179
- instances.get_instance instance_path(instance_id)
180
- end
140
+ instances.get_instance name: instance_path(instance_id)
181
141
  end
182
142
 
183
143
  ##
184
144
  # Partially updates an instance.
185
145
  #
186
- # @param instance [Google::Bigtable::Admin::V2::Instance | Hash]
146
+ # @param instance [Google::Cloud::Bigtable::Admin::V2::Instance | Hash]
187
147
  # The instance that will (partially) replace the current value.
188
- # Alternatively, provide a hash in the form of `Google::Bigtable::Admin::V2::Instance.
148
+ # Alternatively, provide a hash in the form of `Google::Cloud::Bigtable::Admin::V2::Instance.
189
149
  # @param update_mask [Google::Protobuf::FieldMask | Hash]
190
150
  # List of instance properties to be replaced.
191
151
  # Must be explicitly set.
192
152
  # Alternatively, provide a hash in the form of `Google::Protobuf::FieldMask`.
193
- # @return [Google::Gax::Operation]
153
+ # @return [Gapic::Operation]
194
154
  #
195
155
  def partial_update_instance instance, update_mask
196
- execute do
197
- instances.partial_update_instance instance, update_mask
198
- end
156
+ instances.partial_update_instance instance: instance, update_mask: update_mask
199
157
  end
200
158
 
201
159
  ##
@@ -205,11 +163,7 @@ module Google
205
163
  # Unique ID of the instance to be deleted.
206
164
  #
207
165
  def delete_instance instance_id
208
- execute do
209
- instances.delete_instance(
210
- instance_path(instance_id)
211
- )
212
- end
166
+ instances.delete_instance name: instance_path(instance_id)
213
167
  end
214
168
 
215
169
  ##
@@ -219,18 +173,16 @@ module Google
219
173
  # Unique ID of the instance in which to create the new cluster
220
174
  # @param cluster_id [String]
221
175
  # Unique permanent identifier for the new cluster
222
- # @param cluster [Google::Bigtable::Admin::V2::Cluster | Hash]
176
+ # @param cluster [Google::Cloud::Bigtable::Admin::V2::Cluster | Hash]
223
177
  # The cluster to be created.
224
- # Alternatively, provide a hash in the form of `Google::Bigtable::Admin::V2::Cluster`
178
+ # Alternatively, provide a hash in the form of `Google::Cloud::Bigtable::Admin::V2::Cluster`
225
179
  #
226
- # @return [Google::Gax::Operation]
180
+ # @return [Gapic::Operation]
227
181
  #
228
182
  def create_cluster instance_id, cluster_id, cluster
229
183
  cluster.location = location_path cluster.location unless cluster.location == ""
230
184
 
231
- execute do
232
- instances.create_cluster instance_path(instance_id), cluster_id, cluster
233
- end
185
+ instances.create_cluster parent: instance_path(instance_id), cluster_id: cluster_id, cluster: cluster
234
186
  end
235
187
 
236
188
  ##
@@ -240,12 +192,10 @@ module Google
240
192
  # Unique ID of the instance for which a list of clusters is requested.
241
193
  # @param token [String]
242
194
  # The value of +next_page_token+ returned by a previous call.
243
- # @return [Google::Bigtable::Admin::V2::ListClustersResponse]
195
+ # @return [Google::Cloud::Bigtable::Admin::V2::ListClustersResponse]
244
196
  #
245
197
  def list_clusters instance_id, token: nil
246
- execute do
247
- instances.list_clusters instance_path(instance_id), page_token: token
248
- end
198
+ instances.list_clusters parent: instance_path(instance_id), page_token: token
249
199
  end
250
200
 
251
201
  ##
@@ -255,12 +205,10 @@ module Google
255
205
  # Unique ID of the instance the cluster is in.
256
206
  # @param cluster_id [String]
257
207
  # Unique ID of the requested cluster.
258
- # @return [Google::Bigtable::Admin::V2::Cluster]
208
+ # @return [Google::Cloud::Bigtable::Admin::V2::Cluster]
259
209
  #
260
210
  def get_cluster instance_id, cluster_id
261
- execute do
262
- instances.get_cluster cluster_path(instance_id, cluster_id)
263
- end
211
+ instances.get_cluster name: cluster_path(instance_id, cluster_id)
264
212
  end
265
213
 
266
214
  ##
@@ -278,12 +226,12 @@ module Google
278
226
  # @param serve_nodes [Integer]
279
227
  # The number of nodes allocated to this cluster. More nodes enable higher
280
228
  # throughput and more consistent performance.
281
- # @return [Google::Gax::Operation]
229
+ # @return [Gapic::Operation]
282
230
  #
283
231
  def update_cluster instance_id, cluster_id, location, serve_nodes
284
- execute do
285
- instances.update_cluster cluster_path(instance_id, cluster_id), location, serve_nodes
286
- end
232
+ instances.update_cluster name: cluster_path(instance_id, cluster_id),
233
+ location: location,
234
+ serve_nodes: serve_nodes
287
235
  end
288
236
 
289
237
  ##
@@ -295,9 +243,7 @@ module Google
295
243
  # Unique ID of the cluster to be deleted.
296
244
  #
297
245
  def delete_cluster instance_id, cluster_id
298
- execute do
299
- instances.delete_cluster cluster_path(instance_id, cluster_id)
300
- end
246
+ instances.delete_cluster name: cluster_path(instance_id, cluster_id)
301
247
  end
302
248
 
303
249
  ##
@@ -308,10 +254,10 @@ module Google
308
254
  # Unique ID of the instance to create the table in.
309
255
  # @param table_id [String]
310
256
  # Unique, permanent identifier for the new table.
311
- # @param table [Google::Bigtable::Admin::V2::Table | Hash]
257
+ # @param table [Google::Cloud::Bigtable::Admin::V2::Table | Hash]
312
258
  # The table to create.
313
- # Alternatively, provide a hash in the form of `Google::Bigtable::Admin::V2::Table`.
314
- # @param initial_splits [Array<Google::Bigtable::Admin::V2::CreateTableRequest::Split | Hash>]
259
+ # Alternatively, provide a hash in the form of `Google::Cloud::Bigtable::Admin::V2::Table`.
260
+ # @param initial_splits [Array<Google::Cloud::Bigtable::Admin::V2::CreateTableRequest::Split | Hash>]
315
261
  # The optional list of row keys that will be used to initially split the
316
262
  # table into several tablets (tablets are similar to HBase regions).
317
263
  # Given two split keys, +s1+ and +s2+, three tablets will be created,
@@ -329,15 +275,20 @@ module Google
329
275
  # * Tablet 4 +[customer_2, other) => {"customer_2"}.+
330
276
  # * Tablet 5 +[other, ) => {"other", "zz"}.+
331
277
  # Alternatively, provide a hash in the form of
332
- # `Google::Bigtable::Admin::V2::CreateTableRequest::Split`
333
- # @return [Google::Bigtable::Admin::V2::Table]
278
+ # `Google::Cloud::Bigtable::Admin::V2::CreateTableRequest::Split`
279
+ # @return [Google::Cloud::Bigtable::Admin::V2::Table]
334
280
  #
335
281
  def create_table instance_id, table_id, table, initial_splits: nil
336
282
  initial_splits = initial_splits.map { |key| { key: key } } if initial_splits
337
283
 
338
- execute do
339
- tables.create_table instance_path(instance_id), table_id, table, initial_splits: initial_splits
340
- end
284
+ tables.create_table(
285
+ {
286
+ parent: instance_path(instance_id),
287
+ table_id: table_id,
288
+ table: table,
289
+ initial_splits: initial_splits
290
+ }.delete_if { |_, v| v.nil? }
291
+ )
341
292
  end
342
293
 
343
294
  ##
@@ -345,18 +296,16 @@ module Google
345
296
  #
346
297
  # @param instance_id [String]
347
298
  # Unique ID of the instance for which tables should be listed.
348
- # @param view [Google::Bigtable::Admin::V2::Table::View]
299
+ # @param view [Google::Cloud::Bigtable::Admin::V2::Table::View]
349
300
  # View to be applied to the returned tables' fields.
350
301
  # Defaults to +NAME_ONLY+ if unspecified; no others are currently supported.
351
- # @return [Google::Gax::PagedEnumerable<Google::Bigtable::Admin::V2::Table>]
352
- # An enumerable of Google::Bigtable::Admin::V2::Table instances.
353
- # See Google::Gax::PagedEnumerable documentation for other
302
+ # @return [Gapic::PagedEnumerable<Google::Cloud::Bigtable::Admin::V2::Table>]
303
+ # An enumerable of Google::Cloud::Bigtable::Admin::V2::Table instances.
304
+ # See Gapic::PagedEnumerable documentation for other
354
305
  # operations such as per-page iteration or access to the response.
355
306
  #
356
307
  def list_tables instance_id, view: nil
357
- execute do
358
- tables.list_tables instance_path(instance_id), view: view
359
- end
308
+ tables.list_tables parent: instance_path(instance_id), view: view
360
309
  end
361
310
 
362
311
  ##
@@ -366,15 +315,13 @@ module Google
366
315
  # Unique ID of the instance the table is in.
367
316
  # @param table_id [String]
368
317
  # Unique ID of the requested table.
369
- # @param view [Google::Bigtable::Admin::V2::Table::View]
318
+ # @param view [Google::Cloud::Bigtable::Admin::V2::Table::View]
370
319
  # View to be applied to the returned table's fields.
371
320
  # Defaults to +SCHEMA_VIEW+ if unspecified.
372
- # @return [Google::Bigtable::Admin::V2::Table]
321
+ # @return [Google::Cloud::Bigtable::Admin::V2::Table]
373
322
  #
374
323
  def get_table instance_id, table_id, view: nil
375
- execute do
376
- tables.get_table table_path(instance_id, table_id), view: view
377
- end
324
+ tables.get_table name: table_path(instance_id, table_id), view: view
378
325
  end
379
326
 
380
327
  ##
@@ -386,9 +333,7 @@ module Google
386
333
  # Unique ID of the table to be deleted.
387
334
  #
388
335
  def delete_table instance_id, table_id
389
- execute do
390
- tables.delete_table table_path(instance_id, table_id)
391
- end
336
+ tables.delete_table name: table_path(instance_id, table_id)
392
337
  end
393
338
 
394
339
  ##
@@ -401,19 +346,18 @@ module Google
401
346
  # Unique ID of the instance the table is in.
402
347
  # @param table_id [String]
403
348
  # Unique ID of the table whose families should be modified.
404
- # @param modifications [Array<Google::Bigtable::Admin::V2::ModifyColumnFamiliesRequest::Modification | Hash>]
349
+ # @param modifications
350
+ # [Array<Google::Cloud::Bigtable::Admin::V2::ModifyColumnFamiliesRequest::Modification | Hash>]
405
351
  # Modifications to be atomically applied to the specified table's families.
406
352
  # Entries are applied in order, meaning that earlier modifications can be
407
353
  # masked by later ones (in the case of repeated updates to the same family,
408
354
  # for example).
409
355
  # Alternatively, provide a hash in the form of
410
- # `Google::Bigtable::Admin::V2::ModifyColumnFamiliesRequest::Modification`.
411
- # @return [Google::Bigtable::Admin::V2::Table]
356
+ # `Google::Cloud::Bigtable::Admin::V2::ModifyColumnFamiliesRequest::Modification`.
357
+ # @return [Google::Cloud::Bigtable::Admin::V2::Table]
412
358
  #
413
359
  def modify_column_families instance_id, table_id, modifications
414
- execute do
415
- tables.modify_column_families table_path(instance_id, table_id), modifications
416
- end
360
+ tables.modify_column_families name: table_path(instance_id, table_id), modifications: modifications
417
361
  end
418
362
 
419
363
  ##
@@ -426,12 +370,10 @@ module Google
426
370
  # Unique ID of the instance the table is in.
427
371
  # @param table_id [String]
428
372
  # Unique ID of the table the consistency token is for.
429
- # @return [Google::Bigtable::Admin::V2::GenerateConsistencyTokenResponse]
373
+ # @return [Google::Cloud::Bigtable::Admin::V2::GenerateConsistencyTokenResponse]
430
374
  #
431
375
  def generate_consistency_token instance_id, table_id
432
- execute do
433
- tables.generate_consistency_token table_path(instance_id, table_id)
434
- end
376
+ tables.generate_consistency_token name: table_path(instance_id, table_id)
435
377
  end
436
378
 
437
379
  ##
@@ -445,12 +387,10 @@ module Google
445
387
  # Unique ID of the table to check for replication consistency.
446
388
  # @param token [String] Consistency token
447
389
  # The token created for the table using GenerateConsistencyToken.
448
- # @return [Google::Bigtable::Admin::V2::CheckConsistencyResponse]
390
+ # @return [Google::Cloud::Bigtable::Admin::V2::CheckConsistencyResponse]
449
391
  #
450
392
  def check_consistency instance_id, table_id, token
451
- execute do
452
- tables.check_consistency table_path(instance_id, table_id), token
453
- end
393
+ tables.check_consistency name: table_path(instance_id, table_id), consistency_token: token
454
394
  end
455
395
 
456
396
  ##
@@ -467,8 +407,7 @@ module Google
467
407
  # Prefix cannot be zero length.
468
408
  # @param delete_all_data_from_table [true, false]
469
409
  # If true, delete all rows in the table. Setting this to false is a no-op.
470
- # @param timeout [Integer]
471
- # Sets the API call timeout if deadline exceeds exception.
410
+ # @param timeout [Integer] Seconds. Sets the API call timeout if deadline exceeds exception.
472
411
  #
473
412
  def drop_row_range instance_id, table_id, row_key_prefix: nil, delete_all_data_from_table: nil, timeout: nil
474
413
  call_options = nil
@@ -476,21 +415,18 @@ module Google
476
415
  # Pass a timeout with a larger value if the drop operation throws
477
416
  # an error for timeout time.
478
417
  if timeout
479
- retry_options = Google::Gax::RetryOptions.new(
480
- [],
481
- Google::Gax::BackoffSettings.new(0, 0, 0, timeout * 1000, 0, 0, 0)
482
- )
483
- call_options = Google::Gax::CallOptions.new retry_options: retry_options
418
+ retry_policy = Gapic::CallOptions::RetryPolicy.new max_delay: timeout * 1000
419
+ call_options = Gapic::CallOptions.new retry_policy: retry_policy
484
420
  end
485
421
 
486
- execute do
487
- tables.drop_row_range(
488
- table_path(instance_id, table_id),
422
+ tables.drop_row_range(
423
+ {
424
+ name: table_path(instance_id, table_id),
489
425
  row_key_prefix: row_key_prefix,
490
- delete_all_data_from_table: delete_all_data_from_table,
491
- options: call_options
492
- )
493
- end
426
+ delete_all_data_from_table: delete_all_data_from_table
427
+ },
428
+ call_options
429
+ )
494
430
  end
495
431
 
496
432
  ##
@@ -501,22 +437,18 @@ module Google
501
437
  # @param app_profile_id [String]
502
438
  # The permanent identifier for the new app profile within its
503
439
  # instance.
504
- # @param app_profile [Google::Bigtable::Admin::V2::AppProfile | Hash]
440
+ # @param app_profile [Google::Cloud::Bigtable::Admin::V2::AppProfile | Hash]
505
441
  # The app profile to be created.
506
- # Alternatively, provide a hash in the form of `Google::Bigtable::Admin::V2::AppProfile`.
442
+ # Alternatively, provide a hash in the form of `Google::Cloud::Bigtable::Admin::V2::AppProfile`.
507
443
  # @param ignore_warnings [Boolean]
508
444
  # If true, ignore safety checks when creating the app profile.
509
- # @return [Google::Bigtable::Admin::V2::AppProfile]
445
+ # @return [Google::Cloud::Bigtable::Admin::V2::AppProfile]
510
446
  #
511
447
  def create_app_profile instance_id, app_profile_id, app_profile, ignore_warnings: nil
512
- execute do
513
- instances.create_app_profile(
514
- instance_path(instance_id),
515
- app_profile_id,
516
- app_profile,
517
- ignore_warnings: ignore_warnings
518
- )
519
- end
448
+ instances.create_app_profile parent: instance_path(instance_id),
449
+ app_profile_id: app_profile_id,
450
+ app_profile: app_profile,
451
+ ignore_warnings: ignore_warnings
520
452
  end
521
453
 
522
454
  ##
@@ -526,12 +458,10 @@ module Google
526
458
  # Unique ID of the instance.
527
459
  # @param app_profile_id [String]
528
460
  # Unique ID of the requested app profile.
529
- # @return [Google::Bigtable::Admin::V2::AppProfile]
461
+ # @return [Google::Cloud::Bigtable::Admin::V2::AppProfile]
530
462
  #
531
463
  def get_app_profile instance_id, app_profile_id
532
- execute do
533
- instances.get_app_profile app_profile_path(instance_id, app_profile_id)
534
- end
464
+ instances.get_app_profile name: app_profile_path(instance_id, app_profile_id)
535
465
  end
536
466
 
537
467
  ##
@@ -539,25 +469,23 @@ module Google
539
469
  #
540
470
  # @param instance_id [String]
541
471
  # Unique ID of the instance
542
- # @return [Google::Gax::PagedEnumerable<Google::Bigtable::Admin::V2::AppProfile>]
543
- # An enumerable of Google::Bigtable::Admin::V2::AppProfile instances.
544
- # See Google::Gax::PagedEnumerable documentation for other
472
+ # @return [Gapic::PagedEnumerable<Google::Cloud::Bigtable::Admin::V2::AppProfile>]
473
+ # An enumerable of Google::Cloud::Bigtable::Admin::V2::AppProfile instances.
474
+ # See Gapic::PagedEnumerable documentation for other
545
475
  # operations such as per-page iteration or access to the response
546
476
  # object.
547
477
  #
548
478
  def list_app_profiles instance_id
549
- execute do
550
- instances.list_app_profiles instance_path(instance_id)
551
- end
479
+ instances.list_app_profiles parent: instance_path(instance_id)
552
480
  end
553
481
 
554
482
  ##
555
483
  # Updates an app profile within an instance.
556
484
  #
557
- # @param app_profile [Google::Bigtable::Admin::V2::AppProfile | Hash]
485
+ # @param app_profile [Google::Cloud::Bigtable::Admin::V2::AppProfile | Hash]
558
486
  # The app profile that will (partially) replace the current value.
559
487
  # Alternatively, provide a hash in the form of
560
- # `Google::Bigtable::Admin::V2::AppProfile`.
488
+ # `Google::Cloud::Bigtable::Admin::V2::AppProfile`.
561
489
  # @param update_mask [Google::Protobuf::FieldMask | Hash]
562
490
  # The subset of app profile fields that should be replaced.
563
491
  # If unset, all fields will be replaced.
@@ -567,9 +495,9 @@ module Google
567
495
  # @return [Google::Longrunning::Operation]
568
496
  #
569
497
  def update_app_profile app_profile, update_mask, ignore_warnings: nil
570
- execute do
571
- instances.update_app_profile app_profile, update_mask, ignore_warnings: ignore_warnings
572
- end
498
+ instances.update_app_profile app_profile: app_profile,
499
+ update_mask: update_mask,
500
+ ignore_warnings: ignore_warnings
573
501
  end
574
502
 
575
503
  ##
@@ -583,9 +511,8 @@ module Google
583
511
  # If true, ignore safety checks when deleting the app profile.
584
512
  #
585
513
  def delete_app_profile instance_id, app_profile_id, ignore_warnings: nil
586
- execute do
587
- instances.delete_app_profile app_profile_path(instance_id, app_profile_id), ignore_warnings
588
- end
514
+ instances.delete_app_profile name: app_profile_path(instance_id, app_profile_id),
515
+ ignore_warnings: ignore_warnings
589
516
  end
590
517
 
591
518
  ##
@@ -597,9 +524,7 @@ module Google
597
524
  # @return [Google::Iam::V1::Policy]
598
525
  #
599
526
  def get_instance_policy instance_id
600
- execute do
601
- instances.get_iam_policy instance_path(instance_id)
602
- end
527
+ instances.get_iam_policy resource: instance_path(instance_id)
603
528
  end
604
529
 
605
530
  ##
@@ -617,9 +542,7 @@ module Google
617
542
  # @return [Google::Iam::V1::Policy]
618
543
  #
619
544
  def set_instance_policy instance_id, policy
620
- execute do
621
- instances.set_iam_policy instance_path(instance_id), policy
622
- end
545
+ instances.set_iam_policy resource: instance_path(instance_id), policy: policy
623
546
  end
624
547
 
625
548
  ##
@@ -635,9 +558,7 @@ module Google
635
558
  # @return [Google::Iam::V1::TestIamPermissionsResponse]
636
559
  #
637
560
  def test_instance_permissions instance_id, permissions
638
- execute do
639
- instances.test_iam_permissions instance_path(instance_id), permissions
640
- end
561
+ instances.test_iam_permissions resource: instance_path(instance_id), permissions: permissions
641
562
  end
642
563
 
643
564
  ##
@@ -649,9 +570,7 @@ module Google
649
570
  # @return [Google::Iam::V1::Policy]
650
571
  #
651
572
  def get_table_policy instance_id, table_id
652
- execute do
653
- tables.get_iam_policy table_path(instance_id, table_id)
654
- end
573
+ tables.get_iam_policy resource: table_path(instance_id, table_id)
655
574
  end
656
575
 
657
576
  ##
@@ -669,9 +588,7 @@ module Google
669
588
  # @return [Google::Iam::V1::Policy]
670
589
  #
671
590
  def set_table_policy instance_id, table_id, policy
672
- execute do
673
- tables.set_iam_policy table_path(instance_id, table_id), policy
674
- end
591
+ tables.set_iam_policy resource: table_path(instance_id, table_id), policy: policy
675
592
  end
676
593
 
677
594
  ##
@@ -687,14 +604,11 @@ module Google
687
604
  # @return [Google::Iam::V1::TestIamPermissionsResponse]
688
605
  #
689
606
  def test_table_permissions instance_id, table_id, permissions
690
- execute do
691
- tables.test_iam_permissions table_path(instance_id, table_id), permissions
692
- end
607
+ tables.test_iam_permissions resource: table_path(instance_id, table_id), permissions: permissions
693
608
  end
694
609
 
695
610
  def read_rows instance_id, table_id, app_profile_id: nil, rows: nil, filter: nil, rows_limit: nil
696
- # execute is not used because error handling is in ReadOperations#read_rows
697
- client.read_rows table_path(instance_id, table_id),
611
+ client.read_rows table_name: table_path(instance_id, table_id),
698
612
  rows: rows,
699
613
  filter: filter,
700
614
  rows_limit: rows_limit,
@@ -702,84 +616,95 @@ module Google
702
616
  end
703
617
 
704
618
  def sample_row_keys table_name, app_profile_id: nil
705
- execute do
706
- client.sample_row_keys table_name, app_profile_id: app_profile_id
707
- end
619
+ client.sample_row_keys table_name: table_name, app_profile_id: app_profile_id
708
620
  end
709
621
 
710
622
  def mutate_row table_name, row_key, mutations, app_profile_id: nil
711
- execute do
712
- client.mutate_row table_name, row_key, mutations, app_profile_id: app_profile_id
713
- end
623
+ client.mutate_row(
624
+ {
625
+ table_name: table_name,
626
+ app_profile_id: app_profile_id,
627
+ row_key: row_key,
628
+ mutations: mutations
629
+ }.delete_if { |_, v| v.nil? }
630
+ )
714
631
  end
715
632
 
716
633
  def mutate_rows table_name, entries, app_profile_id: nil
717
- execute do
718
- client.mutate_rows table_name, entries, app_profile_id: app_profile_id
719
- end
634
+ client.mutate_rows(
635
+ {
636
+ table_name: table_name,
637
+ app_profile_id: app_profile_id,
638
+ entries: entries
639
+ }.delete_if { |_, v| v.nil? }
640
+ )
720
641
  end
721
642
 
722
- def check_and_mutate_row table_name, row_key, app_profile_id: nil, predicate_filter: nil, true_mutations: nil,
643
+ def check_and_mutate_row table_name,
644
+ row_key,
645
+ app_profile_id: nil,
646
+ predicate_filter: nil,
647
+ true_mutations: nil,
723
648
  false_mutations: nil
724
- execute do
725
- client.check_and_mutate_row table_name, row_key, app_profile_id: app_profile_id,
726
- predicate_filter: predicate_filter, true_mutations: true_mutations,
727
- false_mutations: false_mutations
728
- end
649
+ client.check_and_mutate_row(
650
+ {
651
+ table_name: table_name,
652
+ app_profile_id: app_profile_id,
653
+ row_key: row_key,
654
+ predicate_filter: predicate_filter,
655
+ true_mutations: true_mutations,
656
+ false_mutations: false_mutations
657
+ }.delete_if { |_, v| v.nil? }
658
+ )
729
659
  end
730
660
 
731
661
  def read_modify_write_row table_name, row_key, rules, app_profile_id: nil
732
- execute do
733
- client.read_modify_write_row table_name, row_key, rules, app_profile_id: app_profile_id
734
- end
662
+ client.read_modify_write_row(
663
+ {
664
+ table_name: table_name,
665
+ app_profile_id: app_profile_id,
666
+ row_key: row_key,
667
+ rules: rules
668
+ }.delete_if { |_, v| v.nil? }
669
+ )
735
670
  end
736
671
 
737
672
  ##
738
673
  # Starts creating a new backup. The underlying Google::Longrunning::Operation tracks creation of the backup.
739
674
  #
740
- # @return [Google::Gax::Operation]
675
+ # @return [Gapic::Operation]
741
676
  #
742
677
  def create_backup instance_id:, cluster_id:, backup_id:, source_table_id:, expire_time:
743
- backup = Google::Bigtable::Admin::V2::Backup.new source_table: table_path(instance_id, source_table_id),
744
- expire_time: expire_time
745
- execute do
746
- tables.create_backup cluster_path(instance_id, cluster_id), backup_id, backup
747
- end
678
+ backup = Google::Cloud::Bigtable::Admin::V2::Backup.new \
679
+ source_table: table_path(instance_id, source_table_id), expire_time: expire_time
680
+ tables.create_backup parent: cluster_path(instance_id, cluster_id), backup_id: backup_id, backup: backup
748
681
  end
749
682
 
750
683
  ##
751
- # @return [Google::Bigtable::Admin::V2::Backup]
684
+ # @return [Google::Cloud::Bigtable::Admin::V2::Backup]
752
685
  #
753
686
  def get_backup instance_id, cluster_id, backup_id
754
- execute do
755
- tables.get_backup backup_path(instance_id, cluster_id, backup_id)
756
- end
687
+ tables.get_backup name: backup_path(instance_id, cluster_id, backup_id)
757
688
  end
758
689
 
759
690
  ##
760
- # @return [Google::Gax::PagedEnumerable<Google::Bigtable::Admin::V2::Backup>]
691
+ # @return [Gapic::PagedEnumerable<Google::Cloud::Bigtable::Admin::V2::Backup>]
761
692
  #
762
693
  def list_backups instance_id, cluster_id
763
- execute do
764
- tables.list_backups cluster_path(instance_id, cluster_id)
765
- end
694
+ tables.list_backups parent: cluster_path(instance_id, cluster_id)
766
695
  end
767
696
 
768
697
  ##
769
- # @param backup [Google::Bigtable::Admin::V2::Backup | Hash]
698
+ # @param backup [Google::Cloud::Bigtable::Admin::V2::Backup | Hash]
770
699
  # @param fields [Array(String|Symbol)] the paths of fields to be updated
771
700
  #
772
701
  def update_backup backup, fields
773
702
  mask = Google::Protobuf::FieldMask.new paths: fields.map(&:to_s)
774
- execute do
775
- tables.update_backup backup, mask
776
- end
703
+ tables.update_backup backup: backup, update_mask: mask
777
704
  end
778
705
 
779
706
  def delete_backup instance_id, cluster_id, backup_id
780
- execute do
781
- tables.delete_backup backup_path(instance_id, cluster_id, backup_id)
782
- end
707
+ tables.delete_backup name: backup_path(instance_id, cluster_id, backup_id)
783
708
  end
784
709
 
785
710
  ##
@@ -790,30 +715,15 @@ module Google
790
715
  # @param cluster_id [String] The cluster ID for the source backup.
791
716
  # @param backup_id [String] The backup ID for the source backup.
792
717
  #
793
- # @return [Google::Gax::Operation] The {Google::Longrunning::Operation#metadata metadata} field type is
794
- # {Google::Bigtable::Admin::RestoreTableMetadata RestoreTableMetadata}. The
795
- # {Google::Longrunning::Operation#response response} type is {Google::Bigtable::Admin::V2::Table Table}, if
796
- # successful.
718
+ # @return [Gapic::Operation] The {Google::Longrunning::Operation#metadata metadata} field type is
719
+ # {Google::Cloud::Bigtable::Admin::RestoreTableMetadata RestoreTableMetadata}. The
720
+ # {Google::Longrunning::Operation#response response} type is
721
+ # {Google::Cloud::Bigtable::Admin::V2::Table Table}, if successful.
797
722
  #
798
723
  def restore_table table_id, instance_id, cluster_id, backup_id
799
- execute do
800
- tables.restore_table instance_path(instance_id),
801
- table_id: table_id,
802
- backup: backup_path(instance_id, cluster_id, backup_id)
803
- end
804
- end
805
-
806
- ##
807
- # Executes the API call and wrap errors to {Google::Cloud::Error}.
808
- #
809
- # @raise [Google::Cloud::Error]
810
- #
811
- def execute
812
- yield
813
- rescue Google::Gax::GaxError => e
814
- raise Google::Cloud::Error.from_error(e.cause)
815
- rescue GRPC::BadStatus => e
816
- raise Google::Cloud::Error.from_error(e)
724
+ tables.restore_table parent: instance_path(instance_id),
725
+ table_id: table_id,
726
+ backup: backup_path(instance_id, cluster_id, backup_id)
817
727
  end
818
728
 
819
729
  ##
@@ -824,7 +734,7 @@ module Google
824
734
  # +projects/<project>+
825
735
  #
826
736
  def project_path
827
- Admin::V2::BigtableInstanceAdminClient.project_path project_id
737
+ Admin::V2::BigtableInstanceAdmin::Paths.project_path project: project_id
828
738
  end
829
739
 
830
740
  ##
@@ -836,7 +746,7 @@ module Google
836
746
  # +projects/<project>/instances/[a-z][a-z0-9\\-]+[a-z0-9]+.
837
747
  #
838
748
  def instance_path instance_id
839
- Admin::V2::BigtableInstanceAdminClient.instance_path project_id, instance_id
749
+ Admin::V2::BigtableInstanceAdmin::Paths.instance_path project: project_id, instance: instance_id
840
750
  end
841
751
 
842
752
  ##
@@ -849,7 +759,9 @@ module Google
849
759
  # +projects/<project>/instances/<instance>/clusters/<cluster>+.
850
760
  #
851
761
  def cluster_path instance_id, cluster_id
852
- Admin::V2::BigtableInstanceAdminClient.cluster_path project_id, instance_id, cluster_id
762
+ Admin::V2::BigtableInstanceAdmin::Paths.cluster_path project: project_id,
763
+ instance: instance_id,
764
+ cluster: cluster_id
853
765
  end
854
766
 
855
767
  ##
@@ -862,7 +774,7 @@ module Google
862
774
  # +projects/<project_id>/locations/<location>+.
863
775
  #
864
776
  def location_path location
865
- Admin::V2::BigtableInstanceAdminClient.location_path project_id, location
777
+ Admin::V2::BigtableInstanceAdmin::Paths.location_path project: project_id, location: location
866
778
  end
867
779
 
868
780
  ##
@@ -874,7 +786,7 @@ module Google
874
786
  # +projects/<project>/instances/<instance>/tables/<table>+
875
787
  #
876
788
  def table_path instance_id, table_id
877
- Admin::V2::BigtableTableAdminClient.table_path project_id, instance_id, table_id
789
+ Admin::V2::BigtableTableAdmin::Paths.table_path project: project_id, instance: instance_id, table: table_id
878
790
  end
879
791
 
880
792
  ##
@@ -887,7 +799,9 @@ module Google
887
799
  # +projects/<project>/instances/<instance>/appProfiles/<app_profile>+
888
800
  #
889
801
  def app_profile_path instance_id, app_profile_id
890
- Admin::V2::BigtableInstanceAdminClient.app_profile_path project_id, instance_id, app_profile_id
802
+ Admin::V2::BigtableInstanceAdmin::Paths.app_profile_path project: project_id,
803
+ instance: instance_id,
804
+ app_profile: app_profile_id
891
805
  end
892
806
 
893
807
  ##
@@ -897,7 +811,10 @@ module Google
897
811
  # `projects/<project>/instances/<instance>/clusters/<cluster>/backups/<backup>`
898
812
  #
899
813
  def backup_path instance_id, cluster_id, backup_id
900
- Admin::V2::BigtableTableAdminClient.backup_path project_id, instance_id, cluster_id, backup_id
814
+ Admin::V2::BigtableTableAdmin::Paths.backup_path project: project_id,
815
+ instance: instance_id,
816
+ cluster: cluster_id,
817
+ backup: backup_id
901
818
  end
902
819
 
903
820
  ##