google-cloud-bigtable-admin-v2 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (45) hide show
  1. checksums.yaml +7 -0
  2. data/.yardopts +12 -0
  3. data/AUTHENTICATION.md +169 -0
  4. data/LICENSE.md +203 -0
  5. data/README.md +75 -0
  6. data/lib/google-cloud-bigtable-admin-v2.rb +21 -0
  7. data/lib/google/bigtable/admin/v2/bigtable_instance_admin_pb.rb +148 -0
  8. data/lib/google/bigtable/admin/v2/bigtable_instance_admin_services_pb.rb +91 -0
  9. data/lib/google/bigtable/admin/v2/bigtable_table_admin_pb.rb +211 -0
  10. data/lib/google/bigtable/admin/v2/bigtable_table_admin_services_pb.rb +155 -0
  11. data/lib/google/bigtable/admin/v2/common_pb.rb +33 -0
  12. data/lib/google/bigtable/admin/v2/instance_pb.rb +77 -0
  13. data/lib/google/bigtable/admin/v2/table_pb.rb +130 -0
  14. data/lib/google/cloud/bigtable/admin/v2.rb +38 -0
  15. data/lib/google/cloud/bigtable/admin/v2/bigtable_instance_admin.rb +54 -0
  16. data/lib/google/cloud/bigtable/admin/v2/bigtable_instance_admin/client.rb +1940 -0
  17. data/lib/google/cloud/bigtable/admin/v2/bigtable_instance_admin/credentials.rb +59 -0
  18. data/lib/google/cloud/bigtable/admin/v2/bigtable_instance_admin/operations.rb +572 -0
  19. data/lib/google/cloud/bigtable/admin/v2/bigtable_instance_admin/paths.rb +121 -0
  20. data/lib/google/cloud/bigtable/admin/v2/bigtable_table_admin.rb +56 -0
  21. data/lib/google/cloud/bigtable/admin/v2/bigtable_table_admin/client.rb +2293 -0
  22. data/lib/google/cloud/bigtable/admin/v2/bigtable_table_admin/credentials.rb +58 -0
  23. data/lib/google/cloud/bigtable/admin/v2/bigtable_table_admin/operations.rb +572 -0
  24. data/lib/google/cloud/bigtable/admin/v2/bigtable_table_admin/paths.rb +132 -0
  25. data/lib/google/cloud/bigtable/admin/v2/version.rb +30 -0
  26. data/proto_docs/README.md +4 -0
  27. data/proto_docs/google/api/field_behavior.rb +59 -0
  28. data/proto_docs/google/api/resource.rb +247 -0
  29. data/proto_docs/google/bigtable/admin/v2/bigtable_instance_admin.rb +378 -0
  30. data/proto_docs/google/bigtable/admin/v2/bigtable_table_admin.rb +686 -0
  31. data/proto_docs/google/bigtable/admin/v2/common.rb +58 -0
  32. data/proto_docs/google/bigtable/admin/v2/instance.rb +223 -0
  33. data/proto_docs/google/bigtable/admin/v2/table.rb +357 -0
  34. data/proto_docs/google/iam/v1/iam_policy.rb +80 -0
  35. data/proto_docs/google/iam/v1/options.rb +40 -0
  36. data/proto_docs/google/iam/v1/policy.rb +248 -0
  37. data/proto_docs/google/longrunning/operations.rb +150 -0
  38. data/proto_docs/google/protobuf/any.rb +138 -0
  39. data/proto_docs/google/protobuf/duration.rb +98 -0
  40. data/proto_docs/google/protobuf/empty.rb +36 -0
  41. data/proto_docs/google/protobuf/field_mask.rb +229 -0
  42. data/proto_docs/google/protobuf/timestamp.rb +120 -0
  43. data/proto_docs/google/rpc/status.rb +46 -0
  44. data/proto_docs/google/type/expr.rb +52 -0
  45. metadata +246 -0
