google-area120-tables-v1alpha1 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.
@@ -0,0 +1,21 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Copyright 2021 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
+ # This gem does not autoload during Bundler.require. To load this gem,
20
+ # issue explicit require statements for the packages desired, e.g.:
21
+ # require "google/area120/tables/v1alpha1"
@@ -0,0 +1,38 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Copyright 2021 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/area120/tables/v1alpha1/tables_service"
20
+ require "google/area120/tables/v1alpha1/version"
21
+
22
+ module Google
23
+ module Area120
24
+ module Tables
25
+ ##
26
+ # To load this package, including all its services, and instantiate a client:
27
+ #
28
+ # require "google/area120/tables/v1alpha1"
29
+ # client = ::Google::Area120::Tables::V1alpha1::TablesService::Client.new
30
+ #
31
+ module V1alpha1
32
+ end
33
+ end
34
+ end
35
+ end
36
+
37
+ helper_path = ::File.join __dir__, "v1alpha1", "_helpers.rb"
38
+ require "google/area120/tables/v1alpha1/_helpers" if ::File.file? helper_path
@@ -0,0 +1,155 @@
1
+ # Generated by the protocol buffer compiler. DO NOT EDIT!
2
+ # source: google/area120/tables/v1alpha1/tables.proto
3
+
4
+ require 'google/protobuf'
5
+
6
+ require 'google/api/annotations_pb'
7
+ require 'google/api/client_pb'
8
+ require 'google/api/field_behavior_pb'
9
+ require 'google/api/resource_pb'
10
+ require 'google/protobuf/empty_pb'
11
+ require 'google/protobuf/field_mask_pb'
12
+ require 'google/protobuf/struct_pb'
13
+ Google::Protobuf::DescriptorPool.generated_pool.build do
14
+ add_file("google/area120/tables/v1alpha1/tables.proto", :syntax => :proto3) do
15
+ add_message "google.area120.tables.v1alpha1.GetTableRequest" do
16
+ optional :name, :string, 1
17
+ end
18
+ add_message "google.area120.tables.v1alpha1.ListTablesRequest" do
19
+ optional :page_size, :int32, 1
20
+ optional :page_token, :string, 2
21
+ end
22
+ add_message "google.area120.tables.v1alpha1.ListTablesResponse" do
23
+ repeated :tables, :message, 1, "google.area120.tables.v1alpha1.Table"
24
+ optional :next_page_token, :string, 2
25
+ end
26
+ add_message "google.area120.tables.v1alpha1.GetWorkspaceRequest" do
27
+ optional :name, :string, 1
28
+ end
29
+ add_message "google.area120.tables.v1alpha1.ListWorkspacesRequest" do
30
+ optional :page_size, :int32, 1
31
+ optional :page_token, :string, 2
32
+ end
33
+ add_message "google.area120.tables.v1alpha1.ListWorkspacesResponse" do
34
+ repeated :workspaces, :message, 1, "google.area120.tables.v1alpha1.Workspace"
35
+ optional :next_page_token, :string, 2
36
+ end
37
+ add_message "google.area120.tables.v1alpha1.GetRowRequest" do
38
+ optional :name, :string, 1
39
+ optional :view, :enum, 2, "google.area120.tables.v1alpha1.View"
40
+ end
41
+ add_message "google.area120.tables.v1alpha1.ListRowsRequest" do
42
+ optional :parent, :string, 1
43
+ optional :page_size, :int32, 2
44
+ optional :page_token, :string, 3
45
+ optional :view, :enum, 4, "google.area120.tables.v1alpha1.View"
46
+ optional :filter, :string, 5
47
+ end
48
+ add_message "google.area120.tables.v1alpha1.ListRowsResponse" do
49
+ repeated :rows, :message, 1, "google.area120.tables.v1alpha1.Row"
50
+ optional :next_page_token, :string, 2
51
+ end
52
+ add_message "google.area120.tables.v1alpha1.CreateRowRequest" do
53
+ optional :parent, :string, 1
54
+ optional :row, :message, 2, "google.area120.tables.v1alpha1.Row"
55
+ optional :view, :enum, 3, "google.area120.tables.v1alpha1.View"
56
+ end
57
+ add_message "google.area120.tables.v1alpha1.BatchCreateRowsRequest" do
58
+ optional :parent, :string, 1
59
+ repeated :requests, :message, 2, "google.area120.tables.v1alpha1.CreateRowRequest"
60
+ end
61
+ add_message "google.area120.tables.v1alpha1.BatchCreateRowsResponse" do
62
+ repeated :rows, :message, 1, "google.area120.tables.v1alpha1.Row"
63
+ end
64
+ add_message "google.area120.tables.v1alpha1.UpdateRowRequest" do
65
+ optional :row, :message, 1, "google.area120.tables.v1alpha1.Row"
66
+ optional :update_mask, :message, 2, "google.protobuf.FieldMask"
67
+ optional :view, :enum, 3, "google.area120.tables.v1alpha1.View"
68
+ end
69
+ add_message "google.area120.tables.v1alpha1.BatchUpdateRowsRequest" do
70
+ optional :parent, :string, 1
71
+ repeated :requests, :message, 2, "google.area120.tables.v1alpha1.UpdateRowRequest"
72
+ end
73
+ add_message "google.area120.tables.v1alpha1.BatchUpdateRowsResponse" do
74
+ repeated :rows, :message, 1, "google.area120.tables.v1alpha1.Row"
75
+ end
76
+ add_message "google.area120.tables.v1alpha1.DeleteRowRequest" do
77
+ optional :name, :string, 1
78
+ end
79
+ add_message "google.area120.tables.v1alpha1.BatchDeleteRowsRequest" do
80
+ optional :parent, :string, 1
81
+ repeated :names, :string, 2
82
+ end
83
+ add_message "google.area120.tables.v1alpha1.Table" do
84
+ optional :name, :string, 1
85
+ optional :display_name, :string, 2
86
+ repeated :columns, :message, 3, "google.area120.tables.v1alpha1.ColumnDescription"
87
+ end
88
+ add_message "google.area120.tables.v1alpha1.ColumnDescription" do
89
+ optional :name, :string, 1
90
+ optional :data_type, :string, 2
91
+ optional :id, :string, 3
92
+ repeated :labels, :message, 4, "google.area120.tables.v1alpha1.LabeledItem"
93
+ optional :relationship_details, :message, 5, "google.area120.tables.v1alpha1.RelationshipDetails"
94
+ optional :lookup_details, :message, 6, "google.area120.tables.v1alpha1.LookupDetails"
95
+ end
96
+ add_message "google.area120.tables.v1alpha1.LabeledItem" do
97
+ optional :name, :string, 1
98
+ optional :id, :string, 2
99
+ end
100
+ add_message "google.area120.tables.v1alpha1.RelationshipDetails" do
101
+ optional :linked_table, :string, 1
102
+ end
103
+ add_message "google.area120.tables.v1alpha1.LookupDetails" do
104
+ optional :relationship_column, :string, 1
105
+ optional :relationship_column_id, :string, 2
106
+ end
107
+ add_message "google.area120.tables.v1alpha1.Row" do
108
+ optional :name, :string, 1
109
+ map :values, :string, :message, 2, "google.protobuf.Value"
110
+ end
111
+ add_message "google.area120.tables.v1alpha1.Workspace" do
112
+ optional :name, :string, 1
113
+ optional :display_name, :string, 2
114
+ repeated :tables, :message, 3, "google.area120.tables.v1alpha1.Table"
115
+ end
116
+ add_enum "google.area120.tables.v1alpha1.View" do
117
+ value :VIEW_UNSPECIFIED, 0
118
+ value :COLUMN_ID_VIEW, 1
119
+ end
120
+ end
121
+ end
122
+
123
+ module Google
124
+ module Area120
125
+ module Tables
126
+ module V1alpha1
127
+ GetTableRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.area120.tables.v1alpha1.GetTableRequest").msgclass
128
+ ListTablesRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.area120.tables.v1alpha1.ListTablesRequest").msgclass
129
+ ListTablesResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.area120.tables.v1alpha1.ListTablesResponse").msgclass
130
+ GetWorkspaceRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.area120.tables.v1alpha1.GetWorkspaceRequest").msgclass
131
+ ListWorkspacesRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.area120.tables.v1alpha1.ListWorkspacesRequest").msgclass
132
+ ListWorkspacesResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.area120.tables.v1alpha1.ListWorkspacesResponse").msgclass
133
+ GetRowRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.area120.tables.v1alpha1.GetRowRequest").msgclass
134
+ ListRowsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.area120.tables.v1alpha1.ListRowsRequest").msgclass
135
+ ListRowsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.area120.tables.v1alpha1.ListRowsResponse").msgclass
136
+ CreateRowRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.area120.tables.v1alpha1.CreateRowRequest").msgclass
137
+ BatchCreateRowsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.area120.tables.v1alpha1.BatchCreateRowsRequest").msgclass
138
+ BatchCreateRowsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.area120.tables.v1alpha1.BatchCreateRowsResponse").msgclass
139
+ UpdateRowRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.area120.tables.v1alpha1.UpdateRowRequest").msgclass
140
+ BatchUpdateRowsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.area120.tables.v1alpha1.BatchUpdateRowsRequest").msgclass
141
+ BatchUpdateRowsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.area120.tables.v1alpha1.BatchUpdateRowsResponse").msgclass
142
+ DeleteRowRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.area120.tables.v1alpha1.DeleteRowRequest").msgclass
143
+ BatchDeleteRowsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.area120.tables.v1alpha1.BatchDeleteRowsRequest").msgclass
144
+ Table = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.area120.tables.v1alpha1.Table").msgclass
145
+ ColumnDescription = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.area120.tables.v1alpha1.ColumnDescription").msgclass
146
+ LabeledItem = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.area120.tables.v1alpha1.LabeledItem").msgclass
147
+ RelationshipDetails = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.area120.tables.v1alpha1.RelationshipDetails").msgclass
148
+ LookupDetails = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.area120.tables.v1alpha1.LookupDetails").msgclass
149
+ Row = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.area120.tables.v1alpha1.Row").msgclass
150
+ Workspace = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.area120.tables.v1alpha1.Workspace").msgclass
151
+ View = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.area120.tables.v1alpha1.View").enummodule
152
+ end
153
+ end
154
+ end
155
+ end
@@ -0,0 +1,60 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Copyright 2021 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/area120/tables/v1alpha1/version"
24
+
25
+ require "google/area120/tables/v1alpha1/tables_service/credentials"
26
+ require "google/area120/tables/v1alpha1/tables_service/paths"
27
+ require "google/area120/tables/v1alpha1/tables_service/client"
28
+
29
+ module Google
30
+ module Area120
31
+ module Tables
32
+ module V1alpha1
33
+ ##
34
+ # The Tables Service provides an API for reading and updating tables.
35
+ # It defines the following resource model:
36
+ #
37
+ # - The API has a collection of {::Google::Area120::Tables::V1alpha1::Table Table}
38
+ # resources, named `tables/*`
39
+ #
40
+ # - Each Table has a collection of {::Google::Area120::Tables::V1alpha1::Row Row}
41
+ # resources, named `tables/*/rows/*`
42
+ #
43
+ # - The API has a collection of
44
+ # {::Google::Area120::Tables::V1alpha1::Workspace Workspace}
45
+ # resources, named `workspaces/*`.
46
+ #
47
+ # To load this service and instantiate a client:
48
+ #
49
+ # require "google/area120/tables/v1alpha1/tables_service"
50
+ # client = ::Google::Area120::Tables::V1alpha1::TablesService::Client.new
51
+ #
52
+ module TablesService
53
+ end
54
+ end
55
+ end
56
+ end
57
+ end
58
+
59
+ helper_path = ::File.join __dir__, "tables_service", "helpers.rb"
60
+ require "google/area120/tables/v1alpha1/tables_service/helpers" if ::File.file? helper_path
@@ -0,0 +1,1286 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Copyright 2021 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/area120/tables/v1alpha1/tables_pb"
21
+
22
+ module Google
23
+ module Area120
24
+ module Tables
25
+ module V1alpha1
26
+ module TablesService
27
+ ##
28
+ # Client for the TablesService service.
29
+ #
30
+ # The Tables Service provides an API for reading and updating tables.
31
+ # It defines the following resource model:
32
+ #
33
+ # - The API has a collection of {::Google::Area120::Tables::V1alpha1::Table Table}
34
+ # resources, named `tables/*`
35
+ #
36
+ # - Each Table has a collection of {::Google::Area120::Tables::V1alpha1::Row Row}
37
+ # resources, named `tables/*/rows/*`
38
+ #
39
+ # - The API has a collection of
40
+ # {::Google::Area120::Tables::V1alpha1::Workspace Workspace}
41
+ # resources, named `workspaces/*`.
42
+ #
43
+ class Client
44
+ include Paths
45
+
46
+ # @private
47
+ attr_reader :tables_service_stub
48
+
49
+ ##
50
+ # Configure the TablesService Client class.
51
+ #
52
+ # See {::Google::Area120::Tables::V1alpha1::TablesService::Client::Configuration}
53
+ # for a description of the configuration fields.
54
+ #
55
+ # ## Example
56
+ #
57
+ # To modify the configuration for all TablesService clients:
58
+ #
59
+ # ::Google::Area120::Tables::V1alpha1::TablesService::Client.configure do |config|
60
+ # config.timeout = 10.0
61
+ # end
62
+ #
63
+ # @yield [config] Configure the Client client.
64
+ # @yieldparam config [Client::Configuration]
65
+ #
66
+ # @return [Client::Configuration]
67
+ #
68
+ def self.configure
69
+ @configure ||= begin
70
+ namespace = ["Google", "Area120", "Tables", "V1alpha1"]
71
+ parent_config = while namespace.any?
72
+ parent_name = namespace.join "::"
73
+ parent_const = const_get parent_name
74
+ break parent_const.configure if parent_const&.respond_to? :configure
75
+ namespace.pop
76
+ end
77
+ default_config = Client::Configuration.new parent_config
78
+
79
+ default_config.timeout = 60.0
80
+ default_config.retry_policy = {
81
+ initial_delay: 1.0,
82
+ max_delay: 10.0,
83
+ multiplier: 1.3,
84
+ retry_codes: [14]
85
+ }
86
+
87
+ default_config.rpcs.get_table.timeout = 60.0
88
+
89
+ default_config.rpcs.list_tables.timeout = 60.0
90
+
91
+ default_config.rpcs.get_workspace.timeout = 60.0
92
+
93
+ default_config.rpcs.list_workspaces.timeout = 60.0
94
+
95
+ default_config.rpcs.get_row.timeout = 60.0
96
+
97
+ default_config.rpcs.list_rows.timeout = 60.0
98
+
99
+ default_config.rpcs.create_row.timeout = 60.0
100
+
101
+ default_config.rpcs.batch_create_rows.timeout = 60.0
102
+
103
+ default_config.rpcs.update_row.timeout = 60.0
104
+
105
+ default_config.rpcs.batch_update_rows.timeout = 60.0
106
+
107
+ default_config.rpcs.delete_row.timeout = 60.0
108
+
109
+ default_config.rpcs.batch_delete_rows.timeout = 60.0
110
+
111
+ default_config
112
+ end
113
+ yield @configure if block_given?
114
+ @configure
115
+ end
116
+
117
+ ##
118
+ # Configure the TablesService Client instance.
119
+ #
120
+ # The configuration is set to the derived mode, meaning that values can be changed,
121
+ # but structural changes (adding new fields, etc.) are not allowed. Structural changes
122
+ # should be made on {Client.configure}.
123
+ #
124
+ # See {::Google::Area120::Tables::V1alpha1::TablesService::Client::Configuration}
125
+ # for a description of the configuration fields.
126
+ #
127
+ # @yield [config] Configure the Client client.
128
+ # @yieldparam config [Client::Configuration]
129
+ #
130
+ # @return [Client::Configuration]
131
+ #
132
+ def configure
133
+ yield @config if block_given?
134
+ @config
135
+ end
136
+
137
+ ##
138
+ # Create a new TablesService client object.
139
+ #
140
+ # ## Examples
141
+ #
142
+ # To create a new TablesService client with the default
143
+ # configuration:
144
+ #
145
+ # client = ::Google::Area120::Tables::V1alpha1::TablesService::Client.new
146
+ #
147
+ # To create a new TablesService client with a custom
148
+ # configuration:
149
+ #
150
+ # client = ::Google::Area120::Tables::V1alpha1::TablesService::Client.new do |config|
151
+ # config.timeout = 10.0
152
+ # end
153
+ #
154
+ # @yield [config] Configure the TablesService client.
155
+ # @yieldparam config [Client::Configuration]
156
+ #
157
+ def initialize
158
+ # These require statements are intentionally placed here to initialize
159
+ # the gRPC module only when it's required.
160
+ # See https://github.com/googleapis/toolkit/issues/446
161
+ require "gapic/grpc"
162
+ require "google/area120/tables/v1alpha1/tables_services_pb"
163
+
164
+ # Create the configuration object
165
+ @config = Configuration.new Client.configure
166
+
167
+ # Yield the configuration if needed
168
+ yield @config if block_given?
169
+
170
+ # Create credentials
171
+ credentials = @config.credentials
172
+ # Use self-signed JWT if the scope and endpoint are unchanged from default,
173
+ # but only if the default endpoint does not have a region prefix.
174
+ enable_self_signed_jwt = @config.scope == Client.configure.scope &&
175
+ @config.endpoint == Client.configure.endpoint &&
176
+ !@config.endpoint.split(".").first.include?("-")
177
+ credentials ||= Credentials.default scope: @config.scope,
178
+ enable_self_signed_jwt: enable_self_signed_jwt
179
+ if credentials.is_a?(String) || credentials.is_a?(Hash)
180
+ credentials = Credentials.new credentials, scope: @config.scope
181
+ end
182
+ @quota_project_id = @config.quota_project
183
+ @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id
184
+
185
+ @tables_service_stub = ::Gapic::ServiceStub.new(
186
+ ::Google::Area120::Tables::V1alpha1::TablesService::Stub,
187
+ credentials: credentials,
188
+ endpoint: @config.endpoint,
189
+ channel_args: @config.channel_args,
190
+ interceptors: @config.interceptors
191
+ )
192
+ end
193
+
194
+ # Service calls
195
+
196
+ ##
197
+ # Gets a table. Returns NOT_FOUND if the table does not exist.
198
+ #
199
+ # @overload get_table(request, options = nil)
200
+ # Pass arguments to `get_table` via a request object, either of type
201
+ # {::Google::Area120::Tables::V1alpha1::GetTableRequest} or an equivalent Hash.
202
+ #
203
+ # @param request [::Google::Area120::Tables::V1alpha1::GetTableRequest, ::Hash]
204
+ # A request object representing the call parameters. Required. To specify no
205
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
206
+ # @param options [::Gapic::CallOptions, ::Hash]
207
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
208
+ #
209
+ # @overload get_table(name: nil)
210
+ # Pass arguments to `get_table` via keyword arguments. Note that at
211
+ # least one keyword argument is required. To specify no parameters, or to keep all
212
+ # the default parameter values, pass an empty Hash as a request object (see above).
213
+ #
214
+ # @param name [::String]
215
+ # Required. The name of the table to retrieve.
216
+ # Format: tables/\\{table}
217
+ #
218
+ # @yield [response, operation] Access the result along with the RPC operation
219
+ # @yieldparam response [::Google::Area120::Tables::V1alpha1::Table]
220
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
221
+ #
222
+ # @return [::Google::Area120::Tables::V1alpha1::Table]
223
+ #
224
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
225
+ #
226
+ def get_table request, options = nil
227
+ raise ::ArgumentError, "request must be provided" if request.nil?
228
+
229
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Area120::Tables::V1alpha1::GetTableRequest
230
+
231
+ # Converts hash and nil to an options object
232
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
233
+
234
+ # Customize the options with defaults
235
+ metadata = @config.rpcs.get_table.metadata.to_h
236
+
237
+ # Set x-goog-api-client and x-goog-user-project headers
238
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
239
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
240
+ gapic_version: ::Google::Area120::Tables::V1alpha1::VERSION
241
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
242
+
243
+ header_params = {
244
+ "name" => request.name
245
+ }
246
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
247
+ metadata[:"x-goog-request-params"] ||= request_params_header
248
+
249
+ options.apply_defaults timeout: @config.rpcs.get_table.timeout,
250
+ metadata: metadata,
251
+ retry_policy: @config.rpcs.get_table.retry_policy
252
+ options.apply_defaults metadata: @config.metadata,
253
+ retry_policy: @config.retry_policy
254
+
255
+ @tables_service_stub.call_rpc :get_table, request, options: options do |response, operation|
256
+ yield response, operation if block_given?
257
+ return response
258
+ end
259
+ rescue ::GRPC::BadStatus => e
260
+ raise ::Google::Cloud::Error.from_error(e)
261
+ end
262
+
263
+ ##
264
+ # Lists tables for the user.
265
+ #
266
+ # @overload list_tables(request, options = nil)
267
+ # Pass arguments to `list_tables` via a request object, either of type
268
+ # {::Google::Area120::Tables::V1alpha1::ListTablesRequest} or an equivalent Hash.
269
+ #
270
+ # @param request [::Google::Area120::Tables::V1alpha1::ListTablesRequest, ::Hash]
271
+ # A request object representing the call parameters. Required. To specify no
272
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
273
+ # @param options [::Gapic::CallOptions, ::Hash]
274
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
275
+ #
276
+ # @overload list_tables(page_size: nil, page_token: nil)
277
+ # Pass arguments to `list_tables` via keyword arguments. Note that at
278
+ # least one keyword argument is required. To specify no parameters, or to keep all
279
+ # the default parameter values, pass an empty Hash as a request object (see above).
280
+ #
281
+ # @param page_size [::Integer]
282
+ # The maximum number of tables to return. The service may return fewer than
283
+ # this value.
284
+ #
285
+ # If unspecified, at most 20 tables are returned. The maximum value is 100;
286
+ # values above 100 are coerced to 100.
287
+ # @param page_token [::String]
288
+ # A page token, received from a previous `ListTables` call.
289
+ # Provide this to retrieve the subsequent page.
290
+ #
291
+ # When paginating, all other parameters provided to `ListTables` must match
292
+ # the call that provided the page token.
293
+ #
294
+ # @yield [response, operation] Access the result along with the RPC operation
295
+ # @yieldparam response [::Gapic::PagedEnumerable<::Google::Area120::Tables::V1alpha1::Table>]
296
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
297
+ #
298
+ # @return [::Gapic::PagedEnumerable<::Google::Area120::Tables::V1alpha1::Table>]
299
+ #
300
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
301
+ #
302
+ def list_tables request, options = nil
303
+ raise ::ArgumentError, "request must be provided" if request.nil?
304
+
305
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Area120::Tables::V1alpha1::ListTablesRequest
306
+
307
+ # Converts hash and nil to an options object
308
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
309
+
310
+ # Customize the options with defaults
311
+ metadata = @config.rpcs.list_tables.metadata.to_h
312
+
313
+ # Set x-goog-api-client and x-goog-user-project headers
314
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
315
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
316
+ gapic_version: ::Google::Area120::Tables::V1alpha1::VERSION
317
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
318
+
319
+ options.apply_defaults timeout: @config.rpcs.list_tables.timeout,
320
+ metadata: metadata,
321
+ retry_policy: @config.rpcs.list_tables.retry_policy
322
+ options.apply_defaults metadata: @config.metadata,
323
+ retry_policy: @config.retry_policy
324
+
325
+ @tables_service_stub.call_rpc :list_tables, request, options: options do |response, operation|
326
+ response = ::Gapic::PagedEnumerable.new @tables_service_stub, :list_tables, request, response, operation, options
327
+ yield response, operation if block_given?
328
+ return response
329
+ end
330
+ rescue ::GRPC::BadStatus => e
331
+ raise ::Google::Cloud::Error.from_error(e)
332
+ end
333
+
334
+ ##
335
+ # Gets a workspace. Returns NOT_FOUND if the workspace does not exist.
336
+ #
337
+ # @overload get_workspace(request, options = nil)
338
+ # Pass arguments to `get_workspace` via a request object, either of type
339
+ # {::Google::Area120::Tables::V1alpha1::GetWorkspaceRequest} or an equivalent Hash.
340
+ #
341
+ # @param request [::Google::Area120::Tables::V1alpha1::GetWorkspaceRequest, ::Hash]
342
+ # A request object representing the call parameters. Required. To specify no
343
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
344
+ # @param options [::Gapic::CallOptions, ::Hash]
345
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
346
+ #
347
+ # @overload get_workspace(name: nil)
348
+ # Pass arguments to `get_workspace` via keyword arguments. Note that at
349
+ # least one keyword argument is required. To specify no parameters, or to keep all
350
+ # the default parameter values, pass an empty Hash as a request object (see above).
351
+ #
352
+ # @param name [::String]
353
+ # Required. The name of the workspace to retrieve.
354
+ # Format: workspaces/\\{workspace}
355
+ #
356
+ # @yield [response, operation] Access the result along with the RPC operation
357
+ # @yieldparam response [::Google::Area120::Tables::V1alpha1::Workspace]
358
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
359
+ #
360
+ # @return [::Google::Area120::Tables::V1alpha1::Workspace]
361
+ #
362
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
363
+ #
364
+ def get_workspace request, options = nil
365
+ raise ::ArgumentError, "request must be provided" if request.nil?
366
+
367
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Area120::Tables::V1alpha1::GetWorkspaceRequest
368
+
369
+ # Converts hash and nil to an options object
370
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
371
+
372
+ # Customize the options with defaults
373
+ metadata = @config.rpcs.get_workspace.metadata.to_h
374
+
375
+ # Set x-goog-api-client and x-goog-user-project headers
376
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
377
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
378
+ gapic_version: ::Google::Area120::Tables::V1alpha1::VERSION
379
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
380
+
381
+ header_params = {
382
+ "name" => request.name
383
+ }
384
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
385
+ metadata[:"x-goog-request-params"] ||= request_params_header
386
+
387
+ options.apply_defaults timeout: @config.rpcs.get_workspace.timeout,
388
+ metadata: metadata,
389
+ retry_policy: @config.rpcs.get_workspace.retry_policy
390
+ options.apply_defaults metadata: @config.metadata,
391
+ retry_policy: @config.retry_policy
392
+
393
+ @tables_service_stub.call_rpc :get_workspace, request, options: options do |response, operation|
394
+ yield response, operation if block_given?
395
+ return response
396
+ end
397
+ rescue ::GRPC::BadStatus => e
398
+ raise ::Google::Cloud::Error.from_error(e)
399
+ end
400
+
401
+ ##
402
+ # Lists workspaces for the user.
403
+ #
404
+ # @overload list_workspaces(request, options = nil)
405
+ # Pass arguments to `list_workspaces` via a request object, either of type
406
+ # {::Google::Area120::Tables::V1alpha1::ListWorkspacesRequest} or an equivalent Hash.
407
+ #
408
+ # @param request [::Google::Area120::Tables::V1alpha1::ListWorkspacesRequest, ::Hash]
409
+ # A request object representing the call parameters. Required. To specify no
410
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
411
+ # @param options [::Gapic::CallOptions, ::Hash]
412
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
413
+ #
414
+ # @overload list_workspaces(page_size: nil, page_token: nil)
415
+ # Pass arguments to `list_workspaces` via keyword arguments. Note that at
416
+ # least one keyword argument is required. To specify no parameters, or to keep all
417
+ # the default parameter values, pass an empty Hash as a request object (see above).
418
+ #
419
+ # @param page_size [::Integer]
420
+ # The maximum number of workspaces to return. The service may return fewer
421
+ # than this value.
422
+ #
423
+ # If unspecified, at most 10 workspaces are returned. The maximum value is
424
+ # 25; values above 25 are coerced to 25.
425
+ # @param page_token [::String]
426
+ # A page token, received from a previous `ListWorkspaces` call.
427
+ # Provide this to retrieve the subsequent page.
428
+ #
429
+ # When paginating, all other parameters provided to `ListWorkspaces` must
430
+ # match the call that provided the page token.
431
+ #
432
+ # @yield [response, operation] Access the result along with the RPC operation
433
+ # @yieldparam response [::Gapic::PagedEnumerable<::Google::Area120::Tables::V1alpha1::Workspace>]
434
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
435
+ #
436
+ # @return [::Gapic::PagedEnumerable<::Google::Area120::Tables::V1alpha1::Workspace>]
437
+ #
438
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
439
+ #
440
+ def list_workspaces request, options = nil
441
+ raise ::ArgumentError, "request must be provided" if request.nil?
442
+
443
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Area120::Tables::V1alpha1::ListWorkspacesRequest
444
+
445
+ # Converts hash and nil to an options object
446
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
447
+
448
+ # Customize the options with defaults
449
+ metadata = @config.rpcs.list_workspaces.metadata.to_h
450
+
451
+ # Set x-goog-api-client and x-goog-user-project headers
452
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
453
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
454
+ gapic_version: ::Google::Area120::Tables::V1alpha1::VERSION
455
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
456
+
457
+ options.apply_defaults timeout: @config.rpcs.list_workspaces.timeout,
458
+ metadata: metadata,
459
+ retry_policy: @config.rpcs.list_workspaces.retry_policy
460
+ options.apply_defaults metadata: @config.metadata,
461
+ retry_policy: @config.retry_policy
462
+
463
+ @tables_service_stub.call_rpc :list_workspaces, request, options: options do |response, operation|
464
+ response = ::Gapic::PagedEnumerable.new @tables_service_stub, :list_workspaces, request, response, operation, options
465
+ yield response, operation if block_given?
466
+ return response
467
+ end
468
+ rescue ::GRPC::BadStatus => e
469
+ raise ::Google::Cloud::Error.from_error(e)
470
+ end
471
+
472
+ ##
473
+ # Gets a row. Returns NOT_FOUND if the row does not exist in the table.
474
+ #
475
+ # @overload get_row(request, options = nil)
476
+ # Pass arguments to `get_row` via a request object, either of type
477
+ # {::Google::Area120::Tables::V1alpha1::GetRowRequest} or an equivalent Hash.
478
+ #
479
+ # @param request [::Google::Area120::Tables::V1alpha1::GetRowRequest, ::Hash]
480
+ # A request object representing the call parameters. Required. To specify no
481
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
482
+ # @param options [::Gapic::CallOptions, ::Hash]
483
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
484
+ #
485
+ # @overload get_row(name: nil, view: nil)
486
+ # Pass arguments to `get_row` via keyword arguments. Note that at
487
+ # least one keyword argument is required. To specify no parameters, or to keep all
488
+ # the default parameter values, pass an empty Hash as a request object (see above).
489
+ #
490
+ # @param name [::String]
491
+ # Required. The name of the row to retrieve.
492
+ # Format: tables/\\{table}/rows/\\{row}
493
+ # @param view [::Google::Area120::Tables::V1alpha1::View]
494
+ # Optional. Column key to use for values in the row.
495
+ # Defaults to user entered name.
496
+ #
497
+ # @yield [response, operation] Access the result along with the RPC operation
498
+ # @yieldparam response [::Google::Area120::Tables::V1alpha1::Row]
499
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
500
+ #
501
+ # @return [::Google::Area120::Tables::V1alpha1::Row]
502
+ #
503
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
504
+ #
505
+ def get_row request, options = nil
506
+ raise ::ArgumentError, "request must be provided" if request.nil?
507
+
508
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Area120::Tables::V1alpha1::GetRowRequest
509
+
510
+ # Converts hash and nil to an options object
511
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
512
+
513
+ # Customize the options with defaults
514
+ metadata = @config.rpcs.get_row.metadata.to_h
515
+
516
+ # Set x-goog-api-client and x-goog-user-project headers
517
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
518
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
519
+ gapic_version: ::Google::Area120::Tables::V1alpha1::VERSION
520
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
521
+
522
+ header_params = {
523
+ "name" => request.name
524
+ }
525
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
526
+ metadata[:"x-goog-request-params"] ||= request_params_header
527
+
528
+ options.apply_defaults timeout: @config.rpcs.get_row.timeout,
529
+ metadata: metadata,
530
+ retry_policy: @config.rpcs.get_row.retry_policy
531
+ options.apply_defaults metadata: @config.metadata,
532
+ retry_policy: @config.retry_policy
533
+
534
+ @tables_service_stub.call_rpc :get_row, request, options: options do |response, operation|
535
+ yield response, operation if block_given?
536
+ return response
537
+ end
538
+ rescue ::GRPC::BadStatus => e
539
+ raise ::Google::Cloud::Error.from_error(e)
540
+ end
541
+
542
+ ##
543
+ # Lists rows in a table. Returns NOT_FOUND if the table does not exist.
544
+ #
545
+ # @overload list_rows(request, options = nil)
546
+ # Pass arguments to `list_rows` via a request object, either of type
547
+ # {::Google::Area120::Tables::V1alpha1::ListRowsRequest} or an equivalent Hash.
548
+ #
549
+ # @param request [::Google::Area120::Tables::V1alpha1::ListRowsRequest, ::Hash]
550
+ # A request object representing the call parameters. Required. To specify no
551
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
552
+ # @param options [::Gapic::CallOptions, ::Hash]
553
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
554
+ #
555
+ # @overload list_rows(parent: nil, page_size: nil, page_token: nil, view: nil, filter: nil)
556
+ # Pass arguments to `list_rows` via keyword arguments. Note that at
557
+ # least one keyword argument is required. To specify no parameters, or to keep all
558
+ # the default parameter values, pass an empty Hash as a request object (see above).
559
+ #
560
+ # @param parent [::String]
561
+ # Required. The parent table.
562
+ # Format: tables/\\{table}
563
+ # @param page_size [::Integer]
564
+ # The maximum number of rows to return. The service may return fewer than
565
+ # this value.
566
+ #
567
+ # If unspecified, at most 50 rows are returned. The maximum value is 1,000;
568
+ # values above 1,000 are coerced to 1,000.
569
+ # @param page_token [::String]
570
+ # A page token, received from a previous `ListRows` call.
571
+ # Provide this to retrieve the subsequent page.
572
+ #
573
+ # When paginating, all other parameters provided to `ListRows` must match
574
+ # the call that provided the page token.
575
+ # @param view [::Google::Area120::Tables::V1alpha1::View]
576
+ # Optional. Column key to use for values in the row.
577
+ # Defaults to user entered name.
578
+ # @param filter [::String]
579
+ # Optional. Raw text query to search for in rows of the table.
580
+ # Special characters must be escaped. Logical operators and field specific
581
+ # filtering not supported.
582
+ #
583
+ # @yield [response, operation] Access the result along with the RPC operation
584
+ # @yieldparam response [::Gapic::PagedEnumerable<::Google::Area120::Tables::V1alpha1::Row>]
585
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
586
+ #
587
+ # @return [::Gapic::PagedEnumerable<::Google::Area120::Tables::V1alpha1::Row>]
588
+ #
589
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
590
+ #
591
+ def list_rows request, options = nil
592
+ raise ::ArgumentError, "request must be provided" if request.nil?
593
+
594
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Area120::Tables::V1alpha1::ListRowsRequest
595
+
596
+ # Converts hash and nil to an options object
597
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
598
+
599
+ # Customize the options with defaults
600
+ metadata = @config.rpcs.list_rows.metadata.to_h
601
+
602
+ # Set x-goog-api-client and x-goog-user-project headers
603
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
604
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
605
+ gapic_version: ::Google::Area120::Tables::V1alpha1::VERSION
606
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
607
+
608
+ header_params = {
609
+ "parent" => request.parent
610
+ }
611
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
612
+ metadata[:"x-goog-request-params"] ||= request_params_header
613
+
614
+ options.apply_defaults timeout: @config.rpcs.list_rows.timeout,
615
+ metadata: metadata,
616
+ retry_policy: @config.rpcs.list_rows.retry_policy
617
+ options.apply_defaults metadata: @config.metadata,
618
+ retry_policy: @config.retry_policy
619
+
620
+ @tables_service_stub.call_rpc :list_rows, request, options: options do |response, operation|
621
+ response = ::Gapic::PagedEnumerable.new @tables_service_stub, :list_rows, request, response, operation, options
622
+ yield response, operation if block_given?
623
+ return response
624
+ end
625
+ rescue ::GRPC::BadStatus => e
626
+ raise ::Google::Cloud::Error.from_error(e)
627
+ end
628
+
629
+ ##
630
+ # Creates a row.
631
+ #
632
+ # @overload create_row(request, options = nil)
633
+ # Pass arguments to `create_row` via a request object, either of type
634
+ # {::Google::Area120::Tables::V1alpha1::CreateRowRequest} or an equivalent Hash.
635
+ #
636
+ # @param request [::Google::Area120::Tables::V1alpha1::CreateRowRequest, ::Hash]
637
+ # A request object representing the call parameters. Required. To specify no
638
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
639
+ # @param options [::Gapic::CallOptions, ::Hash]
640
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
641
+ #
642
+ # @overload create_row(parent: nil, row: nil, view: nil)
643
+ # Pass arguments to `create_row` via keyword arguments. Note that at
644
+ # least one keyword argument is required. To specify no parameters, or to keep all
645
+ # the default parameter values, pass an empty Hash as a request object (see above).
646
+ #
647
+ # @param parent [::String]
648
+ # Required. The parent table where this row will be created.
649
+ # Format: tables/\\{table}
650
+ # @param row [::Google::Area120::Tables::V1alpha1::Row, ::Hash]
651
+ # Required. The row to create.
652
+ # @param view [::Google::Area120::Tables::V1alpha1::View]
653
+ # Optional. Column key to use for values in the row.
654
+ # Defaults to user entered name.
655
+ #
656
+ # @yield [response, operation] Access the result along with the RPC operation
657
+ # @yieldparam response [::Google::Area120::Tables::V1alpha1::Row]
658
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
659
+ #
660
+ # @return [::Google::Area120::Tables::V1alpha1::Row]
661
+ #
662
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
663
+ #
664
+ def create_row request, options = nil
665
+ raise ::ArgumentError, "request must be provided" if request.nil?
666
+
667
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Area120::Tables::V1alpha1::CreateRowRequest
668
+
669
+ # Converts hash and nil to an options object
670
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
671
+
672
+ # Customize the options with defaults
673
+ metadata = @config.rpcs.create_row.metadata.to_h
674
+
675
+ # Set x-goog-api-client and x-goog-user-project headers
676
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
677
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
678
+ gapic_version: ::Google::Area120::Tables::V1alpha1::VERSION
679
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
680
+
681
+ header_params = {
682
+ "parent" => request.parent
683
+ }
684
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
685
+ metadata[:"x-goog-request-params"] ||= request_params_header
686
+
687
+ options.apply_defaults timeout: @config.rpcs.create_row.timeout,
688
+ metadata: metadata,
689
+ retry_policy: @config.rpcs.create_row.retry_policy
690
+ options.apply_defaults metadata: @config.metadata,
691
+ retry_policy: @config.retry_policy
692
+
693
+ @tables_service_stub.call_rpc :create_row, request, options: options do |response, operation|
694
+ yield response, operation if block_given?
695
+ return response
696
+ end
697
+ rescue ::GRPC::BadStatus => e
698
+ raise ::Google::Cloud::Error.from_error(e)
699
+ end
700
+
701
+ ##
702
+ # Creates multiple rows.
703
+ #
704
+ # @overload batch_create_rows(request, options = nil)
705
+ # Pass arguments to `batch_create_rows` via a request object, either of type
706
+ # {::Google::Area120::Tables::V1alpha1::BatchCreateRowsRequest} or an equivalent Hash.
707
+ #
708
+ # @param request [::Google::Area120::Tables::V1alpha1::BatchCreateRowsRequest, ::Hash]
709
+ # A request object representing the call parameters. Required. To specify no
710
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
711
+ # @param options [::Gapic::CallOptions, ::Hash]
712
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
713
+ #
714
+ # @overload batch_create_rows(parent: nil, requests: nil)
715
+ # Pass arguments to `batch_create_rows` via keyword arguments. Note that at
716
+ # least one keyword argument is required. To specify no parameters, or to keep all
717
+ # the default parameter values, pass an empty Hash as a request object (see above).
718
+ #
719
+ # @param parent [::String]
720
+ # Required. The parent table where the rows will be created.
721
+ # Format: tables/\\{table}
722
+ # @param requests [::Array<::Google::Area120::Tables::V1alpha1::CreateRowRequest, ::Hash>]
723
+ # Required. The request message specifying the rows to create.
724
+ #
725
+ # A maximum of 500 rows can be created in a single batch.
726
+ #
727
+ # @yield [response, operation] Access the result along with the RPC operation
728
+ # @yieldparam response [::Google::Area120::Tables::V1alpha1::BatchCreateRowsResponse]
729
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
730
+ #
731
+ # @return [::Google::Area120::Tables::V1alpha1::BatchCreateRowsResponse]
732
+ #
733
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
734
+ #
735
+ def batch_create_rows request, options = nil
736
+ raise ::ArgumentError, "request must be provided" if request.nil?
737
+
738
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Area120::Tables::V1alpha1::BatchCreateRowsRequest
739
+
740
+ # Converts hash and nil to an options object
741
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
742
+
743
+ # Customize the options with defaults
744
+ metadata = @config.rpcs.batch_create_rows.metadata.to_h
745
+
746
+ # Set x-goog-api-client and x-goog-user-project headers
747
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
748
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
749
+ gapic_version: ::Google::Area120::Tables::V1alpha1::VERSION
750
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
751
+
752
+ header_params = {
753
+ "parent" => request.parent
754
+ }
755
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
756
+ metadata[:"x-goog-request-params"] ||= request_params_header
757
+
758
+ options.apply_defaults timeout: @config.rpcs.batch_create_rows.timeout,
759
+ metadata: metadata,
760
+ retry_policy: @config.rpcs.batch_create_rows.retry_policy
761
+ options.apply_defaults metadata: @config.metadata,
762
+ retry_policy: @config.retry_policy
763
+
764
+ @tables_service_stub.call_rpc :batch_create_rows, request, options: options do |response, operation|
765
+ yield response, operation if block_given?
766
+ return response
767
+ end
768
+ rescue ::GRPC::BadStatus => e
769
+ raise ::Google::Cloud::Error.from_error(e)
770
+ end
771
+
772
+ ##
773
+ # Updates a row.
774
+ #
775
+ # @overload update_row(request, options = nil)
776
+ # Pass arguments to `update_row` via a request object, either of type
777
+ # {::Google::Area120::Tables::V1alpha1::UpdateRowRequest} or an equivalent Hash.
778
+ #
779
+ # @param request [::Google::Area120::Tables::V1alpha1::UpdateRowRequest, ::Hash]
780
+ # A request object representing the call parameters. Required. To specify no
781
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
782
+ # @param options [::Gapic::CallOptions, ::Hash]
783
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
784
+ #
785
+ # @overload update_row(row: nil, update_mask: nil, view: nil)
786
+ # Pass arguments to `update_row` via keyword arguments. Note that at
787
+ # least one keyword argument is required. To specify no parameters, or to keep all
788
+ # the default parameter values, pass an empty Hash as a request object (see above).
789
+ #
790
+ # @param row [::Google::Area120::Tables::V1alpha1::Row, ::Hash]
791
+ # Required. The row to update.
792
+ # @param update_mask [::Google::Protobuf::FieldMask, ::Hash]
793
+ # The list of fields to update.
794
+ # @param view [::Google::Area120::Tables::V1alpha1::View]
795
+ # Optional. Column key to use for values in the row.
796
+ # Defaults to user entered name.
797
+ #
798
+ # @yield [response, operation] Access the result along with the RPC operation
799
+ # @yieldparam response [::Google::Area120::Tables::V1alpha1::Row]
800
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
801
+ #
802
+ # @return [::Google::Area120::Tables::V1alpha1::Row]
803
+ #
804
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
805
+ #
806
+ def update_row request, options = nil
807
+ raise ::ArgumentError, "request must be provided" if request.nil?
808
+
809
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Area120::Tables::V1alpha1::UpdateRowRequest
810
+
811
+ # Converts hash and nil to an options object
812
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
813
+
814
+ # Customize the options with defaults
815
+ metadata = @config.rpcs.update_row.metadata.to_h
816
+
817
+ # Set x-goog-api-client and x-goog-user-project headers
818
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
819
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
820
+ gapic_version: ::Google::Area120::Tables::V1alpha1::VERSION
821
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
822
+
823
+ header_params = {
824
+ "row.name" => request.row.name
825
+ }
826
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
827
+ metadata[:"x-goog-request-params"] ||= request_params_header
828
+
829
+ options.apply_defaults timeout: @config.rpcs.update_row.timeout,
830
+ metadata: metadata,
831
+ retry_policy: @config.rpcs.update_row.retry_policy
832
+ options.apply_defaults metadata: @config.metadata,
833
+ retry_policy: @config.retry_policy
834
+
835
+ @tables_service_stub.call_rpc :update_row, request, options: options do |response, operation|
836
+ yield response, operation if block_given?
837
+ return response
838
+ end
839
+ rescue ::GRPC::BadStatus => e
840
+ raise ::Google::Cloud::Error.from_error(e)
841
+ end
842
+
843
+ ##
844
+ # Updates multiple rows.
845
+ #
846
+ # @overload batch_update_rows(request, options = nil)
847
+ # Pass arguments to `batch_update_rows` via a request object, either of type
848
+ # {::Google::Area120::Tables::V1alpha1::BatchUpdateRowsRequest} or an equivalent Hash.
849
+ #
850
+ # @param request [::Google::Area120::Tables::V1alpha1::BatchUpdateRowsRequest, ::Hash]
851
+ # A request object representing the call parameters. Required. To specify no
852
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
853
+ # @param options [::Gapic::CallOptions, ::Hash]
854
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
855
+ #
856
+ # @overload batch_update_rows(parent: nil, requests: nil)
857
+ # Pass arguments to `batch_update_rows` via keyword arguments. Note that at
858
+ # least one keyword argument is required. To specify no parameters, or to keep all
859
+ # the default parameter values, pass an empty Hash as a request object (see above).
860
+ #
861
+ # @param parent [::String]
862
+ # Required. The parent table shared by all rows being updated.
863
+ # Format: tables/\\{table}
864
+ # @param requests [::Array<::Google::Area120::Tables::V1alpha1::UpdateRowRequest, ::Hash>]
865
+ # Required. The request messages specifying the rows to update.
866
+ #
867
+ # A maximum of 500 rows can be modified in a single batch.
868
+ #
869
+ # @yield [response, operation] Access the result along with the RPC operation
870
+ # @yieldparam response [::Google::Area120::Tables::V1alpha1::BatchUpdateRowsResponse]
871
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
872
+ #
873
+ # @return [::Google::Area120::Tables::V1alpha1::BatchUpdateRowsResponse]
874
+ #
875
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
876
+ #
877
+ def batch_update_rows request, options = nil
878
+ raise ::ArgumentError, "request must be provided" if request.nil?
879
+
880
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Area120::Tables::V1alpha1::BatchUpdateRowsRequest
881
+
882
+ # Converts hash and nil to an options object
883
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
884
+
885
+ # Customize the options with defaults
886
+ metadata = @config.rpcs.batch_update_rows.metadata.to_h
887
+
888
+ # Set x-goog-api-client and x-goog-user-project headers
889
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
890
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
891
+ gapic_version: ::Google::Area120::Tables::V1alpha1::VERSION
892
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
893
+
894
+ header_params = {
895
+ "parent" => request.parent
896
+ }
897
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
898
+ metadata[:"x-goog-request-params"] ||= request_params_header
899
+
900
+ options.apply_defaults timeout: @config.rpcs.batch_update_rows.timeout,
901
+ metadata: metadata,
902
+ retry_policy: @config.rpcs.batch_update_rows.retry_policy
903
+ options.apply_defaults metadata: @config.metadata,
904
+ retry_policy: @config.retry_policy
905
+
906
+ @tables_service_stub.call_rpc :batch_update_rows, request, options: options do |response, operation|
907
+ yield response, operation if block_given?
908
+ return response
909
+ end
910
+ rescue ::GRPC::BadStatus => e
911
+ raise ::Google::Cloud::Error.from_error(e)
912
+ end
913
+
914
+ ##
915
+ # Deletes a row.
916
+ #
917
+ # @overload delete_row(request, options = nil)
918
+ # Pass arguments to `delete_row` via a request object, either of type
919
+ # {::Google::Area120::Tables::V1alpha1::DeleteRowRequest} or an equivalent Hash.
920
+ #
921
+ # @param request [::Google::Area120::Tables::V1alpha1::DeleteRowRequest, ::Hash]
922
+ # A request object representing the call parameters. Required. To specify no
923
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
924
+ # @param options [::Gapic::CallOptions, ::Hash]
925
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
926
+ #
927
+ # @overload delete_row(name: nil)
928
+ # Pass arguments to `delete_row` via keyword arguments. Note that at
929
+ # least one keyword argument is required. To specify no parameters, or to keep all
930
+ # the default parameter values, pass an empty Hash as a request object (see above).
931
+ #
932
+ # @param name [::String]
933
+ # Required. The name of the row to delete.
934
+ # Format: tables/\\{table}/rows/\\{row}
935
+ #
936
+ # @yield [response, operation] Access the result along with the RPC operation
937
+ # @yieldparam response [::Google::Protobuf::Empty]
938
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
939
+ #
940
+ # @return [::Google::Protobuf::Empty]
941
+ #
942
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
943
+ #
944
+ def delete_row request, options = nil
945
+ raise ::ArgumentError, "request must be provided" if request.nil?
946
+
947
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Area120::Tables::V1alpha1::DeleteRowRequest
948
+
949
+ # Converts hash and nil to an options object
950
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
951
+
952
+ # Customize the options with defaults
953
+ metadata = @config.rpcs.delete_row.metadata.to_h
954
+
955
+ # Set x-goog-api-client and x-goog-user-project headers
956
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
957
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
958
+ gapic_version: ::Google::Area120::Tables::V1alpha1::VERSION
959
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
960
+
961
+ header_params = {
962
+ "name" => request.name
963
+ }
964
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
965
+ metadata[:"x-goog-request-params"] ||= request_params_header
966
+
967
+ options.apply_defaults timeout: @config.rpcs.delete_row.timeout,
968
+ metadata: metadata,
969
+ retry_policy: @config.rpcs.delete_row.retry_policy
970
+ options.apply_defaults metadata: @config.metadata,
971
+ retry_policy: @config.retry_policy
972
+
973
+ @tables_service_stub.call_rpc :delete_row, request, options: options do |response, operation|
974
+ yield response, operation if block_given?
975
+ return response
976
+ end
977
+ rescue ::GRPC::BadStatus => e
978
+ raise ::Google::Cloud::Error.from_error(e)
979
+ end
980
+
981
+ ##
982
+ # Deletes multiple rows.
983
+ #
984
+ # @overload batch_delete_rows(request, options = nil)
985
+ # Pass arguments to `batch_delete_rows` via a request object, either of type
986
+ # {::Google::Area120::Tables::V1alpha1::BatchDeleteRowsRequest} or an equivalent Hash.
987
+ #
988
+ # @param request [::Google::Area120::Tables::V1alpha1::BatchDeleteRowsRequest, ::Hash]
989
+ # A request object representing the call parameters. Required. To specify no
990
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
991
+ # @param options [::Gapic::CallOptions, ::Hash]
992
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
993
+ #
994
+ # @overload batch_delete_rows(parent: nil, names: nil)
995
+ # Pass arguments to `batch_delete_rows` via keyword arguments. Note that at
996
+ # least one keyword argument is required. To specify no parameters, or to keep all
997
+ # the default parameter values, pass an empty Hash as a request object (see above).
998
+ #
999
+ # @param parent [::String]
1000
+ # Required. The parent table shared by all rows being deleted.
1001
+ # Format: tables/\\{table}
1002
+ # @param names [::Array<::String>]
1003
+ # Required. The names of the rows to delete. All rows must belong to the parent table
1004
+ # or else the entire batch will fail. A maximum of 500 rows can be deleted
1005
+ # in a batch.
1006
+ # Format: tables/\\{table}/rows/\\{row}
1007
+ #
1008
+ # @yield [response, operation] Access the result along with the RPC operation
1009
+ # @yieldparam response [::Google::Protobuf::Empty]
1010
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
1011
+ #
1012
+ # @return [::Google::Protobuf::Empty]
1013
+ #
1014
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
1015
+ #
1016
+ def batch_delete_rows request, options = nil
1017
+ raise ::ArgumentError, "request must be provided" if request.nil?
1018
+
1019
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Area120::Tables::V1alpha1::BatchDeleteRowsRequest
1020
+
1021
+ # Converts hash and nil to an options object
1022
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1023
+
1024
+ # Customize the options with defaults
1025
+ metadata = @config.rpcs.batch_delete_rows.metadata.to_h
1026
+
1027
+ # Set x-goog-api-client and x-goog-user-project headers
1028
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1029
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
1030
+ gapic_version: ::Google::Area120::Tables::V1alpha1::VERSION
1031
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1032
+
1033
+ header_params = {
1034
+ "parent" => request.parent
1035
+ }
1036
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
1037
+ metadata[:"x-goog-request-params"] ||= request_params_header
1038
+
1039
+ options.apply_defaults timeout: @config.rpcs.batch_delete_rows.timeout,
1040
+ metadata: metadata,
1041
+ retry_policy: @config.rpcs.batch_delete_rows.retry_policy
1042
+ options.apply_defaults metadata: @config.metadata,
1043
+ retry_policy: @config.retry_policy
1044
+
1045
+ @tables_service_stub.call_rpc :batch_delete_rows, request, options: options do |response, operation|
1046
+ yield response, operation if block_given?
1047
+ return response
1048
+ end
1049
+ rescue ::GRPC::BadStatus => e
1050
+ raise ::Google::Cloud::Error.from_error(e)
1051
+ end
1052
+
1053
+ ##
1054
+ # Configuration class for the TablesService API.
1055
+ #
1056
+ # This class represents the configuration for TablesService,
1057
+ # providing control over timeouts, retry behavior, logging, transport
1058
+ # parameters, and other low-level controls. Certain parameters can also be
1059
+ # applied individually to specific RPCs. See
1060
+ # {::Google::Area120::Tables::V1alpha1::TablesService::Client::Configuration::Rpcs}
1061
+ # for a list of RPCs that can be configured independently.
1062
+ #
1063
+ # Configuration can be applied globally to all clients, or to a single client
1064
+ # on construction.
1065
+ #
1066
+ # # Examples
1067
+ #
1068
+ # To modify the global config, setting the timeout for get_table
1069
+ # to 20 seconds, and all remaining timeouts to 10 seconds:
1070
+ #
1071
+ # ::Google::Area120::Tables::V1alpha1::TablesService::Client.configure do |config|
1072
+ # config.timeout = 10.0
1073
+ # config.rpcs.get_table.timeout = 20.0
1074
+ # end
1075
+ #
1076
+ # To apply the above configuration only to a new client:
1077
+ #
1078
+ # client = ::Google::Area120::Tables::V1alpha1::TablesService::Client.new do |config|
1079
+ # config.timeout = 10.0
1080
+ # config.rpcs.get_table.timeout = 20.0
1081
+ # end
1082
+ #
1083
+ # @!attribute [rw] endpoint
1084
+ # The hostname or hostname:port of the service endpoint.
1085
+ # Defaults to `"area120tables.googleapis.com"`.
1086
+ # @return [::String]
1087
+ # @!attribute [rw] credentials
1088
+ # Credentials to send with calls. You may provide any of the following types:
1089
+ # * (`String`) The path to a service account key file in JSON format
1090
+ # * (`Hash`) A service account key as a Hash
1091
+ # * (`Google::Auth::Credentials`) A googleauth credentials object
1092
+ # (see the [googleauth docs](https://googleapis.dev/ruby/googleauth/latest/index.html))
1093
+ # * (`Signet::OAuth2::Client`) A signet oauth2 client object
1094
+ # (see the [signet docs](https://googleapis.dev/ruby/signet/latest/Signet/OAuth2/Client.html))
1095
+ # * (`GRPC::Core::Channel`) a gRPC channel with included credentials
1096
+ # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object
1097
+ # * (`nil`) indicating no credentials
1098
+ # @return [::Object]
1099
+ # @!attribute [rw] scope
1100
+ # The OAuth scopes
1101
+ # @return [::Array<::String>]
1102
+ # @!attribute [rw] lib_name
1103
+ # The library name as recorded in instrumentation and logging
1104
+ # @return [::String]
1105
+ # @!attribute [rw] lib_version
1106
+ # The library version as recorded in instrumentation and logging
1107
+ # @return [::String]
1108
+ # @!attribute [rw] channel_args
1109
+ # Extra parameters passed to the gRPC channel. Note: this is ignored if a
1110
+ # `GRPC::Core::Channel` object is provided as the credential.
1111
+ # @return [::Hash]
1112
+ # @!attribute [rw] interceptors
1113
+ # An array of interceptors that are run before calls are executed.
1114
+ # @return [::Array<::GRPC::ClientInterceptor>]
1115
+ # @!attribute [rw] timeout
1116
+ # The call timeout in seconds.
1117
+ # @return [::Numeric]
1118
+ # @!attribute [rw] metadata
1119
+ # Additional gRPC headers to be sent with the call.
1120
+ # @return [::Hash{::Symbol=>::String}]
1121
+ # @!attribute [rw] retry_policy
1122
+ # The retry policy. The value is a hash with the following keys:
1123
+ # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds.
1124
+ # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds.
1125
+ # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier.
1126
+ # * `:retry_codes` (*type:* `Array<String>`) - The error codes that should
1127
+ # trigger a retry.
1128
+ # @return [::Hash]
1129
+ # @!attribute [rw] quota_project
1130
+ # A separate project against which to charge quota.
1131
+ # @return [::String]
1132
+ #
1133
+ class Configuration
1134
+ extend ::Gapic::Config
1135
+
1136
+ config_attr :endpoint, "area120tables.googleapis.com", ::String
1137
+ config_attr :credentials, nil do |value|
1138
+ allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Signet::OAuth2::Client, nil]
1139
+ allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC
1140
+ allowed.any? { |klass| klass === value }
1141
+ end
1142
+ config_attr :scope, nil, ::String, ::Array, nil
1143
+ config_attr :lib_name, nil, ::String, nil
1144
+ config_attr :lib_version, nil, ::String, nil
1145
+ config_attr(:channel_args, { "grpc.service_config_disable_resolution"=>1 }, ::Hash, nil)
1146
+ config_attr :interceptors, nil, ::Array, nil
1147
+ config_attr :timeout, nil, ::Numeric, nil
1148
+ config_attr :metadata, nil, ::Hash, nil
1149
+ config_attr :retry_policy, nil, ::Hash, ::Proc, nil
1150
+ config_attr :quota_project, nil, ::String, nil
1151
+
1152
+ # @private
1153
+ def initialize parent_config = nil
1154
+ @parent_config = parent_config unless parent_config.nil?
1155
+
1156
+ yield self if block_given?
1157
+ end
1158
+
1159
+ ##
1160
+ # Configurations for individual RPCs
1161
+ # @return [Rpcs]
1162
+ #
1163
+ def rpcs
1164
+ @rpcs ||= begin
1165
+ parent_rpcs = nil
1166
+ parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config&.respond_to?(:rpcs)
1167
+ Rpcs.new parent_rpcs
1168
+ end
1169
+ end
1170
+
1171
+ ##
1172
+ # Configuration RPC class for the TablesService API.
1173
+ #
1174
+ # Includes fields providing the configuration for each RPC in this service.
1175
+ # Each configuration object is of type `Gapic::Config::Method` and includes
1176
+ # the following configuration fields:
1177
+ #
1178
+ # * `timeout` (*type:* `Numeric`) - The call timeout in seconds
1179
+ # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers
1180
+ # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields
1181
+ # include the following keys:
1182
+ # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds.
1183
+ # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds.
1184
+ # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier.
1185
+ # * `:retry_codes` (*type:* `Array<String>`) - The error codes that should
1186
+ # trigger a retry.
1187
+ #
1188
+ class Rpcs
1189
+ ##
1190
+ # RPC-specific configuration for `get_table`
1191
+ # @return [::Gapic::Config::Method]
1192
+ #
1193
+ attr_reader :get_table
1194
+ ##
1195
+ # RPC-specific configuration for `list_tables`
1196
+ # @return [::Gapic::Config::Method]
1197
+ #
1198
+ attr_reader :list_tables
1199
+ ##
1200
+ # RPC-specific configuration for `get_workspace`
1201
+ # @return [::Gapic::Config::Method]
1202
+ #
1203
+ attr_reader :get_workspace
1204
+ ##
1205
+ # RPC-specific configuration for `list_workspaces`
1206
+ # @return [::Gapic::Config::Method]
1207
+ #
1208
+ attr_reader :list_workspaces
1209
+ ##
1210
+ # RPC-specific configuration for `get_row`
1211
+ # @return [::Gapic::Config::Method]
1212
+ #
1213
+ attr_reader :get_row
1214
+ ##
1215
+ # RPC-specific configuration for `list_rows`
1216
+ # @return [::Gapic::Config::Method]
1217
+ #
1218
+ attr_reader :list_rows
1219
+ ##
1220
+ # RPC-specific configuration for `create_row`
1221
+ # @return [::Gapic::Config::Method]
1222
+ #
1223
+ attr_reader :create_row
1224
+ ##
1225
+ # RPC-specific configuration for `batch_create_rows`
1226
+ # @return [::Gapic::Config::Method]
1227
+ #
1228
+ attr_reader :batch_create_rows
1229
+ ##
1230
+ # RPC-specific configuration for `update_row`
1231
+ # @return [::Gapic::Config::Method]
1232
+ #
1233
+ attr_reader :update_row
1234
+ ##
1235
+ # RPC-specific configuration for `batch_update_rows`
1236
+ # @return [::Gapic::Config::Method]
1237
+ #
1238
+ attr_reader :batch_update_rows
1239
+ ##
1240
+ # RPC-specific configuration for `delete_row`
1241
+ # @return [::Gapic::Config::Method]
1242
+ #
1243
+ attr_reader :delete_row
1244
+ ##
1245
+ # RPC-specific configuration for `batch_delete_rows`
1246
+ # @return [::Gapic::Config::Method]
1247
+ #
1248
+ attr_reader :batch_delete_rows
1249
+
1250
+ # @private
1251
+ def initialize parent_rpcs = nil
1252
+ get_table_config = parent_rpcs&.get_table if parent_rpcs&.respond_to? :get_table
1253
+ @get_table = ::Gapic::Config::Method.new get_table_config
1254
+ list_tables_config = parent_rpcs&.list_tables if parent_rpcs&.respond_to? :list_tables
1255
+ @list_tables = ::Gapic::Config::Method.new list_tables_config
1256
+ get_workspace_config = parent_rpcs&.get_workspace if parent_rpcs&.respond_to? :get_workspace
1257
+ @get_workspace = ::Gapic::Config::Method.new get_workspace_config
1258
+ list_workspaces_config = parent_rpcs&.list_workspaces if parent_rpcs&.respond_to? :list_workspaces
1259
+ @list_workspaces = ::Gapic::Config::Method.new list_workspaces_config
1260
+ get_row_config = parent_rpcs&.get_row if parent_rpcs&.respond_to? :get_row
1261
+ @get_row = ::Gapic::Config::Method.new get_row_config
1262
+ list_rows_config = parent_rpcs&.list_rows if parent_rpcs&.respond_to? :list_rows
1263
+ @list_rows = ::Gapic::Config::Method.new list_rows_config
1264
+ create_row_config = parent_rpcs&.create_row if parent_rpcs&.respond_to? :create_row
1265
+ @create_row = ::Gapic::Config::Method.new create_row_config
1266
+ batch_create_rows_config = parent_rpcs&.batch_create_rows if parent_rpcs&.respond_to? :batch_create_rows
1267
+ @batch_create_rows = ::Gapic::Config::Method.new batch_create_rows_config
1268
+ update_row_config = parent_rpcs&.update_row if parent_rpcs&.respond_to? :update_row
1269
+ @update_row = ::Gapic::Config::Method.new update_row_config
1270
+ batch_update_rows_config = parent_rpcs&.batch_update_rows if parent_rpcs&.respond_to? :batch_update_rows
1271
+ @batch_update_rows = ::Gapic::Config::Method.new batch_update_rows_config
1272
+ delete_row_config = parent_rpcs&.delete_row if parent_rpcs&.respond_to? :delete_row
1273
+ @delete_row = ::Gapic::Config::Method.new delete_row_config
1274
+ batch_delete_rows_config = parent_rpcs&.batch_delete_rows if parent_rpcs&.respond_to? :batch_delete_rows
1275
+ @batch_delete_rows = ::Gapic::Config::Method.new batch_delete_rows_config
1276
+
1277
+ yield self if block_given?
1278
+ end
1279
+ end
1280
+ end
1281
+ end
1282
+ end
1283
+ end
1284
+ end
1285
+ end
1286
+ end