@@ -0,0 +1,121 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Copyright 2020 Google LLC
4
+ #
5
+ # Licensed under the Apache License, Version 2.0 (the "License");
6
+ # you may not use this file except in compliance with the License.
7
+ # You may obtain a copy of the License at
8
+ #
9
+ # https://www.apache.org/licenses/LICENSE-2.0
10
+ #
11
+ # Unless required by applicable law or agreed to in writing, software
12
+ # distributed under the License is distributed on an "AS IS" BASIS,
13
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ # See the License for the specific language governing permissions and
15
+ # limitations under the License.
16
+
17
+ # Auto-generated by gapic-generator-ruby. DO NOT EDIT!
18
+
19
+
20
+ module Google
21
+ module Cloud
22
+ module Bigtable
23
+ module Admin
24
+ module V2
25
+ module BigtableInstanceAdmin
26
+ # Path helper methods for the BigtableInstanceAdmin API.
27
+ module Paths
28
+ ##
29
+ # Create a fully-qualified AppProfile resource string.
30
+ #
31
+ # The resource will be in the following format:
32
+ #
33
+ # `projects/{project}/instances/{instance}/appProfiles/{app_profile}`
34
+ #
35
+ # @param project [String]
36
+ # @param instance [String]
37
+ # @param app_profile [String]
38
+ #
39
+ # @return [::String]
40
+ def app_profile_path project:, instance:, app_profile:
41
+ raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/"
42
+ raise ::ArgumentError, "instance cannot contain /" if instance.to_s.include? "/"
43
+
44
+ "projects/#{project}/instances/#{instance}/appProfiles/#{app_profile}"
45
+ end
46
+
47
+ ##
48
+ # Create a fully-qualified Cluster resource string.
49
+ #
50
+ # The resource will be in the following format:
51
+ #
52
+ # `projects/{project}/instances/{instance}/clusters/{cluster}`
53
+ #
54
+ # @param project [String]
55
+ # @param instance [String]
56
+ # @param cluster [String]
57
+ #
58
+ # @return [::String]
59
+ def cluster_path project:, instance:, cluster:
60
+ raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/"
61
+ raise ::ArgumentError, "instance cannot contain /" if instance.to_s.include? "/"
62
+
63
+ "projects/#{project}/instances/#{instance}/clusters/#{cluster}"
64
+ end
65
+
66
+ ##
67
+ # Create a fully-qualified Instance resource string.
68
+ #
69
+ # The resource will be in the following format:
70
+ #
71
+ # `projects/{project}/instances/{instance}`
72
+ #
73
+ # @param project [String]
74
+ # @param instance [String]
75
+ #
76
+ # @return [::String]
77
+ def instance_path project:, instance:
78
+ raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/"
79
+
80
+ "projects/#{project}/instances/#{instance}"
81
+ end
82
+
83
+ ##
84
+ # Create a fully-qualified Location resource string.
85
+ #
86
+ # The resource will be in the following format:
87
+ #
88
+ # `projects/{project}/locations/{location}`
89
+ #
90
+ # @param project [String]
91
+ # @param location [String]
92
+ #
93
+ # @return [::String]
94
+ def location_path project:, location:
95
+ raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/"
96
+
97
+ "projects/#{project}/locations/#{location}"
98
+ end
99
+
100
+ ##
101
+ # Create a fully-qualified Project resource string.
102
+ #
103
+ # The resource will be in the following format:
104
+ #
105
+ # `projects/{project}`
106
+ #
107
+ # @param project [String]
108
+ #
109
+ # @return [::String]
110
+ def project_path project:
111
+ "projects/#{project}"
112
+ end
113
+
114
+ extend self
115
+ end
116
+ end
117
+ end
118
+ end
119
+ end
120
+ end
121
+ end
@@ -0,0 +1,56 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Copyright 2020 Google LLC
4
+ #
5
+ # Licensed under the Apache License, Version 2.0 (the "License");
6
+ # you may not use this file except in compliance with the License.
7
+ # You may obtain a copy of the License at
8
+ #
9
+ # https://www.apache.org/licenses/LICENSE-2.0
10
+ #
11
+ # Unless required by applicable law or agreed to in writing, software
12
+ # distributed under the License is distributed on an "AS IS" BASIS,
13
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ # See the License for the specific language governing permissions and
15
+ # limitations under the License.
16
+
17
+ # Auto-generated by gapic-generator-ruby. DO NOT EDIT!
18
+
19
+ require "gapic/common"
20
+ require "gapic/config"
21
+ require "gapic/config/method"
22
+
23
+ require "google/cloud/bigtable/admin/v2/version"
24
+
25
+ require "google/cloud/bigtable/admin/v2/bigtable_table_admin/credentials"
26
+ require "google/cloud/bigtable/admin/v2/bigtable_table_admin/paths"
27
+ require "google/cloud/bigtable/admin/v2/bigtable_table_admin/operations"
28
+ require "google/cloud/bigtable/admin/v2/bigtable_table_admin/client"
29
+
30
+ module Google
31
+ module Cloud
32
+ module Bigtable
33
+ module Admin
34
+ module V2
35
+ ##
36
+ # Service for creating, configuring, and deleting Cloud Bigtable tables.
37
+ #
38
+ #
39
+ # Provides access to the table schemas only, not the data stored within
40
+ # the tables.
41
+ #
42
+ # To load this service and instantiate a client:
43
+ #
44
+ # require "google/cloud/bigtable/admin/v2/bigtable_table_admin"
45
+ # client = ::Google::Cloud::Bigtable::Admin::V2::BigtableTableAdmin::Client.new
46
+ #
47
+ module BigtableTableAdmin
48
+ end
49
+ end
50
+ end
51
+ end
52
+ end
53
+ end
54
+
55
+ helper_path = ::File.join __dir__, "bigtable_table_admin", "helpers.rb"
56
+ require "google/cloud/bigtable/admin/v2/bigtable_table_admin/helpers" if ::File.file? helper_path
@@ -0,0 +1,2293 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Copyright 2020 Google LLC
4
+ #
5
+ # Licensed under the Apache License, Version 2.0 (the "License");
6
+ # you may not use this file except in compliance with the License.
7
+ # You may obtain a copy of the License at
8
+ #
9
+ # https://www.apache.org/licenses/LICENSE-2.0
10
+ #
11
+ # Unless required by applicable law or agreed to in writing, software
12
+ # distributed under the License is distributed on an "AS IS" BASIS,
13
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ # See the License for the specific language governing permissions and
15
+ # limitations under the License.
16
+
17
+ # Auto-generated by gapic-generator-ruby. DO NOT EDIT!
18
+
19
+ require "google/cloud/errors"
20
+ require "google/bigtable/admin/v2/bigtable_table_admin_pb"
21
+
22
+ module Google
23
+ module Cloud
24
+ module Bigtable
25
+ module Admin
26
+ module V2
27
+ module BigtableTableAdmin
28
+ ##
29
+ # Client for the BigtableTableAdmin service.
30
+ #
31
+ # Service for creating, configuring, and deleting Cloud Bigtable tables.
32
+ #
33
+ #
34
+ # Provides access to the table schemas only, not the data stored within
35
+ # the tables.
36
+ #
37
+ class Client
38
+ include Paths
39
+
40
+ # @private
41
+ attr_reader :bigtable_table_admin_stub
42
+
43
+ ##
44
+ # Configure the BigtableTableAdmin Client class.
45
+ #
46
+ # See {::Google::Cloud::Bigtable::Admin::V2::BigtableTableAdmin::Client::Configuration}
47
+ # for a description of the configuration fields.
48
+ #
49
+ # ## Example
50
+ #
51
+ # To modify the configuration for all BigtableTableAdmin clients:
52
+ #
53
+ # ::Google::Cloud::Bigtable::Admin::V2::BigtableTableAdmin::Client.configure do |config|
54
+ # config.timeout = 10.0
55
+ # end
56
+ #
57
+ # @yield [config] Configure the Client client.
58
+ # @yieldparam config [Client::Configuration]
59
+ #
60
+ # @return [Client::Configuration]
61
+ #
62
+ def self.configure
63
+ @configure ||= begin
64
+ namespace = ["Google", "Cloud", "Bigtable", "Admin", "V2"]
65
+ parent_config = while namespace.any?
66
+ parent_name = namespace.join "::"
67
+ parent_const = const_get parent_name
68
+ break parent_const.configure if parent_const&.respond_to? :configure
69
+ namespace.pop
70
+ end
71
+ default_config = Client::Configuration.new parent_config
72
+
73
+ default_config.rpcs.create_table.timeout = 300.0
74
+
75
+ default_config.rpcs.create_table_from_snapshot.timeout = 60.0
76
+
77
+ default_config.rpcs.list_tables.timeout = 60.0
78
+ default_config.rpcs.list_tables.retry_policy = {
79
+ initial_delay: 1.0,
80
+ max_delay: 60.0,
81
+ multiplier: 2,
82
+ retry_codes: ["UNAVAILABLE", "DEADLINE_EXCEEDED"]
83
+ }
84
+
85
+ default_config.rpcs.get_table.timeout = 60.0
86
+ default_config.rpcs.get_table.retry_policy = {
87
+ initial_delay: 1.0,
88
+ max_delay: 60.0,
89
+ multiplier: 2,
90
+ retry_codes: ["UNAVAILABLE", "DEADLINE_EXCEEDED"]
91
+ }
92
+
93
+ default_config.rpcs.delete_table.timeout = 60.0
94
+
95
+ default_config.rpcs.modify_column_families.timeout = 300.0
96
+
97
+ default_config.rpcs.drop_row_range.timeout = 3600.0
98
+
99
+ default_config.rpcs.generate_consistency_token.timeout = 60.0
100
+ default_config.rpcs.generate_consistency_token.retry_policy = {
101
+ initial_delay: 1.0,
102
+ max_delay: 60.0,
103
+ multiplier: 2,
104
+ retry_codes: ["UNAVAILABLE", "DEADLINE_EXCEEDED"]
105
+ }
106
+
107
+ default_config.rpcs.check_consistency.timeout = 60.0
108
+ default_config.rpcs.check_consistency.retry_policy = {
109
+ initial_delay: 1.0,
110
+ max_delay: 60.0,
111
+ multiplier: 2,
112
+ retry_codes: ["UNAVAILABLE", "DEADLINE_EXCEEDED"]
113
+ }
114
+
115
+ default_config.rpcs.snapshot_table.timeout = 60.0
116
+
117
+ default_config.rpcs.get_snapshot.timeout = 60.0
118
+ default_config.rpcs.get_snapshot.retry_policy = {
119
+ initial_delay: 1.0,
120
+ max_delay: 60.0,
121
+ multiplier: 2,
122
+ retry_codes: ["UNAVAILABLE", "DEADLINE_EXCEEDED"]
123
+ }
124
+
125
+ default_config.rpcs.list_snapshots.timeout = 60.0
126
+ default_config.rpcs.list_snapshots.retry_policy = {
127
+ initial_delay: 1.0,
128
+ max_delay: 60.0,
129
+ multiplier: 2,
130
+ retry_codes: ["UNAVAILABLE", "DEADLINE_EXCEEDED"]
131
+ }
132
+
133
+ default_config.rpcs.delete_snapshot.timeout = 60.0
134
+
135
+ default_config.rpcs.get_iam_policy.timeout = 60.0
136
+ default_config.rpcs.get_iam_policy.retry_policy = {
137
+ initial_delay: 1.0,
138
+ max_delay: 60.0,
139
+ multiplier: 2,
140
+ retry_codes: ["UNAVAILABLE", "DEADLINE_EXCEEDED"]
141
+ }
142
+
143
+ default_config.rpcs.set_iam_policy.timeout = 60.0
144
+
145
+ default_config.rpcs.test_iam_permissions.timeout = 60.0
146
+ default_config.rpcs.test_iam_permissions.retry_policy = {
147
+ initial_delay: 1.0,
148
+ max_delay: 60.0,
149
+ multiplier: 2,
150
+ retry_codes: ["UNAVAILABLE", "DEADLINE_EXCEEDED"]
151
+ }
152
+
153
+ default_config
154
+ end
155
+ yield @configure if block_given?
156
+ @configure
157
+ end
158
+
159
+ ##
160
+ # Configure the BigtableTableAdmin Client instance.
161
+ #
162
+ # The configuration is set to the derived mode, meaning that values can be changed,
163
+ # but structural changes (adding new fields, etc.) are not allowed. Structural changes
164
+ # should be made on {Client.configure}.
165
+ #
166
+ # See {::Google::Cloud::Bigtable::Admin::V2::BigtableTableAdmin::Client::Configuration}
167
+ # for a description of the configuration fields.
168
+ #
169
+ # @yield [config] Configure the Client client.
170
+ # @yieldparam config [Client::Configuration]
171
+ #
172
+ # @return [Client::Configuration]
173
+ #
174
+ def configure
175
+ yield @config if block_given?
176
+ @config
177
+ end
178
+
179
+ ##
180
+ # Create a new BigtableTableAdmin client object.
181
+ #
182
+ # ## Examples
183
+ #
184
+ # To create a new BigtableTableAdmin client with the default
185
+ # configuration:
186
+ #
187
+ # client = ::Google::Cloud::Bigtable::Admin::V2::BigtableTableAdmin::Client.new
188
+ #
189
+ # To create a new BigtableTableAdmin client with a custom
190
+ # configuration:
191
+ #
192
+ # client = ::Google::Cloud::Bigtable::Admin::V2::BigtableTableAdmin::Client.new do |config|
193
+ # config.timeout = 10.0
194
+ # end
195
+ #
196
+ # @yield [config] Configure the BigtableTableAdmin client.
197
+ # @yieldparam config [Client::Configuration]
198
+ #
199
+ def initialize
200
+ # These require statements are intentionally placed here to initialize
201
+ # the gRPC module only when it's required.
202
+ # See https://github.com/googleapis/toolkit/issues/446
203
+ require "gapic/grpc"
204
+ require "google/bigtable/admin/v2/bigtable_table_admin_services_pb"
205
+
206
+ # Create the configuration object
207
+ @config = Configuration.new Client.configure
208
+
209
+ # Yield the configuration if needed
210
+ yield @config if block_given?
211
+
212
+ # Create credentials
213
+ credentials = @config.credentials
214
+ credentials ||= Credentials.default scope: @config.scope
215
+ if credentials.is_a?(String) || credentials.is_a?(Hash)
216
+ credentials = Credentials.new credentials, scope: @config.scope
217
+ end
218
+ @quota_project_id = @config.quota_project
219
+ @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id
220
+
221
+ @operations_client = Operations.new do |config|
222
+ config.credentials = credentials
223
+ config.endpoint = @config.endpoint
224
+ end
225
+
226
+ @bigtable_table_admin_stub = ::Gapic::ServiceStub.new(
227
+ ::Google::Cloud::Bigtable::Admin::V2::BigtableTableAdmin::Stub,
228
+ credentials: credentials,
229
+ endpoint: @config.endpoint,
230
+ channel_args: @config.channel_args,
231
+ interceptors: @config.interceptors
232
+ )
233
+ end
234
+
235
+ ##
236
+ # Get the associated client for long-running operations.
237
+ #
238
+ # @return [::Google::Cloud::Bigtable::Admin::V2::BigtableTableAdmin::Operations]
239
+ #
240
+ attr_reader :operations_client
241
+
242
+ # Service calls
243
+
244
+ ##
245
+ # Creates a new table in the specified instance.
246
+ # The table can be created with a full set of initial column families,
247
+ # specified in the request.
248
+ #
249
+ # @overload create_table(request, options = nil)
250
+ # Pass arguments to `create_table` via a request object, either of type
251
+ # {::Google::Cloud::Bigtable::Admin::V2::CreateTableRequest} or an equivalent Hash.
252
+ #
253
+ # @param request [::Google::Cloud::Bigtable::Admin::V2::CreateTableRequest, ::Hash]
254
+ # A request object representing the call parameters. Required. To specify no
255
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
256
+ # @param options [::Gapic::CallOptions, ::Hash]
257
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
258
+ #
259
+ # @overload create_table(parent: nil, table_id: nil, table: nil, initial_splits: nil)
260
+ # Pass arguments to `create_table` via keyword arguments. Note that at
261
+ # least one keyword argument is required. To specify no parameters, or to keep all
262
+ # the default parameter values, pass an empty Hash as a request object (see above).
263
+ #
264
+ # @param parent [::String]
265
+ # Required. The unique name of the instance in which to create the table.
266
+ # Values are of the form `projects/{project}/instances/{instance}`.
267
+ # @param table_id [::String]
268
+ # Required. The name by which the new table should be referred to within the
269
+ # parent instance, e.g., `foobar` rather than `{parent}/tables/foobar`.
270
+ # Maximum 50 characters.
271
+ # @param table [::Google::Cloud::Bigtable::Admin::V2::Table, ::Hash]
272
+ # Required. The Table to create.
273
+ # @param initial_splits [::Array<::Google::Cloud::Bigtable::Admin::V2::CreateTableRequest::Split, ::Hash>]
274
+ # The optional list of row keys that will be used to initially split the
275
+ # table into several tablets (tablets are similar to HBase regions).
276
+ # Given two split keys, `s1` and `s2`, three tablets will be created,
277
+ # spanning the key ranges: `[, s1), [s1, s2), [s2, )`.
278
+ #
279
+ # Example:
280
+ #
281
+ # * Row keys := `["a", "apple", "custom", "customer_1", "customer_2",`
282
+ # `"other", "zz"]`
283
+ # * initial_split_keys := `["apple", "customer_1", "customer_2", "other"]`
284
+ # * Key assignment:
285
+ # - Tablet 1 `[, apple) => {"a"}.`
286
+ # - Tablet 2 `[apple, customer_1) => {"apple", "custom"}.`
287
+ # - Tablet 3 `[customer_1, customer_2) => {"customer_1"}.`
288
+ # - Tablet 4 `[customer_2, other) => {"customer_2"}.`
289
+ # - Tablet 5 `[other, ) => {"other", "zz"}.`
290
+ #
291
+ # @yield [response, operation] Access the result along with the RPC operation
292
+ # @yieldparam response [::Google::Cloud::Bigtable::Admin::V2::Table]
293
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
294
+ #
295
+ # @return [::Google::Cloud::Bigtable::Admin::V2::Table]
296
+ #
297
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
298
+ #
299
+ def create_table request, options = nil
300
+ raise ::ArgumentError, "request must be provided" if request.nil?
301
+
302
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigtable::Admin::V2::CreateTableRequest
303
+
304
+ # Converts hash and nil to an options object
305
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
306
+
307
+ # Customize the options with defaults
308
+ metadata = @config.rpcs.create_table.metadata.to_h
309
+
310
+ # Set x-goog-api-client and x-goog-user-project headers
311
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
312
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
313
+ gapic_version: ::Google::Cloud::Bigtable::Admin::V2::VERSION
314
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
315
+
316
+ header_params = {
317
+ "parent" => request.parent
318
+ }
319
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
320
+ metadata[:"x-goog-request-params"] ||= request_params_header
321
+
322
+ options.apply_defaults timeout: @config.rpcs.create_table.timeout,
323
+ metadata: metadata,
324
+ retry_policy: @config.rpcs.create_table.retry_policy
325
+ options.apply_defaults metadata: @config.metadata,
326
+ retry_policy: @config.retry_policy
327
+
328
+ @bigtable_table_admin_stub.call_rpc :create_table, request, options: options do |response, operation|
329
+ yield response, operation if block_given?
330
+ return response
331
+ end
332
+ rescue ::GRPC::BadStatus => e
333
+ raise ::Google::Cloud::Error.from_error(e)
334
+ end
335
+
336
+ ##
337
+ # Creates a new table from the specified snapshot. The target table must
338
+ # not exist. The snapshot and the table must be in the same instance.
339
+ #
340
+ # Note: This is a private alpha release of Cloud Bigtable snapshots. This
341
+ # feature is not currently available to most Cloud Bigtable customers. This
342
+ # feature might be changed in backward-incompatible ways and is not
343
+ # recommended for production use. It is not subject to any SLA or deprecation
344
+ # policy.
345
+ #
346
+ # @overload create_table_from_snapshot(request, options = nil)
347
+ # Pass arguments to `create_table_from_snapshot` via a request object, either of type
348
+ # {::Google::Cloud::Bigtable::Admin::V2::CreateTableFromSnapshotRequest} or an equivalent Hash.
349
+ #
350
+ # @param request [::Google::Cloud::Bigtable::Admin::V2::CreateTableFromSnapshotRequest, ::Hash]
351
+ # A request object representing the call parameters. Required. To specify no
352
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
353
+ # @param options [::Gapic::CallOptions, ::Hash]
354
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
355
+ #
356
+ # @overload create_table_from_snapshot(parent: nil, table_id: nil, source_snapshot: nil)
357
+ # Pass arguments to `create_table_from_snapshot` via keyword arguments. Note that at
358
+ # least one keyword argument is required. To specify no parameters, or to keep all
359
+ # the default parameter values, pass an empty Hash as a request object (see above).
360
+ #
361
+ # @param parent [::String]
362
+ # Required. The unique name of the instance in which to create the table.
363
+ # Values are of the form `projects/{project}/instances/{instance}`.
364
+ # @param table_id [::String]
365
+ # Required. The name by which the new table should be referred to within the
366
+ # parent instance, e.g., `foobar` rather than `{parent}/tables/foobar`.
367
+ # @param source_snapshot [::String]
368
+ # Required. The unique name of the snapshot from which to restore the table.
369
+ # The snapshot and the table must be in the same instance. Values are of the
370
+ # form
371
+ # `projects/{project}/instances/{instance}/clusters/{cluster}/snapshots/{snapshot}`.
372
+ #
373
+ # @yield [response, operation] Access the result along with the RPC operation
374
+ # @yieldparam response [::Gapic::Operation]
375
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
376
+ #
377
+ # @return [::Gapic::Operation]
378
+ #
379
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
380
+ #
381
+ def create_table_from_snapshot request, options = nil
382
+ raise ::ArgumentError, "request must be provided" if request.nil?
383
+
384
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigtable::Admin::V2::CreateTableFromSnapshotRequest
385
+
386
+ # Converts hash and nil to an options object
387
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
388
+
389
+ # Customize the options with defaults
390
+ metadata = @config.rpcs.create_table_from_snapshot.metadata.to_h
391
+
392
+ # Set x-goog-api-client and x-goog-user-project headers
393
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
394
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
395
+ gapic_version: ::Google::Cloud::Bigtable::Admin::V2::VERSION
396
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
397
+
398
+ header_params = {
399
+ "parent" => request.parent
400
+ }
401
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
402
+ metadata[:"x-goog-request-params"] ||= request_params_header
403
+
404
+ options.apply_defaults timeout: @config.rpcs.create_table_from_snapshot.timeout,
405
+ metadata: metadata,
406
+ retry_policy: @config.rpcs.create_table_from_snapshot.retry_policy
407
+ options.apply_defaults metadata: @config.metadata,
408
+ retry_policy: @config.retry_policy
409
+
410
+ @bigtable_table_admin_stub.call_rpc :create_table_from_snapshot, request, options: options do |response, operation|
411
+ response = ::Gapic::Operation.new response, @operations_client, options: options
412
+ yield response, operation if block_given?
413
+ return response
414
+ end
415
+ rescue ::GRPC::BadStatus => e
416
+ raise ::Google::Cloud::Error.from_error(e)
417
+ end
418
+
419
+ ##
420
+ # Lists all tables served from a specified instance.
421
+ #
422
+ # @overload list_tables(request, options = nil)
423
+ # Pass arguments to `list_tables` via a request object, either of type
424
+ # {::Google::Cloud::Bigtable::Admin::V2::ListTablesRequest} or an equivalent Hash.
425
+ #
426
+ # @param request [::Google::Cloud::Bigtable::Admin::V2::ListTablesRequest, ::Hash]
427
+ # A request object representing the call parameters. Required. To specify no
428
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
429
+ # @param options [::Gapic::CallOptions, ::Hash]
430
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
431
+ #
432
+ # @overload list_tables(parent: nil, view: nil, page_size: nil, page_token: nil)
433
+ # Pass arguments to `list_tables` via keyword arguments. Note that at
434
+ # least one keyword argument is required. To specify no parameters, or to keep all
435
+ # the default parameter values, pass an empty Hash as a request object (see above).
436
+ #
437
+ # @param parent [::String]
438
+ # Required. The unique name of the instance for which tables should be
439
+ # listed. Values are of the form `projects/{project}/instances/{instance}`.
440
+ # @param view [::Google::Cloud::Bigtable::Admin::V2::Table::View]
441
+ # The view to be applied to the returned tables' fields.
442
+ # Only NAME_ONLY view (default) and REPLICATION_VIEW are supported.
443
+ # @param page_size [::Integer]
444
+ # Maximum number of results per page.
445
+ #
446
+ # A page_size of zero lets the server choose the number of items to return.
447
+ # A page_size which is strictly positive will return at most that many items.
448
+ # A negative page_size will cause an error.
449
+ #
450
+ # Following the first request, subsequent paginated calls are not required
451
+ # to pass a page_size. If a page_size is set in subsequent calls, it must
452
+ # match the page_size given in the first request.
453
+ # @param page_token [::String]
454
+ # The value of `next_page_token` returned by a previous call.
455
+ #
456
+ # @yield [response, operation] Access the result along with the RPC operation
457
+ # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Bigtable::Admin::V2::Table>]
458
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
459
+ #
460
+ # @return [::Gapic::PagedEnumerable<::Google::Cloud::Bigtable::Admin::V2::Table>]
461
+ #
462
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
463
+ #
464
+ def list_tables request, options = nil
465
+ raise ::ArgumentError, "request must be provided" if request.nil?
466
+
467
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigtable::Admin::V2::ListTablesRequest
468
+
469
+ # Converts hash and nil to an options object
470
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
471
+
472
+ # Customize the options with defaults
473
+ metadata = @config.rpcs.list_tables.metadata.to_h
474
+
475
+ # Set x-goog-api-client and x-goog-user-project headers
476
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
477
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
478
+ gapic_version: ::Google::Cloud::Bigtable::Admin::V2::VERSION
479
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
480
+
481
+ header_params = {
482
+ "parent" => request.parent
483
+ }
484
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
485
+ metadata[:"x-goog-request-params"] ||= request_params_header
486
+
487
+ options.apply_defaults timeout: @config.rpcs.list_tables.timeout,
488
+ metadata: metadata,
489
+ retry_policy: @config.rpcs.list_tables.retry_policy
490
+ options.apply_defaults metadata: @config.metadata,
491
+ retry_policy: @config.retry_policy
492
+
493
+ @bigtable_table_admin_stub.call_rpc :list_tables, request, options: options do |response, operation|
494
+ response = ::Gapic::PagedEnumerable.new @bigtable_table_admin_stub, :list_tables, request, response, operation, options
495
+ yield response, operation if block_given?
496
+ return response
497
+ end
498
+ rescue ::GRPC::BadStatus => e
499
+ raise ::Google::Cloud::Error.from_error(e)
500
+ end
501
+
502
+ ##
503
+ # Gets metadata information about the specified table.
504
+ #
505
+ # @overload get_table(request, options = nil)
506
+ # Pass arguments to `get_table` via a request object, either of type
507
+ # {::Google::Cloud::Bigtable::Admin::V2::GetTableRequest} or an equivalent Hash.
508
+ #
509
+ # @param request [::Google::Cloud::Bigtable::Admin::V2::GetTableRequest, ::Hash]
510
+ # A request object representing the call parameters. Required. To specify no
511
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
512
+ # @param options [::Gapic::CallOptions, ::Hash]
513
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
514
+ #
515
+ # @overload get_table(name: nil, view: nil)
516
+ # Pass arguments to `get_table` via keyword arguments. Note that at
517
+ # least one keyword argument is required. To specify no parameters, or to keep all
518
+ # the default parameter values, pass an empty Hash as a request object (see above).
519
+ #
520
+ # @param name [::String]
521
+ # Required. The unique name of the requested table.
522
+ # Values are of the form
523
+ # `projects/{project}/instances/{instance}/tables/{table}`.
524
+ # @param view [::Google::Cloud::Bigtable::Admin::V2::Table::View]
525
+ # The view to be applied to the returned table's fields.
526
+ # Defaults to `SCHEMA_VIEW` if unspecified.
527
+ #
528
+ # @yield [response, operation] Access the result along with the RPC operation
529
+ # @yieldparam response [::Google::Cloud::Bigtable::Admin::V2::Table]
530
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
531
+ #
532
+ # @return [::Google::Cloud::Bigtable::Admin::V2::Table]
533
+ #
534
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
535
+ #
536
+ def get_table request, options = nil
537
+ raise ::ArgumentError, "request must be provided" if request.nil?
538
+
539
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigtable::Admin::V2::GetTableRequest
540
+
541
+ # Converts hash and nil to an options object
542
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
543
+
544
+ # Customize the options with defaults
545
+ metadata = @config.rpcs.get_table.metadata.to_h
546
+
547
+ # Set x-goog-api-client and x-goog-user-project headers
548
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
549
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
550
+ gapic_version: ::Google::Cloud::Bigtable::Admin::V2::VERSION
551
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
552
+
553
+ header_params = {
554
+ "name" => request.name
555
+ }
556
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
557
+ metadata[:"x-goog-request-params"] ||= request_params_header
558
+
559
+ options.apply_defaults timeout: @config.rpcs.get_table.timeout,
560
+ metadata: metadata,
561
+ retry_policy: @config.rpcs.get_table.retry_policy
562
+ options.apply_defaults metadata: @config.metadata,
563
+ retry_policy: @config.retry_policy
564
+
565
+ @bigtable_table_admin_stub.call_rpc :get_table, request, options: options do |response, operation|
566
+ yield response, operation if block_given?
567
+ return response
568
+ end
569
+ rescue ::GRPC::BadStatus => e
570
+ raise ::Google::Cloud::Error.from_error(e)
571
+ end
572
+
573
+ ##
574
+ # Permanently deletes a specified table and all of its data.
575
+ #
576
+ # @overload delete_table(request, options = nil)
577
+ # Pass arguments to `delete_table` via a request object, either of type
578
+ # {::Google::Cloud::Bigtable::Admin::V2::DeleteTableRequest} or an equivalent Hash.
579
+ #
580
+ # @param request [::Google::Cloud::Bigtable::Admin::V2::DeleteTableRequest, ::Hash]
581
+ # A request object representing the call parameters. Required. To specify no
582
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
583
+ # @param options [::Gapic::CallOptions, ::Hash]
584
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
585
+ #
586
+ # @overload delete_table(name: nil)
587
+ # Pass arguments to `delete_table` via keyword arguments. Note that at
588
+ # least one keyword argument is required. To specify no parameters, or to keep all
589
+ # the default parameter values, pass an empty Hash as a request object (see above).
590
+ #
591
+ # @param name [::String]
592
+ # Required. The unique name of the table to be deleted.
593
+ # Values are of the form
594
+ # `projects/{project}/instances/{instance}/tables/{table}`.
595
+ #
596
+ # @yield [response, operation] Access the result along with the RPC operation
597
+ # @yieldparam response [::Google::Protobuf::Empty]
598
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
599
+ #
600
+ # @return [::Google::Protobuf::Empty]
601
+ #
602
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
603
+ #
604
+ def delete_table request, options = nil
605
+ raise ::ArgumentError, "request must be provided" if request.nil?
606
+
607
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigtable::Admin::V2::DeleteTableRequest
608
+
609
+ # Converts hash and nil to an options object
610
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
611
+
612
+ # Customize the options with defaults
613
+ metadata = @config.rpcs.delete_table.metadata.to_h
614
+
615
+ # Set x-goog-api-client and x-goog-user-project headers
616
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
617
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
618
+ gapic_version: ::Google::Cloud::Bigtable::Admin::V2::VERSION
619
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
620
+
621
+ header_params = {
622
+ "name" => request.name
623
+ }
624
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
625
+ metadata[:"x-goog-request-params"] ||= request_params_header
626
+
627
+ options.apply_defaults timeout: @config.rpcs.delete_table.timeout,
628
+ metadata: metadata,
629
+ retry_policy: @config.rpcs.delete_table.retry_policy
630
+ options.apply_defaults metadata: @config.metadata,
631
+ retry_policy: @config.retry_policy
632
+
633
+ @bigtable_table_admin_stub.call_rpc :delete_table, request, options: options do |response, operation|
634
+ yield response, operation if block_given?
635
+ return response
636
+ end
637
+ rescue ::GRPC::BadStatus => e
638
+ raise ::Google::Cloud::Error.from_error(e)
639
+ end
640
+
641
+ ##
642
+ # Performs a series of column family modifications on the specified table.
643
+ # Either all or none of the modifications will occur before this method
644
+ # returns, but data requests received prior to that point may see a table
645
+ # where only some modifications have taken effect.
646
+ #
647
+ # @overload modify_column_families(request, options = nil)
648
+ # Pass arguments to `modify_column_families` via a request object, either of type
649
+ # {::Google::Cloud::Bigtable::Admin::V2::ModifyColumnFamiliesRequest} or an equivalent Hash.
650
+ #
651
+ # @param request [::Google::Cloud::Bigtable::Admin::V2::ModifyColumnFamiliesRequest, ::Hash]
652
+ # A request object representing the call parameters. Required. To specify no
653
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
654
+ # @param options [::Gapic::CallOptions, ::Hash]
655
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
656
+ #
657
+ # @overload modify_column_families(name: nil, modifications: nil)
658
+ # Pass arguments to `modify_column_families` via keyword arguments. Note that at
659
+ # least one keyword argument is required. To specify no parameters, or to keep all
660
+ # the default parameter values, pass an empty Hash as a request object (see above).
661
+ #
662
+ # @param name [::String]
663
+ # Required. The unique name of the table whose families should be modified.
664
+ # Values are of the form
665
+ # `projects/{project}/instances/{instance}/tables/{table}`.
666
+ # @param modifications [::Array<::Google::Cloud::Bigtable::Admin::V2::ModifyColumnFamiliesRequest::Modification, ::Hash>]
667
+ # Required. Modifications to be atomically applied to the specified table's
668
+ # families. Entries are applied in order, meaning that earlier modifications
669
+ # can be masked by later ones (in the case of repeated updates to the same
670
+ # family, for example).
671
+ #
672
+ # @yield [response, operation] Access the result along with the RPC operation
673
+ # @yieldparam response [::Google::Cloud::Bigtable::Admin::V2::Table]
674
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
675
+ #
676
+ # @return [::Google::Cloud::Bigtable::Admin::V2::Table]
677
+ #
678
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
679
+ #
680
+ def modify_column_families request, options = nil
681
+ raise ::ArgumentError, "request must be provided" if request.nil?
682
+
683
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigtable::Admin::V2::ModifyColumnFamiliesRequest
684
+
685
+ # Converts hash and nil to an options object
686
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
687
+
688
+ # Customize the options with defaults
689
+ metadata = @config.rpcs.modify_column_families.metadata.to_h
690
+
691
+ # Set x-goog-api-client and x-goog-user-project headers
692
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
693
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
694
+ gapic_version: ::Google::Cloud::Bigtable::Admin::V2::VERSION
695
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
696
+
697
+ header_params = {
698
+ "name" => request.name
699
+ }
700
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
701
+ metadata[:"x-goog-request-params"] ||= request_params_header
702
+
703
+ options.apply_defaults timeout: @config.rpcs.modify_column_families.timeout,
704
+ metadata: metadata,
705
+ retry_policy: @config.rpcs.modify_column_families.retry_policy
706
+ options.apply_defaults metadata: @config.metadata,
707
+ retry_policy: @config.retry_policy
708
+
709
+ @bigtable_table_admin_stub.call_rpc :modify_column_families, request, options: options do |response, operation|
710
+ yield response, operation if block_given?
711
+ return response
712
+ end
713
+ rescue ::GRPC::BadStatus => e
714
+ raise ::Google::Cloud::Error.from_error(e)
715
+ end
716
+
717
+ ##
718
+ # Permanently drop/delete a row range from a specified table. The request can
719
+ # specify whether to delete all rows in a table, or only those that match a
720
+ # particular prefix.
721
+ #
722
+ # @overload drop_row_range(request, options = nil)
723
+ # Pass arguments to `drop_row_range` via a request object, either of type
724
+ # {::Google::Cloud::Bigtable::Admin::V2::DropRowRangeRequest} or an equivalent Hash.
725
+ #
726
+ # @param request [::Google::Cloud::Bigtable::Admin::V2::DropRowRangeRequest, ::Hash]
727
+ # A request object representing the call parameters. Required. To specify no
728
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
729
+ # @param options [::Gapic::CallOptions, ::Hash]
730
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
731
+ #
732
+ # @overload drop_row_range(name: nil, row_key_prefix: nil, delete_all_data_from_table: nil)
733
+ # Pass arguments to `drop_row_range` via keyword arguments. Note that at
734
+ # least one keyword argument is required. To specify no parameters, or to keep all
735
+ # the default parameter values, pass an empty Hash as a request object (see above).
736
+ #
737
+ # @param name [::String]
738
+ # Required. The unique name of the table on which to drop a range of rows.
739
+ # Values are of the form
740
+ # `projects/{project}/instances/{instance}/tables/{table}`.
741
+ # @param row_key_prefix [::String]
742
+ # Delete all rows that start with this row key prefix. Prefix cannot be
743
+ # zero length.
744
+ # @param delete_all_data_from_table [::Boolean]
745
+ # Delete all rows in the table. Setting this to false is a no-op.
746
+ #
747
+ # @yield [response, operation] Access the result along with the RPC operation
748
+ # @yieldparam response [::Google::Protobuf::Empty]
749
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
750
+ #
751
+ # @return [::Google::Protobuf::Empty]
752
+ #
753
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
754
+ #
755
+ def drop_row_range request, options = nil
756
+ raise ::ArgumentError, "request must be provided" if request.nil?
757
+
758
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigtable::Admin::V2::DropRowRangeRequest
759
+
760
+ # Converts hash and nil to an options object
761
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
762
+
763
+ # Customize the options with defaults
764
+ metadata = @config.rpcs.drop_row_range.metadata.to_h
765
+
766
+ # Set x-goog-api-client and x-goog-user-project headers
767
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
768
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
769
+ gapic_version: ::Google::Cloud::Bigtable::Admin::V2::VERSION
770
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
771
+
772
+ header_params = {
773
+ "name" => request.name
774
+ }
775
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
776
+ metadata[:"x-goog-request-params"] ||= request_params_header
777
+
778
+ options.apply_defaults timeout: @config.rpcs.drop_row_range.timeout,
779
+ metadata: metadata,
780
+ retry_policy: @config.rpcs.drop_row_range.retry_policy
781
+ options.apply_defaults metadata: @config.metadata,
782
+ retry_policy: @config.retry_policy
783
+
784
+ @bigtable_table_admin_stub.call_rpc :drop_row_range, request, options: options do |response, operation|
785
+ yield response, operation if block_given?
786
+ return response
787
+ end
788
+ rescue ::GRPC::BadStatus => e
789
+ raise ::Google::Cloud::Error.from_error(e)
790
+ end
791
+
792
+ ##
793
+ # Generates a consistency token for a Table, which can be used in
794
+ # CheckConsistency to check whether mutations to the table that finished
795
+ # before this call started have been replicated. The tokens will be available
796
+ # for 90 days.
797
+ #
798
+ # @overload generate_consistency_token(request, options = nil)
799
+ # Pass arguments to `generate_consistency_token` via a request object, either of type
800
+ # {::Google::Cloud::Bigtable::Admin::V2::GenerateConsistencyTokenRequest} or an equivalent Hash.
801
+ #
802
+ # @param request [::Google::Cloud::Bigtable::Admin::V2::GenerateConsistencyTokenRequest, ::Hash]
803
+ # A request object representing the call parameters. Required. To specify no
804
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
805
+ # @param options [::Gapic::CallOptions, ::Hash]
806
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
807
+ #
808
+ # @overload generate_consistency_token(name: nil)
809
+ # Pass arguments to `generate_consistency_token` via keyword arguments. Note that at
810
+ # least one keyword argument is required. To specify no parameters, or to keep all
811
+ # the default parameter values, pass an empty Hash as a request object (see above).
812
+ #
813
+ # @param name [::String]
814
+ # Required. The unique name of the Table for which to create a consistency
815
+ # token. Values are of the form
816
+ # `projects/{project}/instances/{instance}/tables/{table}`.
817
+ #
818
+ # @yield [response, operation] Access the result along with the RPC operation
819
+ # @yieldparam response [::Google::Cloud::Bigtable::Admin::V2::GenerateConsistencyTokenResponse]
820
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
821
+ #
822
+ # @return [::Google::Cloud::Bigtable::Admin::V2::GenerateConsistencyTokenResponse]
823
+ #
824
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
825
+ #
826
+ def generate_consistency_token request, options = nil
827
+ raise ::ArgumentError, "request must be provided" if request.nil?
828
+
829
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigtable::Admin::V2::GenerateConsistencyTokenRequest
830
+
831
+ # Converts hash and nil to an options object
832
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
833
+
834
+ # Customize the options with defaults
835
+ metadata = @config.rpcs.generate_consistency_token.metadata.to_h
836
+
837
+ # Set x-goog-api-client and x-goog-user-project headers
838
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
839
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
840
+ gapic_version: ::Google::Cloud::Bigtable::Admin::V2::VERSION
841
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
842
+
843
+ header_params = {
844
+ "name" => request.name
845
+ }
846
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
847
+ metadata[:"x-goog-request-params"] ||= request_params_header
848
+
849
+ options.apply_defaults timeout: @config.rpcs.generate_consistency_token.timeout,
850
+ metadata: metadata,
851
+ retry_policy: @config.rpcs.generate_consistency_token.retry_policy
852
+ options.apply_defaults metadata: @config.metadata,
853
+ retry_policy: @config.retry_policy
854
+
855
+ @bigtable_table_admin_stub.call_rpc :generate_consistency_token, request, options: options do |response, operation|
856
+ yield response, operation if block_given?
857
+ return response
858
+ end
859
+ rescue ::GRPC::BadStatus => e
860
+ raise ::Google::Cloud::Error.from_error(e)
861
+ end
862
+
863
+ ##
864
+ # Checks replication consistency based on a consistency token, that is, if
865
+ # replication has caught up based on the conditions specified in the token
866
+ # and the check request.
867
+ #
868
+ # @overload check_consistency(request, options = nil)
869
+ # Pass arguments to `check_consistency` via a request object, either of type
870
+ # {::Google::Cloud::Bigtable::Admin::V2::CheckConsistencyRequest} or an equivalent Hash.
871
+ #
872
+ # @param request [::Google::Cloud::Bigtable::Admin::V2::CheckConsistencyRequest, ::Hash]
873
+ # A request object representing the call parameters. Required. To specify no
874
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
875
+ # @param options [::Gapic::CallOptions, ::Hash]
876
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
877
+ #
878
+ # @overload check_consistency(name: nil, consistency_token: nil)
879
+ # Pass arguments to `check_consistency` via keyword arguments. Note that at
880
+ # least one keyword argument is required. To specify no parameters, or to keep all
881
+ # the default parameter values, pass an empty Hash as a request object (see above).
882
+ #
883
+ # @param name [::String]
884
+ # Required. The unique name of the Table for which to check replication
885
+ # consistency. Values are of the form
886
+ # `projects/{project}/instances/{instance}/tables/{table}`.
887
+ # @param consistency_token [::String]
888
+ # Required. The token created using GenerateConsistencyToken for the Table.
889
+ #
890
+ # @yield [response, operation] Access the result along with the RPC operation
891
+ # @yieldparam response [::Google::Cloud::Bigtable::Admin::V2::CheckConsistencyResponse]
892
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
893
+ #
894
+ # @return [::Google::Cloud::Bigtable::Admin::V2::CheckConsistencyResponse]
895
+ #
896
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
897
+ #
898
+ def check_consistency request, options = nil
899
+ raise ::ArgumentError, "request must be provided" if request.nil?
900
+
901
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigtable::Admin::V2::CheckConsistencyRequest
902
+
903
+ # Converts hash and nil to an options object
904
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
905
+
906
+ # Customize the options with defaults
907
+ metadata = @config.rpcs.check_consistency.metadata.to_h
908
+
909
+ # Set x-goog-api-client and x-goog-user-project headers
910
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
911
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
912
+ gapic_version: ::Google::Cloud::Bigtable::Admin::V2::VERSION
913
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
914
+
915
+ header_params = {
916
+ "name" => request.name
917
+ }
918
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
919
+ metadata[:"x-goog-request-params"] ||= request_params_header
920
+
921
+ options.apply_defaults timeout: @config.rpcs.check_consistency.timeout,
922
+ metadata: metadata,
923
+ retry_policy: @config.rpcs.check_consistency.retry_policy
924
+ options.apply_defaults metadata: @config.metadata,
925
+ retry_policy: @config.retry_policy
926
+
927
+ @bigtable_table_admin_stub.call_rpc :check_consistency, request, options: options do |response, operation|
928
+ yield response, operation if block_given?
929
+ return response
930
+ end
931
+ rescue ::GRPC::BadStatus => e
932
+ raise ::Google::Cloud::Error.from_error(e)
933
+ end
934
+
935
+ ##
936
+ # Creates a new snapshot in the specified cluster from the specified
937
+ # source table. The cluster and the table must be in the same instance.
938
+ #
939
+ # Note: This is a private alpha release of Cloud Bigtable snapshots. This
940
+ # feature is not currently available to most Cloud Bigtable customers. This
941
+ # feature might be changed in backward-incompatible ways and is not
942
+ # recommended for production use. It is not subject to any SLA or deprecation
943
+ # policy.
944
+ #
945
+ # @overload snapshot_table(request, options = nil)
946
+ # Pass arguments to `snapshot_table` via a request object, either of type
947
+ # {::Google::Cloud::Bigtable::Admin::V2::SnapshotTableRequest} or an equivalent Hash.
948
+ #
949
+ # @param request [::Google::Cloud::Bigtable::Admin::V2::SnapshotTableRequest, ::Hash]
950
+ # A request object representing the call parameters. Required. To specify no
951
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
952
+ # @param options [::Gapic::CallOptions, ::Hash]
953
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
954
+ #
955
+ # @overload snapshot_table(name: nil, cluster: nil, snapshot_id: nil, ttl: nil, description: nil)
956
+ # Pass arguments to `snapshot_table` via keyword arguments. Note that at
957
+ # least one keyword argument is required. To specify no parameters, or to keep all
958
+ # the default parameter values, pass an empty Hash as a request object (see above).
959
+ #
960
+ # @param name [::String]
961
+ # Required. The unique name of the table to have the snapshot taken.
962
+ # Values are of the form
963
+ # `projects/{project}/instances/{instance}/tables/{table}`.
964
+ # @param cluster [::String]
965
+ # Required. The name of the cluster where the snapshot will be created in.
966
+ # Values are of the form
967
+ # `projects/{project}/instances/{instance}/clusters/{cluster}`.
968
+ # @param snapshot_id [::String]
969
+ # Required. The ID by which the new snapshot should be referred to within the
970
+ # parent cluster, e.g., `mysnapshot` of the form:
971
+ # `[_a-zA-Z0-9][-_.a-zA-Z0-9]*` rather than
972
+ # `projects/{project}/instances/{instance}/clusters/{cluster}/snapshots/mysnapshot`.
973
+ # @param ttl [::Google::Protobuf::Duration, ::Hash]
974
+ # The amount of time that the new snapshot can stay active after it is
975
+ # created. Once 'ttl' expires, the snapshot will get deleted. The maximum
976
+ # amount of time a snapshot can stay active is 7 days. If 'ttl' is not
977
+ # specified, the default value of 24 hours will be used.
978
+ # @param description [::String]
979
+ # Description of the snapshot.
980
+ #
981
+ # @yield [response, operation] Access the result along with the RPC operation
982
+ # @yieldparam response [::Gapic::Operation]
983
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
984
+ #
985
+ # @return [::Gapic::Operation]
986
+ #
987
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
988
+ #
989
+ def snapshot_table request, options = nil
990
+ raise ::ArgumentError, "request must be provided" if request.nil?
991
+
992
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigtable::Admin::V2::SnapshotTableRequest
993
+
994
+ # Converts hash and nil to an options object
995
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
996
+
997
+ # Customize the options with defaults
998
+ metadata = @config.rpcs.snapshot_table.metadata.to_h
999
+
1000
+ # Set x-goog-api-client and x-goog-user-project headers
1001
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1002
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
1003
+ gapic_version: ::Google::Cloud::Bigtable::Admin::V2::VERSION
1004
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1005
+
1006
+ header_params = {
1007
+ "name" => request.name
1008
+ }
1009
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
1010
+ metadata[:"x-goog-request-params"] ||= request_params_header
1011
+
1012
+ options.apply_defaults timeout: @config.rpcs.snapshot_table.timeout,
1013
+ metadata: metadata,
1014
+ retry_policy: @config.rpcs.snapshot_table.retry_policy
1015
+ options.apply_defaults metadata: @config.metadata,
1016
+ retry_policy: @config.retry_policy
1017
+
1018
+ @bigtable_table_admin_stub.call_rpc :snapshot_table, request, options: options do |response, operation|
1019
+ response = ::Gapic::Operation.new response, @operations_client, options: options
1020
+ yield response, operation if block_given?
1021
+ return response
1022
+ end
1023
+ rescue ::GRPC::BadStatus => e
1024
+ raise ::Google::Cloud::Error.from_error(e)
1025
+ end
1026
+
1027
+ ##
1028
+ # Gets metadata information about the specified snapshot.
1029
+ #
1030
+ # Note: This is a private alpha release of Cloud Bigtable snapshots. This
1031
+ # feature is not currently available to most Cloud Bigtable customers. This
1032
+ # feature might be changed in backward-incompatible ways and is not
1033
+ # recommended for production use. It is not subject to any SLA or deprecation
1034
+ # policy.
1035
+ #
1036
+ # @overload get_snapshot(request, options = nil)
1037
+ # Pass arguments to `get_snapshot` via a request object, either of type
1038
+ # {::Google::Cloud::Bigtable::Admin::V2::GetSnapshotRequest} or an equivalent Hash.
1039
+ #
1040
+ # @param request [::Google::Cloud::Bigtable::Admin::V2::GetSnapshotRequest, ::Hash]
1041
+ # A request object representing the call parameters. Required. To specify no
1042
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
1043
+ # @param options [::Gapic::CallOptions, ::Hash]
1044
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
1045
+ #
1046
+ # @overload get_snapshot(name: nil)
1047
+ # Pass arguments to `get_snapshot` via keyword arguments. Note that at
1048
+ # least one keyword argument is required. To specify no parameters, or to keep all
1049
+ # the default parameter values, pass an empty Hash as a request object (see above).
1050
+ #
1051
+ # @param name [::String]
1052
+ # Required. The unique name of the requested snapshot.
1053
+ # Values are of the form
1054
+ # `projects/{project}/instances/{instance}/clusters/{cluster}/snapshots/{snapshot}`.
1055
+ #
1056
+ # @yield [response, operation] Access the result along with the RPC operation
1057
+ # @yieldparam response [::Google::Cloud::Bigtable::Admin::V2::Snapshot]
1058
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
1059
+ #
1060
+ # @return [::Google::Cloud::Bigtable::Admin::V2::Snapshot]
1061
+ #
1062
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
1063
+ #
1064
+ def get_snapshot request, options = nil
1065
+ raise ::ArgumentError, "request must be provided" if request.nil?
1066
+
1067
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigtable::Admin::V2::GetSnapshotRequest
1068
+
1069
+ # Converts hash and nil to an options object
1070
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1071
+
1072
+ # Customize the options with defaults
1073
+ metadata = @config.rpcs.get_snapshot.metadata.to_h
1074
+
1075
+ # Set x-goog-api-client and x-goog-user-project headers
1076
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1077
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
1078
+ gapic_version: ::Google::Cloud::Bigtable::Admin::V2::VERSION
1079
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1080
+
1081
+ header_params = {
1082
+ "name" => request.name
1083
+ }
1084
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
1085
+ metadata[:"x-goog-request-params"] ||= request_params_header
1086
+
1087
+ options.apply_defaults timeout: @config.rpcs.get_snapshot.timeout,
1088
+ metadata: metadata,
1089
+ retry_policy: @config.rpcs.get_snapshot.retry_policy
1090
+ options.apply_defaults metadata: @config.metadata,
1091
+ retry_policy: @config.retry_policy
1092
+
1093
+ @bigtable_table_admin_stub.call_rpc :get_snapshot, request, options: options do |response, operation|
1094
+ yield response, operation if block_given?
1095
+ return response
1096
+ end
1097
+ rescue ::GRPC::BadStatus => e
1098
+ raise ::Google::Cloud::Error.from_error(e)
1099
+ end
1100
+
1101
+ ##
1102
+ # Lists all snapshots associated with the specified cluster.
1103
+ #
1104
+ # Note: This is a private alpha release of Cloud Bigtable snapshots. This
1105
+ # feature is not currently available to most Cloud Bigtable customers. This
1106
+ # feature might be changed in backward-incompatible ways and is not
1107
+ # recommended for production use. It is not subject to any SLA or deprecation
1108
+ # policy.
1109
+ #
1110
+ # @overload list_snapshots(request, options = nil)
1111
+ # Pass arguments to `list_snapshots` via a request object, either of type
1112
+ # {::Google::Cloud::Bigtable::Admin::V2::ListSnapshotsRequest} or an equivalent Hash.
1113
+ #
1114
+ # @param request [::Google::Cloud::Bigtable::Admin::V2::ListSnapshotsRequest, ::Hash]
1115
+ # A request object representing the call parameters. Required. To specify no
1116
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
1117
+ # @param options [::Gapic::CallOptions, ::Hash]
1118
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
1119
+ #
1120
+ # @overload list_snapshots(parent: nil, page_size: nil, page_token: nil)
1121
+ # Pass arguments to `list_snapshots` via keyword arguments. Note that at
1122
+ # least one keyword argument is required. To specify no parameters, or to keep all
1123
+ # the default parameter values, pass an empty Hash as a request object (see above).
1124
+ #
1125
+ # @param parent [::String]
1126
+ # Required. The unique name of the cluster for which snapshots should be
1127
+ # listed. Values are of the form
1128
+ # `projects/{project}/instances/{instance}/clusters/{cluster}`.
1129
+ # Use `{cluster} = '-'` to list snapshots for all clusters in an instance,
1130
+ # e.g., `projects/{project}/instances/{instance}/clusters/-`.
1131
+ # @param page_size [::Integer]
1132
+ # The maximum number of snapshots to return per page.
1133
+ # CURRENTLY UNIMPLEMENTED AND IGNORED.
1134
+ # @param page_token [::String]
1135
+ # The value of `next_page_token` returned by a previous call.
1136
+ #
1137
+ # @yield [response, operation] Access the result along with the RPC operation
1138
+ # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Bigtable::Admin::V2::Snapshot>]
1139
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
1140
+ #
1141
+ # @return [::Gapic::PagedEnumerable<::Google::Cloud::Bigtable::Admin::V2::Snapshot>]
1142
+ #
1143
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
1144
+ #
1145
+ def list_snapshots request, options = nil
1146
+ raise ::ArgumentError, "request must be provided" if request.nil?
1147
+
1148
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigtable::Admin::V2::ListSnapshotsRequest
1149
+
1150
+ # Converts hash and nil to an options object
1151
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1152
+
1153
+ # Customize the options with defaults
1154
+ metadata = @config.rpcs.list_snapshots.metadata.to_h
1155
+
1156
+ # Set x-goog-api-client and x-goog-user-project headers
1157
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1158
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
1159
+ gapic_version: ::Google::Cloud::Bigtable::Admin::V2::VERSION
1160
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1161
+
1162
+ header_params = {
1163
+ "parent" => request.parent
1164
+ }
1165
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
1166
+ metadata[:"x-goog-request-params"] ||= request_params_header
1167
+
1168
+ options.apply_defaults timeout: @config.rpcs.list_snapshots.timeout,
1169
+ metadata: metadata,
1170
+ retry_policy: @config.rpcs.list_snapshots.retry_policy
1171
+ options.apply_defaults metadata: @config.metadata,
1172
+ retry_policy: @config.retry_policy
1173
+
1174
+ @bigtable_table_admin_stub.call_rpc :list_snapshots, request, options: options do |response, operation|
1175
+ response = ::Gapic::PagedEnumerable.new @bigtable_table_admin_stub, :list_snapshots, request, response, operation, options
1176
+ yield response, operation if block_given?
1177
+ return response
1178
+ end
1179
+ rescue ::GRPC::BadStatus => e
1180
+ raise ::Google::Cloud::Error.from_error(e)
1181
+ end
1182
+
1183
+ ##
1184
+ # Permanently deletes the specified snapshot.
1185
+ #
1186
+ # Note: This is a private alpha release of Cloud Bigtable snapshots. This
1187
+ # feature is not currently available to most Cloud Bigtable customers. This
1188
+ # feature might be changed in backward-incompatible ways and is not
1189
+ # recommended for production use. It is not subject to any SLA or deprecation
1190
+ # policy.
1191
+ #
1192
+ # @overload delete_snapshot(request, options = nil)
1193
+ # Pass arguments to `delete_snapshot` via a request object, either of type
1194
+ # {::Google::Cloud::Bigtable::Admin::V2::DeleteSnapshotRequest} or an equivalent Hash.
1195
+ #
1196
+ # @param request [::Google::Cloud::Bigtable::Admin::V2::DeleteSnapshotRequest, ::Hash]
1197
+ # A request object representing the call parameters. Required. To specify no
1198
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
1199
+ # @param options [::Gapic::CallOptions, ::Hash]
1200
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
1201
+ #
1202
+ # @overload delete_snapshot(name: nil)
1203
+ # Pass arguments to `delete_snapshot` via keyword arguments. Note that at
1204
+ # least one keyword argument is required. To specify no parameters, or to keep all
1205
+ # the default parameter values, pass an empty Hash as a request object (see above).
1206
+ #
1207
+ # @param name [::String]
1208
+ # Required. The unique name of the snapshot to be deleted.
1209
+ # Values are of the form
1210
+ # `projects/{project}/instances/{instance}/clusters/{cluster}/snapshots/{snapshot}`.
1211
+ #
1212
+ # @yield [response, operation] Access the result along with the RPC operation
1213
+ # @yieldparam response [::Google::Protobuf::Empty]
1214
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
1215
+ #
1216
+ # @return [::Google::Protobuf::Empty]
1217
+ #
1218
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
1219
+ #
1220
+ def delete_snapshot request, options = nil
1221
+ raise ::ArgumentError, "request must be provided" if request.nil?
1222
+
1223
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigtable::Admin::V2::DeleteSnapshotRequest
1224
+
1225
+ # Converts hash and nil to an options object
1226
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1227
+
1228
+ # Customize the options with defaults
1229
+ metadata = @config.rpcs.delete_snapshot.metadata.to_h
1230
+
1231
+ # Set x-goog-api-client and x-goog-user-project headers
1232
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1233
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
1234
+ gapic_version: ::Google::Cloud::Bigtable::Admin::V2::VERSION
1235
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1236
+
1237
+ header_params = {
1238
+ "name" => request.name
1239
+ }
1240
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
1241
+ metadata[:"x-goog-request-params"] ||= request_params_header
1242
+
1243
+ options.apply_defaults timeout: @config.rpcs.delete_snapshot.timeout,
1244
+ metadata: metadata,
1245
+ retry_policy: @config.rpcs.delete_snapshot.retry_policy
1246
+ options.apply_defaults metadata: @config.metadata,
1247
+ retry_policy: @config.retry_policy
1248
+
1249
+ @bigtable_table_admin_stub.call_rpc :delete_snapshot, request, options: options do |response, operation|
1250
+ yield response, operation if block_given?
1251
+ return response
1252
+ end
1253
+ rescue ::GRPC::BadStatus => e
1254
+ raise ::Google::Cloud::Error.from_error(e)
1255
+ end
1256
+
1257
+ ##
1258
+ # Starts creating a new Cloud Bigtable Backup. The returned backup
1259
+ # {::Google::Longrunning::Operation long-running operation} can be used to
1260
+ # track creation of the backup. The
1261
+ # {::Google::Longrunning::Operation#metadata metadata} field type is
1262
+ # {::Google::Cloud::Bigtable::Admin::V2::CreateBackupMetadata CreateBackupMetadata}. The
1263
+ # {::Google::Longrunning::Operation#response response} field type is
1264
+ # {::Google::Cloud::Bigtable::Admin::V2::Backup Backup}, if successful. Cancelling the
1265
+ # returned operation will stop the creation and delete the backup.
1266
+ #
1267
+ # @overload create_backup(request, options = nil)
1268
+ # Pass arguments to `create_backup` via a request object, either of type
1269
+ # {::Google::Cloud::Bigtable::Admin::V2::CreateBackupRequest} or an equivalent Hash.
1270
+ #
1271
+ # @param request [::Google::Cloud::Bigtable::Admin::V2::CreateBackupRequest, ::Hash]
1272
+ # A request object representing the call parameters. Required. To specify no
1273
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
1274
+ # @param options [::Gapic::CallOptions, ::Hash]
1275
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
1276
+ #
1277
+ # @overload create_backup(parent: nil, backup_id: nil, backup: nil)
1278
+ # Pass arguments to `create_backup` via keyword arguments. Note that at
1279
+ # least one keyword argument is required. To specify no parameters, or to keep all
1280
+ # the default parameter values, pass an empty Hash as a request object (see above).
1281
+ #
1282
+ # @param parent [::String]
1283
+ # Required. This must be one of the clusters in the instance in which this
1284
+ # table is located. The backup will be stored in this cluster. Values are
1285
+ # of the form `projects/{project}/instances/{instance}/clusters/{cluster}`.
1286
+ # @param backup_id [::String]
1287
+ # Required. The id of the backup to be created. The `backup_id` along with
1288
+ # the parent `parent` are combined as \\{parent}/backups/\\{backup_id} to create
1289
+ # the full backup name, of the form:
1290
+ # `projects/{project}/instances/{instance}/clusters/{cluster}/backups/{backup_id}`.
1291
+ # This string must be between 1 and 50 characters in length and match the
1292
+ # regex [_a-zA-Z0-9][-_.a-zA-Z0-9]*.
1293
+ # @param backup [::Google::Cloud::Bigtable::Admin::V2::Backup, ::Hash]
1294
+ # Required. The backup to create.
1295
+ #
1296
+ # @yield [response, operation] Access the result along with the RPC operation
1297
+ # @yieldparam response [::Gapic::Operation]
1298
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
1299
+ #
1300
+ # @return [::Gapic::Operation]
1301
+ #
1302
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
1303
+ #
1304
+ def create_backup request, options = nil
1305
+ raise ::ArgumentError, "request must be provided" if request.nil?
1306
+
1307
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigtable::Admin::V2::CreateBackupRequest
1308
+
1309
+ # Converts hash and nil to an options object
1310
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1311
+
1312
+ # Customize the options with defaults
1313
+ metadata = @config.rpcs.create_backup.metadata.to_h
1314
+
1315
+ # Set x-goog-api-client and x-goog-user-project headers
1316
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1317
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
1318
+ gapic_version: ::Google::Cloud::Bigtable::Admin::V2::VERSION
1319
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1320
+
1321
+ header_params = {
1322
+ "parent" => request.parent
1323
+ }
1324
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
1325
+ metadata[:"x-goog-request-params"] ||= request_params_header
1326
+
1327
+ options.apply_defaults timeout: @config.rpcs.create_backup.timeout,
1328
+ metadata: metadata,
1329
+ retry_policy: @config.rpcs.create_backup.retry_policy
1330
+ options.apply_defaults metadata: @config.metadata,
1331
+ retry_policy: @config.retry_policy
1332
+
1333
+ @bigtable_table_admin_stub.call_rpc :create_backup, request, options: options do |response, operation|
1334
+ response = ::Gapic::Operation.new response, @operations_client, options: options
1335
+ yield response, operation if block_given?
1336
+ return response
1337
+ end
1338
+ rescue ::GRPC::BadStatus => e
1339
+ raise ::Google::Cloud::Error.from_error(e)
1340
+ end
1341
+
1342
+ ##
1343
+ # Gets metadata on a pending or completed Cloud Bigtable Backup.
1344
+ #
1345
+ # @overload get_backup(request, options = nil)
1346
+ # Pass arguments to `get_backup` via a request object, either of type
1347
+ # {::Google::Cloud::Bigtable::Admin::V2::GetBackupRequest} or an equivalent Hash.
1348
+ #
1349
+ # @param request [::Google::Cloud::Bigtable::Admin::V2::GetBackupRequest, ::Hash]
1350
+ # A request object representing the call parameters. Required. To specify no
1351
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
1352
+ # @param options [::Gapic::CallOptions, ::Hash]
1353
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
1354
+ #
1355
+ # @overload get_backup(name: nil)
1356
+ # Pass arguments to `get_backup` via keyword arguments. Note that at
1357
+ # least one keyword argument is required. To specify no parameters, or to keep all
1358
+ # the default parameter values, pass an empty Hash as a request object (see above).
1359
+ #
1360
+ # @param name [::String]
1361
+ # Required. Name of the backup.
1362
+ # Values are of the form
1363
+ # `projects/{project}/instances/{instance}/clusters/{cluster}/backups/{backup}`.
1364
+ #
1365
+ # @yield [response, operation] Access the result along with the RPC operation
1366
+ # @yieldparam response [::Google::Cloud::Bigtable::Admin::V2::Backup]
1367
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
1368
+ #
1369
+ # @return [::Google::Cloud::Bigtable::Admin::V2::Backup]
1370
+ #
1371
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
1372
+ #
1373
+ def get_backup request, options = nil
1374
+ raise ::ArgumentError, "request must be provided" if request.nil?
1375
+
1376
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigtable::Admin::V2::GetBackupRequest
1377
+
1378
+ # Converts hash and nil to an options object
1379
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1380
+
1381
+ # Customize the options with defaults
1382
+ metadata = @config.rpcs.get_backup.metadata.to_h
1383
+
1384
+ # Set x-goog-api-client and x-goog-user-project headers
1385
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1386
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
1387
+ gapic_version: ::Google::Cloud::Bigtable::Admin::V2::VERSION
1388
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1389
+
1390
+ header_params = {
1391
+ "name" => request.name
1392
+ }
1393
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
1394
+ metadata[:"x-goog-request-params"] ||= request_params_header
1395
+
1396
+ options.apply_defaults timeout: @config.rpcs.get_backup.timeout,
1397
+ metadata: metadata,
1398
+ retry_policy: @config.rpcs.get_backup.retry_policy
1399
+ options.apply_defaults metadata: @config.metadata,
1400
+ retry_policy: @config.retry_policy
1401
+
1402
+ @bigtable_table_admin_stub.call_rpc :get_backup, request, options: options do |response, operation|
1403
+ yield response, operation if block_given?
1404
+ return response
1405
+ end
1406
+ rescue ::GRPC::BadStatus => e
1407
+ raise ::Google::Cloud::Error.from_error(e)
1408
+ end
1409
+
1410
+ ##
1411
+ # Updates a pending or completed Cloud Bigtable Backup.
1412
+ #
1413
+ # @overload update_backup(request, options = nil)
1414
+ # Pass arguments to `update_backup` via a request object, either of type
1415
+ # {::Google::Cloud::Bigtable::Admin::V2::UpdateBackupRequest} or an equivalent Hash.
1416
+ #
1417
+ # @param request [::Google::Cloud::Bigtable::Admin::V2::UpdateBackupRequest, ::Hash]
1418
+ # A request object representing the call parameters. Required. To specify no
1419
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
1420
+ # @param options [::Gapic::CallOptions, ::Hash]
1421
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
1422
+ #
1423
+ # @overload update_backup(backup: nil, update_mask: nil)
1424
+ # Pass arguments to `update_backup` via keyword arguments. Note that at
1425
+ # least one keyword argument is required. To specify no parameters, or to keep all
1426
+ # the default parameter values, pass an empty Hash as a request object (see above).
1427
+ #
1428
+ # @param backup [::Google::Cloud::Bigtable::Admin::V2::Backup, ::Hash]
1429
+ # Required. The backup to update. `backup.name`, and the fields to be updated
1430
+ # as specified by `update_mask` are required. Other fields are ignored.
1431
+ # Update is only supported for the following fields:
1432
+ # * `backup.expire_time`.
1433
+ # @param update_mask [::Google::Protobuf::FieldMask, ::Hash]
1434
+ # Required. A mask specifying which fields (e.g. `expire_time`) in the
1435
+ # Backup resource should be updated. This mask is relative to the Backup
1436
+ # resource, not to the request message. The field mask must always be
1437
+ # specified; this prevents any future fields from being erased accidentally
1438
+ # by clients that do not know about them.
1439
+ #
1440
+ # @yield [response, operation] Access the result along with the RPC operation
1441
+ # @yieldparam response [::Google::Cloud::Bigtable::Admin::V2::Backup]
1442
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
1443
+ #
1444
+ # @return [::Google::Cloud::Bigtable::Admin::V2::Backup]
1445
+ #
1446
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
1447
+ #
1448
+ def update_backup request, options = nil
1449
+ raise ::ArgumentError, "request must be provided" if request.nil?
1450
+
1451
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigtable::Admin::V2::UpdateBackupRequest
1452
+
1453
+ # Converts hash and nil to an options object
1454
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1455
+
1456
+ # Customize the options with defaults
1457
+ metadata = @config.rpcs.update_backup.metadata.to_h
1458
+
1459
+ # Set x-goog-api-client and x-goog-user-project headers
1460
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1461
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
1462
+ gapic_version: ::Google::Cloud::Bigtable::Admin::V2::VERSION
1463
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1464
+
1465
+ header_params = {
1466
+ "backup.name" => request.backup.name
1467
+ }
1468
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
1469
+ metadata[:"x-goog-request-params"] ||= request_params_header
1470
+
1471
+ options.apply_defaults timeout: @config.rpcs.update_backup.timeout,
1472
+ metadata: metadata,
1473
+ retry_policy: @config.rpcs.update_backup.retry_policy
1474
+ options.apply_defaults metadata: @config.metadata,
1475
+ retry_policy: @config.retry_policy
1476
+
1477
+ @bigtable_table_admin_stub.call_rpc :update_backup, request, options: options do |response, operation|
1478
+ yield response, operation if block_given?
1479
+ return response
1480
+ end
1481
+ rescue ::GRPC::BadStatus => e
1482
+ raise ::Google::Cloud::Error.from_error(e)
1483
+ end
1484
+
1485
+ ##
1486
+ # Deletes a pending or completed Cloud Bigtable backup.
1487
+ #
1488
+ # @overload delete_backup(request, options = nil)
1489
+ # Pass arguments to `delete_backup` via a request object, either of type
1490
+ # {::Google::Cloud::Bigtable::Admin::V2::DeleteBackupRequest} or an equivalent Hash.
1491
+ #
1492
+ # @param request [::Google::Cloud::Bigtable::Admin::V2::DeleteBackupRequest, ::Hash]
1493
+ # A request object representing the call parameters. Required. To specify no
1494
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
1495
+ # @param options [::Gapic::CallOptions, ::Hash]
1496
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
1497
+ #
1498
+ # @overload delete_backup(name: nil)
1499
+ # Pass arguments to `delete_backup` via keyword arguments. Note that at
1500
+ # least one keyword argument is required. To specify no parameters, or to keep all
1501
+ # the default parameter values, pass an empty Hash as a request object (see above).
1502
+ #
1503
+ # @param name [::String]
1504
+ # Required. Name of the backup to delete.
1505
+ # Values are of the form
1506
+ # `projects/{project}/instances/{instance}/clusters/{cluster}/backups/{backup}`.
1507
+ #
1508
+ # @yield [response, operation] Access the result along with the RPC operation
1509
+ # @yieldparam response [::Google::Protobuf::Empty]
1510
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
1511
+ #
1512
+ # @return [::Google::Protobuf::Empty]
1513
+ #
1514
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
1515
+ #
1516
+ def delete_backup request, options = nil
1517
+ raise ::ArgumentError, "request must be provided" if request.nil?
1518
+
1519
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigtable::Admin::V2::DeleteBackupRequest
1520
+
1521
+ # Converts hash and nil to an options object
1522
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1523
+
1524
+ # Customize the options with defaults
1525
+ metadata = @config.rpcs.delete_backup.metadata.to_h
1526
+
1527
+ # Set x-goog-api-client and x-goog-user-project headers
1528
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1529
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
1530
+ gapic_version: ::Google::Cloud::Bigtable::Admin::V2::VERSION
1531
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1532
+
1533
+ header_params = {
1534
+ "name" => request.name
1535
+ }
1536
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
1537
+ metadata[:"x-goog-request-params"] ||= request_params_header
1538
+
1539
+ options.apply_defaults timeout: @config.rpcs.delete_backup.timeout,
1540
+ metadata: metadata,
1541
+ retry_policy: @config.rpcs.delete_backup.retry_policy
1542
+ options.apply_defaults metadata: @config.metadata,
1543
+ retry_policy: @config.retry_policy
1544
+
1545
+ @bigtable_table_admin_stub.call_rpc :delete_backup, request, options: options do |response, operation|
1546
+ yield response, operation if block_given?
1547
+ return response
1548
+ end
1549
+ rescue ::GRPC::BadStatus => e
1550
+ raise ::Google::Cloud::Error.from_error(e)
1551
+ end
1552
+
1553
+ ##
1554
+ # Lists Cloud Bigtable backups. Returns both completed and pending
1555
+ # backups.
1556
+ #
1557
+ # @overload list_backups(request, options = nil)
1558
+ # Pass arguments to `list_backups` via a request object, either of type
1559
+ # {::Google::Cloud::Bigtable::Admin::V2::ListBackupsRequest} or an equivalent Hash.
1560
+ #
1561
+ # @param request [::Google::Cloud::Bigtable::Admin::V2::ListBackupsRequest, ::Hash]
1562
+ # A request object representing the call parameters. Required. To specify no
1563
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
1564
+ # @param options [::Gapic::CallOptions, ::Hash]
1565
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
1566
+ #
1567
+ # @overload list_backups(parent: nil, filter: nil, order_by: nil, page_size: nil, page_token: nil)
1568
+ # Pass arguments to `list_backups` via keyword arguments. Note that at
1569
+ # least one keyword argument is required. To specify no parameters, or to keep all
1570
+ # the default parameter values, pass an empty Hash as a request object (see above).
1571
+ #
1572
+ # @param parent [::String]
1573
+ # Required. The cluster to list backups from. Values are of the
1574
+ # form `projects/{project}/instances/{instance}/clusters/{cluster}`.
1575
+ # Use `{cluster} = '-'` to list backups for all clusters in an instance,
1576
+ # e.g., `projects/{project}/instances/{instance}/clusters/-`.
1577
+ # @param filter [::String]
1578
+ # A filter expression that filters backups listed in the response.
1579
+ # The expression must specify the field name, a comparison operator,
1580
+ # and the value that you want to use for filtering. The value must be a
1581
+ # string, a number, or a boolean. The comparison operator must be
1582
+ # <, >, <=, >=, !=, =, or :. Colon ‘:’ represents a HAS operator which is
1583
+ # roughly synonymous with equality. Filter rules are case insensitive.
1584
+ #
1585
+ # The fields eligible for filtering are:
1586
+ # * `name`
1587
+ # * `source_table`
1588
+ # * `state`
1589
+ # * `start_time` (and values are of the format YYYY-MM-DDTHH:MM:SSZ)
1590
+ # * `end_time` (and values are of the format YYYY-MM-DDTHH:MM:SSZ)
1591
+ # * `expire_time` (and values are of the format YYYY-MM-DDTHH:MM:SSZ)
1592
+ # * `size_bytes`
1593
+ #
1594
+ # To filter on multiple expressions, provide each separate expression within
1595
+ # parentheses. By default, each expression is an AND expression. However,
1596
+ # you can include AND, OR, and NOT expressions explicitly.
1597
+ #
1598
+ # Some examples of using filters are:
1599
+ #
1600
+ # * `name:"exact"` --> The backup's name is the string "exact".
1601
+ # * `name:howl` --> The backup's name contains the string "howl".
1602
+ # * `source_table:prod`
1603
+ # --> The source_table's name contains the string "prod".
1604
+ # * `state:CREATING` --> The backup is pending creation.
1605
+ # * `state:READY` --> The backup is fully created and ready for use.
1606
+ # * `(name:howl) AND (start_time < \"2018-03-28T14:50:00Z\")`
1607
+ # --> The backup name contains the string "howl" and start_time
1608
+ # of the backup is before 2018-03-28T14:50:00Z.
1609
+ # * `size_bytes > 10000000000` --> The backup's size is greater than 10GB
1610
+ # @param order_by [::String]
1611
+ # An expression for specifying the sort order of the results of the request.
1612
+ # The string value should specify one or more fields in
1613
+ # {::Google::Cloud::Bigtable::Admin::V2::Backup Backup}. The full syntax is described at
1614
+ # https://aip.dev/132#ordering.
1615
+ #
1616
+ # Fields supported are:
1617
+ # * name
1618
+ # * source_table
1619
+ # * expire_time
1620
+ # * start_time
1621
+ # * end_time
1622
+ # * size_bytes
1623
+ # * state
1624
+ #
1625
+ # For example, "start_time". The default sorting order is ascending.
1626
+ # To specify descending order for the field, a suffix " desc" should
1627
+ # be appended to the field name. For example, "start_time desc".
1628
+ # Redundant space characters in the syntax are insigificant.
1629
+ #
1630
+ # If order_by is empty, results will be sorted by `start_time` in descending
1631
+ # order starting from the most recently created backup.
1632
+ # @param page_size [::Integer]
1633
+ # Number of backups to be returned in the response. If 0 or
1634
+ # less, defaults to the server's maximum allowed page size.
1635
+ # @param page_token [::String]
1636
+ # If non-empty, `page_token` should contain a
1637
+ # {::Google::Cloud::Bigtable::Admin::V2::ListBackupsResponse#next_page_token next_page_token}
1638
+ # from a previous
1639
+ # {::Google::Cloud::Bigtable::Admin::V2::ListBackupsResponse ListBackupsResponse} to the
1640
+ # same `parent` and with the same `filter`.
1641
+ #
1642
+ # @yield [response, operation] Access the result along with the RPC operation
1643
+ # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Bigtable::Admin::V2::Backup>]
1644
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
1645
+ #
1646
+ # @return [::Gapic::PagedEnumerable<::Google::Cloud::Bigtable::Admin::V2::Backup>]
1647
+ #
1648
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
1649
+ #
1650
+ def list_backups request, options = nil
1651
+ raise ::ArgumentError, "request must be provided" if request.nil?
1652
+
1653
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigtable::Admin::V2::ListBackupsRequest
1654
+
1655
+ # Converts hash and nil to an options object
1656
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1657
+
1658
+ # Customize the options with defaults
1659
+ metadata = @config.rpcs.list_backups.metadata.to_h
1660
+
1661
+ # Set x-goog-api-client and x-goog-user-project headers
1662
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1663
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
1664
+ gapic_version: ::Google::Cloud::Bigtable::Admin::V2::VERSION
1665
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1666
+
1667
+ header_params = {
1668
+ "parent" => request.parent
1669
+ }
1670
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
1671
+ metadata[:"x-goog-request-params"] ||= request_params_header
1672
+
1673
+ options.apply_defaults timeout: @config.rpcs.list_backups.timeout,
1674
+ metadata: metadata,
1675
+ retry_policy: @config.rpcs.list_backups.retry_policy
1676
+ options.apply_defaults metadata: @config.metadata,
1677
+ retry_policy: @config.retry_policy
1678
+
1679
+ @bigtable_table_admin_stub.call_rpc :list_backups, request, options: options do |response, operation|
1680
+ response = ::Gapic::PagedEnumerable.new @bigtable_table_admin_stub, :list_backups, request, response, operation, options
1681
+ yield response, operation if block_given?
1682
+ return response
1683
+ end
1684
+ rescue ::GRPC::BadStatus => e
1685
+ raise ::Google::Cloud::Error.from_error(e)
1686
+ end
1687
+
1688
+ ##
1689
+ # Create a new table by restoring from a completed backup. The new table
1690
+ # must be in the same instance as the instance containing the backup. The
1691
+ # returned table {::Google::Longrunning::Operation long-running operation} can
1692
+ # be used to track the progress of the operation, and to cancel it. The
1693
+ # {::Google::Longrunning::Operation#metadata metadata} field type is
1694
+ # [RestoreTableMetadata][google.bigtable.admin.RestoreTableMetadata]. The
1695
+ # {::Google::Longrunning::Operation#response response} type is
1696
+ # {::Google::Cloud::Bigtable::Admin::V2::Table Table}, if successful.
1697
+ #
1698
+ # @overload restore_table(request, options = nil)
1699
+ # Pass arguments to `restore_table` via a request object, either of type
1700
+ # {::Google::Cloud::Bigtable::Admin::V2::RestoreTableRequest} or an equivalent Hash.
1701
+ #
1702
+ # @param request [::Google::Cloud::Bigtable::Admin::V2::RestoreTableRequest, ::Hash]
1703
+ # A request object representing the call parameters. Required. To specify no
1704
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
1705
+ # @param options [::Gapic::CallOptions, ::Hash]
1706
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
1707
+ #
1708
+ # @overload restore_table(parent: nil, table_id: nil, backup: nil)
1709
+ # Pass arguments to `restore_table` via keyword arguments. Note that at
1710
+ # least one keyword argument is required. To specify no parameters, or to keep all
1711
+ # the default parameter values, pass an empty Hash as a request object (see above).
1712
+ #
1713
+ # @param parent [::String]
1714
+ # Required. The name of the instance in which to create the restored
1715
+ # table. This instance must be the parent of the source backup. Values are
1716
+ # of the form `projects/<project>/instances/<instance>`.
1717
+ # @param table_id [::String]
1718
+ # Required. The id of the table to create and restore to. This
1719
+ # table must not already exist. The `table_id` appended to
1720
+ # `parent` forms the full table name of the form
1721
+ # `projects/<project>/instances/<instance>/tables/<table_id>`.
1722
+ # @param backup [::String]
1723
+ # Name of the backup from which to restore. Values are of the form
1724
+ # `projects/<project>/instances/<instance>/clusters/<cluster>/backups/<backup>`.
1725
+ #
1726
+ # @yield [response, operation] Access the result along with the RPC operation
1727
+ # @yieldparam response [::Gapic::Operation]
1728
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
1729
+ #
1730
+ # @return [::Gapic::Operation]
1731
+ #
1732
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
1733
+ #
1734
+ def restore_table request, options = nil
1735
+ raise ::ArgumentError, "request must be provided" if request.nil?
1736
+
1737
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigtable::Admin::V2::RestoreTableRequest
1738
+
1739
+ # Converts hash and nil to an options object
1740
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1741
+
1742
+ # Customize the options with defaults
1743
+ metadata = @config.rpcs.restore_table.metadata.to_h
1744
+
1745
+ # Set x-goog-api-client and x-goog-user-project headers
1746
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1747
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
1748
+ gapic_version: ::Google::Cloud::Bigtable::Admin::V2::VERSION
1749
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1750
+
1751
+ header_params = {
1752
+ "parent" => request.parent
1753
+ }
1754
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
1755
+ metadata[:"x-goog-request-params"] ||= request_params_header
1756
+
1757
+ options.apply_defaults timeout: @config.rpcs.restore_table.timeout,
1758
+ metadata: metadata,
1759
+ retry_policy: @config.rpcs.restore_table.retry_policy
1760
+ options.apply_defaults metadata: @config.metadata,
1761
+ retry_policy: @config.retry_policy
1762
+
1763
+ @bigtable_table_admin_stub.call_rpc :restore_table, request, options: options do |response, operation|
1764
+ response = ::Gapic::Operation.new response, @operations_client, options: options
1765
+ yield response, operation if block_given?
1766
+ return response
1767
+ end
1768
+ rescue ::GRPC::BadStatus => e
1769
+ raise ::Google::Cloud::Error.from_error(e)
1770
+ end
1771
+
1772
+ ##
1773
+ # Gets the access control policy for a resource.
1774
+ # Returns an empty policy if the resource exists but does not have a policy
1775
+ # set.
1776
+ #
1777
+ # @overload get_iam_policy(request, options = nil)
1778
+ # Pass arguments to `get_iam_policy` via a request object, either of type
1779
+ # {::Google::Iam::V1::GetIamPolicyRequest} or an equivalent Hash.
1780
+ #
1781
+ # @param request [::Google::Iam::V1::GetIamPolicyRequest, ::Hash]
1782
+ # A request object representing the call parameters. Required. To specify no
1783
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
1784
+ # @param options [::Gapic::CallOptions, ::Hash]
1785
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
1786
+ #
1787
+ # @overload get_iam_policy(resource: nil, options: nil)
1788
+ # Pass arguments to `get_iam_policy` via keyword arguments. Note that at
1789
+ # least one keyword argument is required. To specify no parameters, or to keep all
1790
+ # the default parameter values, pass an empty Hash as a request object (see above).
1791
+ #
1792
+ # @param resource [::String]
1793
+ # REQUIRED: The resource for which the policy is being requested.
1794
+ # See the operation documentation for the appropriate value for this field.
1795
+ # @param options [::Google::Iam::V1::GetPolicyOptions, ::Hash]
1796
+ # OPTIONAL: A `GetPolicyOptions` object for specifying options to
1797
+ # `GetIamPolicy`. This field is only used by Cloud IAM.
1798
+ #
1799
+ # @yield [response, operation] Access the result along with the RPC operation
1800
+ # @yieldparam response [::Google::Iam::V1::Policy]
1801
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
1802
+ #
1803
+ # @return [::Google::Iam::V1::Policy]
1804
+ #
1805
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
1806
+ #
1807
+ def get_iam_policy request, options = nil
1808
+ raise ::ArgumentError, "request must be provided" if request.nil?
1809
+
1810
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V1::GetIamPolicyRequest
1811
+
1812
+ # Converts hash and nil to an options object
1813
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1814
+
1815
+ # Customize the options with defaults
1816
+ metadata = @config.rpcs.get_iam_policy.metadata.to_h
1817
+
1818
+ # Set x-goog-api-client and x-goog-user-project headers
1819
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1820
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
1821
+ gapic_version: ::Google::Cloud::Bigtable::Admin::V2::VERSION
1822
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1823
+
1824
+ header_params = {
1825
+ "resource" => request.resource
1826
+ }
1827
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
1828
+ metadata[:"x-goog-request-params"] ||= request_params_header
1829
+
1830
+ options.apply_defaults timeout: @config.rpcs.get_iam_policy.timeout,
1831
+ metadata: metadata,
1832
+ retry_policy: @config.rpcs.get_iam_policy.retry_policy
1833
+ options.apply_defaults metadata: @config.metadata,
1834
+ retry_policy: @config.retry_policy
1835
+
1836
+ @bigtable_table_admin_stub.call_rpc :get_iam_policy, request, options: options do |response, operation|
1837
+ yield response, operation if block_given?
1838
+ return response
1839
+ end
1840
+ rescue ::GRPC::BadStatus => e
1841
+ raise ::Google::Cloud::Error.from_error(e)
1842
+ end
1843
+
1844
+ ##
1845
+ # Sets the access control policy on a Table or Backup resource.
1846
+ # Replaces any existing policy.
1847
+ #
1848
+ # @overload set_iam_policy(request, options = nil)
1849
+ # Pass arguments to `set_iam_policy` via a request object, either of type
1850
+ # {::Google::Iam::V1::SetIamPolicyRequest} or an equivalent Hash.
1851
+ #
1852
+ # @param request [::Google::Iam::V1::SetIamPolicyRequest, ::Hash]
1853
+ # A request object representing the call parameters. Required. To specify no
1854
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
1855
+ # @param options [::Gapic::CallOptions, ::Hash]
1856
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
1857
+ #
1858
+ # @overload set_iam_policy(resource: nil, policy: nil)
1859
+ # Pass arguments to `set_iam_policy` via keyword arguments. Note that at
1860
+ # least one keyword argument is required. To specify no parameters, or to keep all
1861
+ # the default parameter values, pass an empty Hash as a request object (see above).
1862
+ #
1863
+ # @param resource [::String]
1864
+ # REQUIRED: The resource for which the policy is being specified.
1865
+ # See the operation documentation for the appropriate value for this field.
1866
+ # @param policy [::Google::Iam::V1::Policy, ::Hash]
1867
+ # REQUIRED: The complete policy to be applied to the `resource`. The size of
1868
+ # the policy is limited to a few 10s of KB. An empty policy is a
1869
+ # valid policy but certain Cloud Platform services (such as Projects)
1870
+ # might reject them.
1871
+ #
1872
+ # @yield [response, operation] Access the result along with the RPC operation
1873
+ # @yieldparam response [::Google::Iam::V1::Policy]
1874
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
1875
+ #
1876
+ # @return [::Google::Iam::V1::Policy]
1877
+ #
1878
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
1879
+ #
1880
+ def set_iam_policy request, options = nil
1881
+ raise ::ArgumentError, "request must be provided" if request.nil?
1882
+
1883
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V1::SetIamPolicyRequest
1884
+
1885
+ # Converts hash and nil to an options object
1886
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1887
+
1888
+ # Customize the options with defaults
1889
+ metadata = @config.rpcs.set_iam_policy.metadata.to_h
1890
+
1891
+ # Set x-goog-api-client and x-goog-user-project headers
1892
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1893
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
1894
+ gapic_version: ::Google::Cloud::Bigtable::Admin::V2::VERSION
1895
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1896
+
1897
+ header_params = {
1898
+ "resource" => request.resource
1899
+ }
1900
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
1901
+ metadata[:"x-goog-request-params"] ||= request_params_header
1902
+
1903
+ options.apply_defaults timeout: @config.rpcs.set_iam_policy.timeout,
1904
+ metadata: metadata,
1905
+ retry_policy: @config.rpcs.set_iam_policy.retry_policy
1906
+ options.apply_defaults metadata: @config.metadata,
1907
+ retry_policy: @config.retry_policy
1908
+
1909
+ @bigtable_table_admin_stub.call_rpc :set_iam_policy, request, options: options do |response, operation|
1910
+ yield response, operation if block_given?
1911
+ return response
1912
+ end
1913
+ rescue ::GRPC::BadStatus => e
1914
+ raise ::Google::Cloud::Error.from_error(e)
1915
+ end
1916
+
1917
+ ##
1918
+ # Returns permissions that the caller has on the specified table resource.
1919
+ #
1920
+ # @overload test_iam_permissions(request, options = nil)
1921
+ # Pass arguments to `test_iam_permissions` via a request object, either of type
1922
+ # {::Google::Iam::V1::TestIamPermissionsRequest} or an equivalent Hash.
1923
+ #
1924
+ # @param request [::Google::Iam::V1::TestIamPermissionsRequest, ::Hash]
1925
+ # A request object representing the call parameters. Required. To specify no
1926
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
1927
+ # @param options [::Gapic::CallOptions, ::Hash]
1928
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
1929
+ #
1930
+ # @overload test_iam_permissions(resource: nil, permissions: nil)
1931
+ # Pass arguments to `test_iam_permissions` via keyword arguments. Note that at
1932
+ # least one keyword argument is required. To specify no parameters, or to keep all
1933
+ # the default parameter values, pass an empty Hash as a request object (see above).
1934
+ #
1935
+ # @param resource [::String]
1936
+ # REQUIRED: The resource for which the policy detail is being requested.
1937
+ # See the operation documentation for the appropriate value for this field.
1938
+ # @param permissions [::Array<::String>]
1939
+ # The set of permissions to check for the `resource`. Permissions with
1940
+ # wildcards (such as '*' or 'storage.*') are not allowed. For more
1941
+ # information see
1942
+ # [IAM Overview](https://cloud.google.com/iam/docs/overview#permissions).
1943
+ #
1944
+ # @yield [response, operation] Access the result along with the RPC operation
1945
+ # @yieldparam response [::Google::Iam::V1::TestIamPermissionsResponse]
1946
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
1947
+ #
1948
+ # @return [::Google::Iam::V1::TestIamPermissionsResponse]
1949
+ #
1950
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
1951
+ #
1952
+ def test_iam_permissions request, options = nil
1953
+ raise ::ArgumentError, "request must be provided" if request.nil?
1954
+
1955
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V1::TestIamPermissionsRequest
1956
+
1957
+ # Converts hash and nil to an options object
1958
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1959
+
1960
+ # Customize the options with defaults
1961
+ metadata = @config.rpcs.test_iam_permissions.metadata.to_h
1962
+
1963
+ # Set x-goog-api-client and x-goog-user-project headers
1964
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1965
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
1966
+ gapic_version: ::Google::Cloud::Bigtable::Admin::V2::VERSION
1967
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1968
+
1969
+ header_params = {
1970
+ "resource" => request.resource
1971
+ }
1972
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
1973
+ metadata[:"x-goog-request-params"] ||= request_params_header
1974
+
1975
+ options.apply_defaults timeout: @config.rpcs.test_iam_permissions.timeout,
1976
+ metadata: metadata,
1977
+ retry_policy: @config.rpcs.test_iam_permissions.retry_policy
1978
+ options.apply_defaults metadata: @config.metadata,
1979
+ retry_policy: @config.retry_policy
1980
+
1981
+ @bigtable_table_admin_stub.call_rpc :test_iam_permissions, request, options: options do |response, operation|
1982
+ yield response, operation if block_given?
1983
+ return response
1984
+ end
1985
+ rescue ::GRPC::BadStatus => e
1986
+ raise ::Google::Cloud::Error.from_error(e)
1987
+ end
1988
+
1989
+ ##
1990
+ # Configuration class for the BigtableTableAdmin API.
1991
+ #
1992
+ # This class represents the configuration for BigtableTableAdmin,
1993
+ # providing control over timeouts, retry behavior, logging, transport
1994
+ # parameters, and other low-level controls. Certain parameters can also be
1995
+ # applied individually to specific RPCs. See
1996
+ # {::Google::Cloud::Bigtable::Admin::V2::BigtableTableAdmin::Client::Configuration::Rpcs}
1997
+ # for a list of RPCs that can be configured independently.
1998
+ #
1999
+ # Configuration can be applied globally to all clients, or to a single client
2000
+ # on construction.
2001
+ #
2002
+ # # Examples
2003
+ #
2004
+ # To modify the global config, setting the timeout for create_table
2005
+ # to 20 seconds, and all remaining timeouts to 10 seconds:
2006
+ #
2007
+ # ::Google::Cloud::Bigtable::Admin::V2::BigtableTableAdmin::Client.configure do |config|
2008
+ # config.timeout = 10.0
2009
+ # config.rpcs.create_table.timeout = 20.0
2010
+ # end
2011
+ #
2012
+ # To apply the above configuration only to a new client:
2013
+ #
2014
+ # client = ::Google::Cloud::Bigtable::Admin::V2::BigtableTableAdmin::Client.new do |config|
2015
+ # config.timeout = 10.0
2016
+ # config.rpcs.create_table.timeout = 20.0
2017
+ # end
2018
+ #
2019
+ # @!attribute [rw] endpoint
2020
+ # The hostname or hostname:port of the service endpoint.
2021
+ # Defaults to `"bigtableadmin.googleapis.com"`.
2022
+ # @return [::String]
2023
+ # @!attribute [rw] credentials
2024
+ # Credentials to send with calls. You may provide any of the following types:
2025
+ # * (`String`) The path to a service account key file in JSON format
2026
+ # * (`Hash`) A service account key as a Hash
2027
+ # * (`Google::Auth::Credentials`) A googleauth credentials object
2028
+ # (see the [googleauth docs](https://googleapis.dev/ruby/googleauth/latest/index.html))
2029
+ # * (`Signet::OAuth2::Client`) A signet oauth2 client object
2030
+ # (see the [signet docs](https://googleapis.dev/ruby/signet/latest/Signet/OAuth2/Client.html))
2031
+ # * (`GRPC::Core::Channel`) a gRPC channel with included credentials
2032
+ # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object
2033
+ # * (`nil`) indicating no credentials
2034
+ # @return [::Object]
2035
+ # @!attribute [rw] scope
2036
+ # The OAuth scopes
2037
+ # @return [::Array<::String>]
2038
+ # @!attribute [rw] lib_name
2039
+ # The library name as recorded in instrumentation and logging
2040
+ # @return [::String]
2041
+ # @!attribute [rw] lib_version
2042
+ # The library version as recorded in instrumentation and logging
2043
+ # @return [::String]
2044
+ # @!attribute [rw] channel_args
2045
+ # Extra parameters passed to the gRPC channel. Note: this is ignored if a
2046
+ # `GRPC::Core::Channel` object is provided as the credential.
2047
+ # @return [::Hash]
2048
+ # @!attribute [rw] interceptors
2049
+ # An array of interceptors that are run before calls are executed.
2050
+ # @return [::Array<::GRPC::ClientInterceptor>]
2051
+ # @!attribute [rw] timeout
2052
+ # The call timeout in seconds.
2053
+ # @return [::Numeric]
2054
+ # @!attribute [rw] metadata
2055
+ # Additional gRPC headers to be sent with the call.
2056
+ # @return [::Hash{::Symbol=>::String}]
2057
+ # @!attribute [rw] retry_policy
2058
+ # The retry policy. The value is a hash with the following keys:
2059
+ # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds.
2060
+ # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds.
2061
+ # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier.
2062
+ # * `:retry_codes` (*type:* `Array<String>`) - The error codes that should
2063
+ # trigger a retry.
2064
+ # @return [::Hash]
2065
+ # @!attribute [rw] quota_project
2066
+ # A separate project against which to charge quota.
2067
+ # @return [::String]
2068
+ #
2069
+ class Configuration
2070
+ extend ::Gapic::Config
2071
+
2072
+ config_attr :endpoint, "bigtableadmin.googleapis.com", ::String
2073
+ config_attr :credentials, nil do |value|
2074
+ allowed = [::String, ::Hash, ::Proc, ::Google::Auth::Credentials, ::Signet::OAuth2::Client, nil]
2075
+ allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC
2076
+ allowed.any? { |klass| klass === value }
2077
+ end
2078
+ config_attr :scope, nil, ::String, ::Array, nil
2079
+ config_attr :lib_name, nil, ::String, nil
2080
+ config_attr :lib_version, nil, ::String, nil
2081
+ config_attr(:channel_args, { "grpc.service_config_disable_resolution"=>1 }, ::Hash, nil)
2082
+ config_attr :interceptors, nil, ::Array, nil
2083
+ config_attr :timeout, nil, ::Numeric, nil
2084
+ config_attr :metadata, nil, ::Hash, nil
2085
+ config_attr :retry_policy, nil, ::Hash, ::Proc, nil
2086
+ config_attr :quota_project, nil, ::String, nil
2087
+
2088
+ # @private
2089
+ def initialize parent_config = nil
2090
+ @parent_config = parent_config unless parent_config.nil?
2091
+
2092
+ yield self if block_given?
2093
+ end
2094
+
2095
+ ##
2096
+ # Configurations for individual RPCs
2097
+ # @return [Rpcs]
2098
+ #
2099
+ def rpcs
2100
+ @rpcs ||= begin
2101
+ parent_rpcs = nil
2102
+ parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config&.respond_to?(:rpcs)
2103
+ Rpcs.new parent_rpcs
2104
+ end
2105
+ end
2106
+
2107
+ ##
2108
+ # Configuration RPC class for the BigtableTableAdmin API.
2109
+ #
2110
+ # Includes fields providing the configuration for each RPC in this service.
2111
+ # Each configuration object is of type `Gapic::Config::Method` and includes
2112
+ # the following configuration fields:
2113
+ #
2114
+ # * `timeout` (*type:* `Numeric`) - The call timeout in milliseconds
2115
+ # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers
2116
+ # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields
2117
+ # include the following keys:
2118
+ # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds.
2119
+ # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds.
2120
+ # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier.
2121
+ # * `:retry_codes` (*type:* `Array<String>`) - The error codes that should
2122
+ # trigger a retry.
2123
+ #
2124
+ class Rpcs
2125
+ ##
2126
+ # RPC-specific configuration for `create_table`
2127
+ # @return [::Gapic::Config::Method]
2128
+ #
2129
+ attr_reader :create_table
2130
+ ##
2131
+ # RPC-specific configuration for `create_table_from_snapshot`
2132
+ # @return [::Gapic::Config::Method]
2133
+ #
2134
+ attr_reader :create_table_from_snapshot
2135
+ ##
2136
+ # RPC-specific configuration for `list_tables`
2137
+ # @return [::Gapic::Config::Method]
2138
+ #
2139
+ attr_reader :list_tables
2140
+ ##
2141
+ # RPC-specific configuration for `get_table`
2142
+ # @return [::Gapic::Config::Method]
2143
+ #
2144
+ attr_reader :get_table
2145
+ ##
2146
+ # RPC-specific configuration for `delete_table`
2147
+ # @return [::Gapic::Config::Method]
2148
+ #
2149
+ attr_reader :delete_table
2150
+ ##
2151
+ # RPC-specific configuration for `modify_column_families`
2152
+ # @return [::Gapic::Config::Method]
2153
+ #
2154
+ attr_reader :modify_column_families
2155
+ ##
2156
+ # RPC-specific configuration for `drop_row_range`
2157
+ # @return [::Gapic::Config::Method]
2158
+ #
2159
+ attr_reader :drop_row_range
2160
+ ##
2161
+ # RPC-specific configuration for `generate_consistency_token`
2162
+ # @return [::Gapic::Config::Method]
2163
+ #
2164
+ attr_reader :generate_consistency_token
2165
+ ##
2166
+ # RPC-specific configuration for `check_consistency`
2167
+ # @return [::Gapic::Config::Method]
2168
+ #
2169
+ attr_reader :check_consistency
2170
+ ##
2171
+ # RPC-specific configuration for `snapshot_table`
2172
+ # @return [::Gapic::Config::Method]
2173
+ #
2174
+ attr_reader :snapshot_table
2175
+ ##
2176
+ # RPC-specific configuration for `get_snapshot`
2177
+ # @return [::Gapic::Config::Method]
2178
+ #
2179
+ attr_reader :get_snapshot
2180
+ ##
2181
+ # RPC-specific configuration for `list_snapshots`
2182
+ # @return [::Gapic::Config::Method]
2183
+ #
2184
+ attr_reader :list_snapshots
2185
+ ##
2186
+ # RPC-specific configuration for `delete_snapshot`
2187
+ # @return [::Gapic::Config::Method]
2188
+ #
2189
+ attr_reader :delete_snapshot
2190
+ ##
2191
+ # RPC-specific configuration for `create_backup`
2192
+ # @return [::Gapic::Config::Method]
2193
+ #
2194
+ attr_reader :create_backup
2195
+ ##
2196
+ # RPC-specific configuration for `get_backup`
2197
+ # @return [::Gapic::Config::Method]
2198
+ #
2199
+ attr_reader :get_backup
2200
+ ##
2201
+ # RPC-specific configuration for `update_backup`
2202
+ # @return [::Gapic::Config::Method]
2203
+ #
2204
+ attr_reader :update_backup
2205
+ ##
2206
+ # RPC-specific configuration for `delete_backup`
2207
+ # @return [::Gapic::Config::Method]
2208
+ #
2209
+ attr_reader :delete_backup
2210
+ ##
2211
+ # RPC-specific configuration for `list_backups`
2212
+ # @return [::Gapic::Config::Method]
2213
+ #
2214
+ attr_reader :list_backups
2215
+ ##
2216
+ # RPC-specific configuration for `restore_table`
2217
+ # @return [::Gapic::Config::Method]
2218
+ #
2219
+ attr_reader :restore_table
2220
+ ##
2221
+ # RPC-specific configuration for `get_iam_policy`
2222
+ # @return [::Gapic::Config::Method]
2223
+ #
2224
+ attr_reader :get_iam_policy
2225
+ ##
2226
+ # RPC-specific configuration for `set_iam_policy`
2227
+ # @return [::Gapic::Config::Method]
2228
+ #
2229
+ attr_reader :set_iam_policy
2230
+ ##
2231
+ # RPC-specific configuration for `test_iam_permissions`
2232
+ # @return [::Gapic::Config::Method]
2233
+ #
2234
+ attr_reader :test_iam_permissions
2235
+
2236
+ # @private
2237
+ def initialize parent_rpcs = nil
2238
+ create_table_config = parent_rpcs&.create_table if parent_rpcs&.respond_to? :create_table
2239
+ @create_table = ::Gapic::Config::Method.new create_table_config
2240
+ create_table_from_snapshot_config = parent_rpcs&.create_table_from_snapshot if parent_rpcs&.respond_to? :create_table_from_snapshot
2241
+ @create_table_from_snapshot = ::Gapic::Config::Method.new create_table_from_snapshot_config
2242
+ list_tables_config = parent_rpcs&.list_tables if parent_rpcs&.respond_to? :list_tables
2243
+ @list_tables = ::Gapic::Config::Method.new list_tables_config
2244
+ get_table_config = parent_rpcs&.get_table if parent_rpcs&.respond_to? :get_table
2245
+ @get_table = ::Gapic::Config::Method.new get_table_config
2246
+ delete_table_config = parent_rpcs&.delete_table if parent_rpcs&.respond_to? :delete_table
2247
+ @delete_table = ::Gapic::Config::Method.new delete_table_config
2248
+ modify_column_families_config = parent_rpcs&.modify_column_families if parent_rpcs&.respond_to? :modify_column_families
2249
+ @modify_column_families = ::Gapic::Config::Method.new modify_column_families_config
2250
+ drop_row_range_config = parent_rpcs&.drop_row_range if parent_rpcs&.respond_to? :drop_row_range
2251
+ @drop_row_range = ::Gapic::Config::Method.new drop_row_range_config
2252
+ generate_consistency_token_config = parent_rpcs&.generate_consistency_token if parent_rpcs&.respond_to? :generate_consistency_token
2253
+ @generate_consistency_token = ::Gapic::Config::Method.new generate_consistency_token_config
2254
+ check_consistency_config = parent_rpcs&.check_consistency if parent_rpcs&.respond_to? :check_consistency
2255
+ @check_consistency = ::Gapic::Config::Method.new check_consistency_config
2256
+ snapshot_table_config = parent_rpcs&.snapshot_table if parent_rpcs&.respond_to? :snapshot_table
2257
+ @snapshot_table = ::Gapic::Config::Method.new snapshot_table_config
2258
+ get_snapshot_config = parent_rpcs&.get_snapshot if parent_rpcs&.respond_to? :get_snapshot
2259
+ @get_snapshot = ::Gapic::Config::Method.new get_snapshot_config
2260
+ list_snapshots_config = parent_rpcs&.list_snapshots if parent_rpcs&.respond_to? :list_snapshots
2261
+ @list_snapshots = ::Gapic::Config::Method.new list_snapshots_config
2262
+ delete_snapshot_config = parent_rpcs&.delete_snapshot if parent_rpcs&.respond_to? :delete_snapshot
2263
+ @delete_snapshot = ::Gapic::Config::Method.new delete_snapshot_config
2264
+ create_backup_config = parent_rpcs&.create_backup if parent_rpcs&.respond_to? :create_backup
2265
+ @create_backup = ::Gapic::Config::Method.new create_backup_config
2266
+ get_backup_config = parent_rpcs&.get_backup if parent_rpcs&.respond_to? :get_backup
2267
+ @get_backup = ::Gapic::Config::Method.new get_backup_config
2268
+ update_backup_config = parent_rpcs&.update_backup if parent_rpcs&.respond_to? :update_backup
2269
+ @update_backup = ::Gapic::Config::Method.new update_backup_config
2270
+ delete_backup_config = parent_rpcs&.delete_backup if parent_rpcs&.respond_to? :delete_backup
2271
+ @delete_backup = ::Gapic::Config::Method.new delete_backup_config
2272
+ list_backups_config = parent_rpcs&.list_backups if parent_rpcs&.respond_to? :list_backups
2273
+ @list_backups = ::Gapic::Config::Method.new list_backups_config
2274
+ restore_table_config = parent_rpcs&.restore_table if parent_rpcs&.respond_to? :restore_table
2275
+ @restore_table = ::Gapic::Config::Method.new restore_table_config
2276
+ get_iam_policy_config = parent_rpcs&.get_iam_policy if parent_rpcs&.respond_to? :get_iam_policy
2277
+ @get_iam_policy = ::Gapic::Config::Method.new get_iam_policy_config
2278
+ set_iam_policy_config = parent_rpcs&.set_iam_policy if parent_rpcs&.respond_to? :set_iam_policy
2279
+ @set_iam_policy = ::Gapic::Config::Method.new set_iam_policy_config
2280
+ test_iam_permissions_config = parent_rpcs&.test_iam_permissions if parent_rpcs&.respond_to? :test_iam_permissions
2281
+ @test_iam_permissions = ::Gapic::Config::Method.new test_iam_permissions_config
2282
+
2283
+ yield self if block_given?
2284
+ end
2285
+ end
2286
+ end
2287
+ end
2288
+ end
2289
+ end
2290
+ end
2291
+ end
2292
+ end
2293
+ end