google-shopping-merchant-data_sources-v1 0.a → 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 +4 -4
  2. data/.yardopts +12 -0
  3. data/AUTHENTICATION.md +122 -0
  4. data/README.md +154 -8
  5. data/lib/google/shopping/merchant/data_sources/v1/data_sources_service/client.rb +967 -0
  6. data/lib/google/shopping/merchant/data_sources/v1/data_sources_service/credentials.rb +49 -0
  7. data/lib/google/shopping/merchant/data_sources/v1/data_sources_service/paths.rb +66 -0
  8. data/lib/google/shopping/merchant/data_sources/v1/data_sources_service/rest/client.rb +899 -0
  9. data/lib/google/shopping/merchant/data_sources/v1/data_sources_service/rest/service_stub.rb +452 -0
  10. data/lib/google/shopping/merchant/data_sources/v1/data_sources_service/rest.rb +56 -0
  11. data/lib/google/shopping/merchant/data_sources/v1/data_sources_service.rb +59 -0
  12. data/lib/google/shopping/merchant/data_sources/v1/file_uploads_service/client.rb +467 -0
  13. data/lib/google/shopping/merchant/data_sources/v1/file_uploads_service/credentials.rb +49 -0
  14. data/lib/google/shopping/merchant/data_sources/v1/file_uploads_service/paths.rb +54 -0
  15. data/lib/google/shopping/merchant/data_sources/v1/file_uploads_service/rest/client.rb +434 -0
  16. data/lib/google/shopping/merchant/data_sources/v1/file_uploads_service/rest/service_stub.rb +144 -0
  17. data/lib/google/shopping/merchant/data_sources/v1/file_uploads_service/rest.rb +54 -0
  18. data/lib/google/shopping/merchant/data_sources/v1/file_uploads_service.rb +57 -0
  19. data/lib/google/shopping/merchant/data_sources/v1/rest.rb +40 -0
  20. data/lib/google/shopping/merchant/data_sources/v1/version.rb +7 -2
  21. data/lib/google/shopping/merchant/data_sources/v1.rb +48 -0
  22. data/lib/google/shopping/merchant/datasources/v1/datasources_pb.rb +64 -0
  23. data/lib/google/shopping/merchant/datasources/v1/datasources_services_pb.rb +65 -0
  24. data/lib/google/shopping/merchant/datasources/v1/datasourcetypes_pb.rb +57 -0
  25. data/lib/google/shopping/merchant/datasources/v1/fileinputs_pb.rb +52 -0
  26. data/lib/google/shopping/merchant/datasources/v1/fileuploads_pb.rb +55 -0
  27. data/lib/google/shopping/merchant/datasources/v1/fileuploads_services_pb.rb +48 -0
  28. data/lib/google-shopping-merchant-data_sources-v1.rb +21 -0
  29. data/proto_docs/README.md +4 -0
  30. data/proto_docs/google/api/client.rb +473 -0
  31. data/proto_docs/google/api/field_behavior.rb +85 -0
  32. data/proto_docs/google/api/launch_stage.rb +71 -0
  33. data/proto_docs/google/api/resource.rb +227 -0
  34. data/proto_docs/google/protobuf/duration.rb +98 -0
  35. data/proto_docs/google/protobuf/empty.rb +34 -0
  36. data/proto_docs/google/protobuf/field_mask.rb +229 -0
  37. data/proto_docs/google/protobuf/timestamp.rb +127 -0
  38. data/proto_docs/google/shopping/merchant/datasources/v1/datasources.rb +231 -0
  39. data/proto_docs/google/shopping/merchant/datasources/v1/datasourcetypes.rb +298 -0
  40. data/proto_docs/google/shopping/merchant/datasources/v1/fileinputs.rb +145 -0
  41. data/proto_docs/google/shopping/merchant/datasources/v1/fileuploads.rb +131 -0
  42. data/proto_docs/google/shopping/type/types.rb +210 -0
  43. data/proto_docs/google/type/dayofweek.rb +49 -0
  44. data/proto_docs/google/type/timeofday.rb +45 -0
  45. metadata +103 -9
@@ -0,0 +1,967 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Copyright 2025 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/shopping/merchant/datasources/v1/datasources_pb"
21
+
22
+ module Google
23
+ module Shopping
24
+ module Merchant
25
+ module DataSources
26
+ module V1
27
+ module DataSourcesService
28
+ ##
29
+ # Client for the DataSourcesService service.
30
+ #
31
+ # Service to manage primary, supplemental, inventory and other data sources.
32
+ # See more in the [Merchant
33
+ # Center](https://support.google.com/merchants/answer/7439058) help article.
34
+ #
35
+ class Client
36
+ # @private
37
+ API_VERSION = ""
38
+
39
+ # @private
40
+ DEFAULT_ENDPOINT_TEMPLATE = "merchantapi.$UNIVERSE_DOMAIN$"
41
+
42
+ include Paths
43
+
44
+ # @private
45
+ attr_reader :data_sources_service_stub
46
+
47
+ ##
48
+ # Configure the DataSourcesService Client class.
49
+ #
50
+ # See {::Google::Shopping::Merchant::DataSources::V1::DataSourcesService::Client::Configuration}
51
+ # for a description of the configuration fields.
52
+ #
53
+ # @example
54
+ #
55
+ # # Modify the configuration for all DataSourcesService clients
56
+ # ::Google::Shopping::Merchant::DataSources::V1::DataSourcesService::Client.configure do |config|
57
+ # config.timeout = 10.0
58
+ # end
59
+ #
60
+ # @yield [config] Configure the Client client.
61
+ # @yieldparam config [Client::Configuration]
62
+ #
63
+ # @return [Client::Configuration]
64
+ #
65
+ def self.configure
66
+ @configure ||= begin
67
+ namespace = ["Google", "Shopping", "Merchant", "DataSources", "V1"]
68
+ parent_config = while namespace.any?
69
+ parent_name = namespace.join "::"
70
+ parent_const = const_get parent_name
71
+ break parent_const.configure if parent_const.respond_to? :configure
72
+ namespace.pop
73
+ end
74
+ default_config = Client::Configuration.new parent_config
75
+
76
+ default_config.timeout = 60.0
77
+ default_config.retry_policy = {
78
+ initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14]
79
+ }
80
+
81
+ default_config
82
+ end
83
+ yield @configure if block_given?
84
+ @configure
85
+ end
86
+
87
+ ##
88
+ # Configure the DataSourcesService Client instance.
89
+ #
90
+ # The configuration is set to the derived mode, meaning that values can be changed,
91
+ # but structural changes (adding new fields, etc.) are not allowed. Structural changes
92
+ # should be made on {Client.configure}.
93
+ #
94
+ # See {::Google::Shopping::Merchant::DataSources::V1::DataSourcesService::Client::Configuration}
95
+ # for a description of the configuration fields.
96
+ #
97
+ # @yield [config] Configure the Client client.
98
+ # @yieldparam config [Client::Configuration]
99
+ #
100
+ # @return [Client::Configuration]
101
+ #
102
+ def configure
103
+ yield @config if block_given?
104
+ @config
105
+ end
106
+
107
+ ##
108
+ # The effective universe domain
109
+ #
110
+ # @return [String]
111
+ #
112
+ def universe_domain
113
+ @data_sources_service_stub.universe_domain
114
+ end
115
+
116
+ ##
117
+ # Create a new DataSourcesService client object.
118
+ #
119
+ # @example
120
+ #
121
+ # # Create a client using the default configuration
122
+ # client = ::Google::Shopping::Merchant::DataSources::V1::DataSourcesService::Client.new
123
+ #
124
+ # # Create a client using a custom configuration
125
+ # client = ::Google::Shopping::Merchant::DataSources::V1::DataSourcesService::Client.new do |config|
126
+ # config.timeout = 10.0
127
+ # end
128
+ #
129
+ # @yield [config] Configure the DataSourcesService client.
130
+ # @yieldparam config [Client::Configuration]
131
+ #
132
+ def initialize
133
+ # These require statements are intentionally placed here to initialize
134
+ # the gRPC module only when it's required.
135
+ # See https://github.com/googleapis/toolkit/issues/446
136
+ require "gapic/grpc"
137
+ require "google/shopping/merchant/datasources/v1/datasources_services_pb"
138
+
139
+ # Create the configuration object
140
+ @config = Configuration.new Client.configure
141
+
142
+ # Yield the configuration if needed
143
+ yield @config if block_given?
144
+
145
+ # Create credentials
146
+ credentials = @config.credentials
147
+ # Use self-signed JWT if the endpoint is unchanged from default,
148
+ # but only if the default endpoint does not have a region prefix.
149
+ enable_self_signed_jwt = @config.endpoint.nil? ||
150
+ (@config.endpoint == Configuration::DEFAULT_ENDPOINT &&
151
+ !@config.endpoint.split(".").first.include?("-"))
152
+ credentials ||= Credentials.default scope: @config.scope,
153
+ enable_self_signed_jwt: enable_self_signed_jwt
154
+ if credentials.is_a?(::String) || credentials.is_a?(::Hash)
155
+ credentials = Credentials.new credentials, scope: @config.scope
156
+ end
157
+ @quota_project_id = @config.quota_project
158
+ @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id
159
+
160
+ @data_sources_service_stub = ::Gapic::ServiceStub.new(
161
+ ::Google::Shopping::Merchant::DataSources::V1::DataSourcesService::Stub,
162
+ credentials: credentials,
163
+ endpoint: @config.endpoint,
164
+ endpoint_template: DEFAULT_ENDPOINT_TEMPLATE,
165
+ universe_domain: @config.universe_domain,
166
+ channel_args: @config.channel_args,
167
+ interceptors: @config.interceptors,
168
+ channel_pool_config: @config.channel_pool,
169
+ logger: @config.logger
170
+ )
171
+
172
+ @data_sources_service_stub.stub_logger&.info do |entry|
173
+ entry.set_system_name
174
+ entry.set_service
175
+ entry.message = "Created client for #{entry.service}"
176
+ entry.set_credentials_fields credentials
177
+ entry.set "customEndpoint", @config.endpoint if @config.endpoint
178
+ entry.set "defaultTimeout", @config.timeout if @config.timeout
179
+ entry.set "quotaProject", @quota_project_id if @quota_project_id
180
+ end
181
+ end
182
+
183
+ ##
184
+ # The logger used for request/response debug logging.
185
+ #
186
+ # @return [Logger]
187
+ #
188
+ def logger
189
+ @data_sources_service_stub.logger
190
+ end
191
+
192
+ # Service calls
193
+
194
+ ##
195
+ # Retrieves the data source configuration for the given account.
196
+ #
197
+ # @overload get_data_source(request, options = nil)
198
+ # Pass arguments to `get_data_source` via a request object, either of type
199
+ # {::Google::Shopping::Merchant::DataSources::V1::GetDataSourceRequest} or an equivalent Hash.
200
+ #
201
+ # @param request [::Google::Shopping::Merchant::DataSources::V1::GetDataSourceRequest, ::Hash]
202
+ # A request object representing the call parameters. Required. To specify no
203
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
204
+ # @param options [::Gapic::CallOptions, ::Hash]
205
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
206
+ #
207
+ # @overload get_data_source(name: nil)
208
+ # Pass arguments to `get_data_source` via keyword arguments. Note that at
209
+ # least one keyword argument is required. To specify no parameters, or to keep all
210
+ # the default parameter values, pass an empty Hash as a request object (see above).
211
+ #
212
+ # @param name [::String]
213
+ # Required. The name of the data source to retrieve.
214
+ # Format: `accounts/{account}/dataSources/{datasource}`
215
+ #
216
+ # @yield [response, operation] Access the result along with the RPC operation
217
+ # @yieldparam response [::Google::Shopping::Merchant::DataSources::V1::DataSource]
218
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
219
+ #
220
+ # @return [::Google::Shopping::Merchant::DataSources::V1::DataSource]
221
+ #
222
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
223
+ #
224
+ # @example Basic example
225
+ # require "google/shopping/merchant/data_sources/v1"
226
+ #
227
+ # # Create a client object. The client can be reused for multiple calls.
228
+ # client = Google::Shopping::Merchant::DataSources::V1::DataSourcesService::Client.new
229
+ #
230
+ # # Create a request. To set request fields, pass in keyword arguments.
231
+ # request = Google::Shopping::Merchant::DataSources::V1::GetDataSourceRequest.new
232
+ #
233
+ # # Call the get_data_source method.
234
+ # result = client.get_data_source request
235
+ #
236
+ # # The returned object is of type Google::Shopping::Merchant::DataSources::V1::DataSource.
237
+ # p result
238
+ #
239
+ def get_data_source request, options = nil
240
+ raise ::ArgumentError, "request must be provided" if request.nil?
241
+
242
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::DataSources::V1::GetDataSourceRequest
243
+
244
+ # Converts hash and nil to an options object
245
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
246
+
247
+ # Customize the options with defaults
248
+ metadata = @config.rpcs.get_data_source.metadata.to_h
249
+
250
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
251
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
252
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
253
+ gapic_version: ::Google::Shopping::Merchant::DataSources::V1::VERSION
254
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
255
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
256
+
257
+ header_params = {}
258
+ if request.name
259
+ header_params["name"] = request.name
260
+ end
261
+
262
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
263
+ metadata[:"x-goog-request-params"] ||= request_params_header
264
+
265
+ options.apply_defaults timeout: @config.rpcs.get_data_source.timeout,
266
+ metadata: metadata,
267
+ retry_policy: @config.rpcs.get_data_source.retry_policy
268
+
269
+ options.apply_defaults timeout: @config.timeout,
270
+ metadata: @config.metadata,
271
+ retry_policy: @config.retry_policy
272
+
273
+ @data_sources_service_stub.call_rpc :get_data_source, request, options: options do |response, operation|
274
+ yield response, operation if block_given?
275
+ end
276
+ rescue ::GRPC::BadStatus => e
277
+ raise ::Google::Cloud::Error.from_error(e)
278
+ end
279
+
280
+ ##
281
+ # Lists the configurations for data sources for the given account.
282
+ #
283
+ # @overload list_data_sources(request, options = nil)
284
+ # Pass arguments to `list_data_sources` via a request object, either of type
285
+ # {::Google::Shopping::Merchant::DataSources::V1::ListDataSourcesRequest} or an equivalent Hash.
286
+ #
287
+ # @param request [::Google::Shopping::Merchant::DataSources::V1::ListDataSourcesRequest, ::Hash]
288
+ # A request object representing the call parameters. Required. To specify no
289
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
290
+ # @param options [::Gapic::CallOptions, ::Hash]
291
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
292
+ #
293
+ # @overload list_data_sources(parent: nil, page_size: nil, page_token: nil)
294
+ # Pass arguments to `list_data_sources` via keyword arguments. Note that at
295
+ # least one keyword argument is required. To specify no parameters, or to keep all
296
+ # the default parameter values, pass an empty Hash as a request object (see above).
297
+ #
298
+ # @param parent [::String]
299
+ # Required. The account to list data sources for.
300
+ # Format: `accounts/{account}`
301
+ # @param page_size [::Integer]
302
+ # Optional. The maximum number of data sources to return. The service may
303
+ # return fewer than this value. The maximum value is 1000; values above 1000
304
+ # will be coerced to 1000. If unspecified, the maximum number of data sources
305
+ # will be returned.
306
+ # @param page_token [::String]
307
+ # Optional. A page token, received from a previous `ListDataSources` call.
308
+ # Provide this to retrieve the subsequent page.
309
+ #
310
+ # When paginating, all other parameters provided to `ListDataSources`
311
+ # must match the call that provided the page token.
312
+ #
313
+ # @yield [response, operation] Access the result along with the RPC operation
314
+ # @yieldparam response [::Gapic::PagedEnumerable<::Google::Shopping::Merchant::DataSources::V1::DataSource>]
315
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
316
+ #
317
+ # @return [::Gapic::PagedEnumerable<::Google::Shopping::Merchant::DataSources::V1::DataSource>]
318
+ #
319
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
320
+ #
321
+ # @example Basic example
322
+ # require "google/shopping/merchant/data_sources/v1"
323
+ #
324
+ # # Create a client object. The client can be reused for multiple calls.
325
+ # client = Google::Shopping::Merchant::DataSources::V1::DataSourcesService::Client.new
326
+ #
327
+ # # Create a request. To set request fields, pass in keyword arguments.
328
+ # request = Google::Shopping::Merchant::DataSources::V1::ListDataSourcesRequest.new
329
+ #
330
+ # # Call the list_data_sources method.
331
+ # result = client.list_data_sources request
332
+ #
333
+ # # The returned object is of type Gapic::PagedEnumerable. You can iterate
334
+ # # over elements, and API calls will be issued to fetch pages as needed.
335
+ # result.each do |item|
336
+ # # Each element is of type ::Google::Shopping::Merchant::DataSources::V1::DataSource.
337
+ # p item
338
+ # end
339
+ #
340
+ def list_data_sources request, options = nil
341
+ raise ::ArgumentError, "request must be provided" if request.nil?
342
+
343
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::DataSources::V1::ListDataSourcesRequest
344
+
345
+ # Converts hash and nil to an options object
346
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
347
+
348
+ # Customize the options with defaults
349
+ metadata = @config.rpcs.list_data_sources.metadata.to_h
350
+
351
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
352
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
353
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
354
+ gapic_version: ::Google::Shopping::Merchant::DataSources::V1::VERSION
355
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
356
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
357
+
358
+ header_params = {}
359
+ if request.parent
360
+ header_params["parent"] = request.parent
361
+ end
362
+
363
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
364
+ metadata[:"x-goog-request-params"] ||= request_params_header
365
+
366
+ options.apply_defaults timeout: @config.rpcs.list_data_sources.timeout,
367
+ metadata: metadata,
368
+ retry_policy: @config.rpcs.list_data_sources.retry_policy
369
+
370
+ options.apply_defaults timeout: @config.timeout,
371
+ metadata: @config.metadata,
372
+ retry_policy: @config.retry_policy
373
+
374
+ @data_sources_service_stub.call_rpc :list_data_sources, request, options: options do |response, operation|
375
+ response = ::Gapic::PagedEnumerable.new @data_sources_service_stub, :list_data_sources, request, response, operation, options
376
+ yield response, operation if block_given?
377
+ throw :response, response
378
+ end
379
+ rescue ::GRPC::BadStatus => e
380
+ raise ::Google::Cloud::Error.from_error(e)
381
+ end
382
+
383
+ ##
384
+ # Creates the new data source configuration for the given account.
385
+ # This method always creates a new data source.
386
+ #
387
+ # @overload create_data_source(request, options = nil)
388
+ # Pass arguments to `create_data_source` via a request object, either of type
389
+ # {::Google::Shopping::Merchant::DataSources::V1::CreateDataSourceRequest} or an equivalent Hash.
390
+ #
391
+ # @param request [::Google::Shopping::Merchant::DataSources::V1::CreateDataSourceRequest, ::Hash]
392
+ # A request object representing the call parameters. Required. To specify no
393
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
394
+ # @param options [::Gapic::CallOptions, ::Hash]
395
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
396
+ #
397
+ # @overload create_data_source(parent: nil, data_source: nil)
398
+ # Pass arguments to `create_data_source` via keyword arguments. Note that at
399
+ # least one keyword argument is required. To specify no parameters, or to keep all
400
+ # the default parameter values, pass an empty Hash as a request object (see above).
401
+ #
402
+ # @param parent [::String]
403
+ # Required. The account where this data source will be created.
404
+ # Format: `accounts/{account}`
405
+ # @param data_source [::Google::Shopping::Merchant::DataSources::V1::DataSource, ::Hash]
406
+ # Required. The data source to create.
407
+ #
408
+ # @yield [response, operation] Access the result along with the RPC operation
409
+ # @yieldparam response [::Google::Shopping::Merchant::DataSources::V1::DataSource]
410
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
411
+ #
412
+ # @return [::Google::Shopping::Merchant::DataSources::V1::DataSource]
413
+ #
414
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
415
+ #
416
+ # @example Basic example
417
+ # require "google/shopping/merchant/data_sources/v1"
418
+ #
419
+ # # Create a client object. The client can be reused for multiple calls.
420
+ # client = Google::Shopping::Merchant::DataSources::V1::DataSourcesService::Client.new
421
+ #
422
+ # # Create a request. To set request fields, pass in keyword arguments.
423
+ # request = Google::Shopping::Merchant::DataSources::V1::CreateDataSourceRequest.new
424
+ #
425
+ # # Call the create_data_source method.
426
+ # result = client.create_data_source request
427
+ #
428
+ # # The returned object is of type Google::Shopping::Merchant::DataSources::V1::DataSource.
429
+ # p result
430
+ #
431
+ def create_data_source request, options = nil
432
+ raise ::ArgumentError, "request must be provided" if request.nil?
433
+
434
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::DataSources::V1::CreateDataSourceRequest
435
+
436
+ # Converts hash and nil to an options object
437
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
438
+
439
+ # Customize the options with defaults
440
+ metadata = @config.rpcs.create_data_source.metadata.to_h
441
+
442
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
443
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
444
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
445
+ gapic_version: ::Google::Shopping::Merchant::DataSources::V1::VERSION
446
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
447
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
448
+
449
+ header_params = {}
450
+ if request.parent
451
+ header_params["parent"] = request.parent
452
+ end
453
+
454
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
455
+ metadata[:"x-goog-request-params"] ||= request_params_header
456
+
457
+ options.apply_defaults timeout: @config.rpcs.create_data_source.timeout,
458
+ metadata: metadata,
459
+ retry_policy: @config.rpcs.create_data_source.retry_policy
460
+
461
+ options.apply_defaults timeout: @config.timeout,
462
+ metadata: @config.metadata,
463
+ retry_policy: @config.retry_policy
464
+
465
+ @data_sources_service_stub.call_rpc :create_data_source, request, options: options do |response, operation|
466
+ yield response, operation if block_given?
467
+ end
468
+ rescue ::GRPC::BadStatus => e
469
+ raise ::Google::Cloud::Error.from_error(e)
470
+ end
471
+
472
+ ##
473
+ # Updates the existing data source configuration. The fields that are
474
+ # set in the update mask but not provided in the resource will be deleted.
475
+ #
476
+ # @overload update_data_source(request, options = nil)
477
+ # Pass arguments to `update_data_source` via a request object, either of type
478
+ # {::Google::Shopping::Merchant::DataSources::V1::UpdateDataSourceRequest} or an equivalent Hash.
479
+ #
480
+ # @param request [::Google::Shopping::Merchant::DataSources::V1::UpdateDataSourceRequest, ::Hash]
481
+ # A request object representing the call parameters. Required. To specify no
482
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
483
+ # @param options [::Gapic::CallOptions, ::Hash]
484
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
485
+ #
486
+ # @overload update_data_source(data_source: nil, update_mask: nil)
487
+ # Pass arguments to `update_data_source` via keyword arguments. Note that at
488
+ # least one keyword argument is required. To specify no parameters, or to keep all
489
+ # the default parameter values, pass an empty Hash as a request object (see above).
490
+ #
491
+ # @param data_source [::Google::Shopping::Merchant::DataSources::V1::DataSource, ::Hash]
492
+ # Required. The data source resource to update.
493
+ # @param update_mask [::Google::Protobuf::FieldMask, ::Hash]
494
+ # Required. The list of data source fields to be updated.
495
+ #
496
+ # Fields specified in the update mask without a value specified in the
497
+ # body will be deleted from the data source.
498
+ #
499
+ # Providing special "*" value for full data source replacement is not
500
+ # supported.
501
+ #
502
+ # For example, If you insert `updateMask=displayName` in the request, it will
503
+ # only update the `displayName` leaving all other fields untouched.
504
+ #
505
+ # @yield [response, operation] Access the result along with the RPC operation
506
+ # @yieldparam response [::Google::Shopping::Merchant::DataSources::V1::DataSource]
507
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
508
+ #
509
+ # @return [::Google::Shopping::Merchant::DataSources::V1::DataSource]
510
+ #
511
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
512
+ #
513
+ # @example Basic example
514
+ # require "google/shopping/merchant/data_sources/v1"
515
+ #
516
+ # # Create a client object. The client can be reused for multiple calls.
517
+ # client = Google::Shopping::Merchant::DataSources::V1::DataSourcesService::Client.new
518
+ #
519
+ # # Create a request. To set request fields, pass in keyword arguments.
520
+ # request = Google::Shopping::Merchant::DataSources::V1::UpdateDataSourceRequest.new
521
+ #
522
+ # # Call the update_data_source method.
523
+ # result = client.update_data_source request
524
+ #
525
+ # # The returned object is of type Google::Shopping::Merchant::DataSources::V1::DataSource.
526
+ # p result
527
+ #
528
+ def update_data_source request, options = nil
529
+ raise ::ArgumentError, "request must be provided" if request.nil?
530
+
531
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::DataSources::V1::UpdateDataSourceRequest
532
+
533
+ # Converts hash and nil to an options object
534
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
535
+
536
+ # Customize the options with defaults
537
+ metadata = @config.rpcs.update_data_source.metadata.to_h
538
+
539
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
540
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
541
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
542
+ gapic_version: ::Google::Shopping::Merchant::DataSources::V1::VERSION
543
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
544
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
545
+
546
+ header_params = {}
547
+ if request.data_source&.name
548
+ header_params["data_source.name"] = request.data_source.name
549
+ end
550
+
551
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
552
+ metadata[:"x-goog-request-params"] ||= request_params_header
553
+
554
+ options.apply_defaults timeout: @config.rpcs.update_data_source.timeout,
555
+ metadata: metadata,
556
+ retry_policy: @config.rpcs.update_data_source.retry_policy
557
+
558
+ options.apply_defaults timeout: @config.timeout,
559
+ metadata: @config.metadata,
560
+ retry_policy: @config.retry_policy
561
+
562
+ @data_sources_service_stub.call_rpc :update_data_source, request, options: options do |response, operation|
563
+ yield response, operation if block_given?
564
+ end
565
+ rescue ::GRPC::BadStatus => e
566
+ raise ::Google::Cloud::Error.from_error(e)
567
+ end
568
+
569
+ ##
570
+ # Deletes a data source from your Merchant Center account.
571
+ #
572
+ # @overload delete_data_source(request, options = nil)
573
+ # Pass arguments to `delete_data_source` via a request object, either of type
574
+ # {::Google::Shopping::Merchant::DataSources::V1::DeleteDataSourceRequest} or an equivalent Hash.
575
+ #
576
+ # @param request [::Google::Shopping::Merchant::DataSources::V1::DeleteDataSourceRequest, ::Hash]
577
+ # A request object representing the call parameters. Required. To specify no
578
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
579
+ # @param options [::Gapic::CallOptions, ::Hash]
580
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
581
+ #
582
+ # @overload delete_data_source(name: nil)
583
+ # Pass arguments to `delete_data_source` via keyword arguments. Note that at
584
+ # least one keyword argument is required. To specify no parameters, or to keep all
585
+ # the default parameter values, pass an empty Hash as a request object (see above).
586
+ #
587
+ # @param name [::String]
588
+ # Required. The name of the data source to delete.
589
+ # Format: `accounts/{account}/dataSources/{datasource}`
590
+ #
591
+ # @yield [response, operation] Access the result along with the RPC operation
592
+ # @yieldparam response [::Google::Protobuf::Empty]
593
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
594
+ #
595
+ # @return [::Google::Protobuf::Empty]
596
+ #
597
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
598
+ #
599
+ # @example Basic example
600
+ # require "google/shopping/merchant/data_sources/v1"
601
+ #
602
+ # # Create a client object. The client can be reused for multiple calls.
603
+ # client = Google::Shopping::Merchant::DataSources::V1::DataSourcesService::Client.new
604
+ #
605
+ # # Create a request. To set request fields, pass in keyword arguments.
606
+ # request = Google::Shopping::Merchant::DataSources::V1::DeleteDataSourceRequest.new
607
+ #
608
+ # # Call the delete_data_source method.
609
+ # result = client.delete_data_source request
610
+ #
611
+ # # The returned object is of type Google::Protobuf::Empty.
612
+ # p result
613
+ #
614
+ def delete_data_source request, options = nil
615
+ raise ::ArgumentError, "request must be provided" if request.nil?
616
+
617
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::DataSources::V1::DeleteDataSourceRequest
618
+
619
+ # Converts hash and nil to an options object
620
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
621
+
622
+ # Customize the options with defaults
623
+ metadata = @config.rpcs.delete_data_source.metadata.to_h
624
+
625
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
626
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
627
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
628
+ gapic_version: ::Google::Shopping::Merchant::DataSources::V1::VERSION
629
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
630
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
631
+
632
+ header_params = {}
633
+ if request.name
634
+ header_params["name"] = request.name
635
+ end
636
+
637
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
638
+ metadata[:"x-goog-request-params"] ||= request_params_header
639
+
640
+ options.apply_defaults timeout: @config.rpcs.delete_data_source.timeout,
641
+ metadata: metadata,
642
+ retry_policy: @config.rpcs.delete_data_source.retry_policy
643
+
644
+ options.apply_defaults timeout: @config.timeout,
645
+ metadata: @config.metadata,
646
+ retry_policy: @config.retry_policy
647
+
648
+ @data_sources_service_stub.call_rpc :delete_data_source, request, options: options do |response, operation|
649
+ yield response, operation if block_given?
650
+ end
651
+ rescue ::GRPC::BadStatus => e
652
+ raise ::Google::Cloud::Error.from_error(e)
653
+ end
654
+
655
+ ##
656
+ # Performs the data fetch immediately (even outside fetch schedule) on a
657
+ # data source from your Merchant Center Account. If you need to call
658
+ # this method more than once per day, you should use the Products service to
659
+ # update your product data instead.
660
+ # This method only works on data sources with a file input set.
661
+ #
662
+ # @overload fetch_data_source(request, options = nil)
663
+ # Pass arguments to `fetch_data_source` via a request object, either of type
664
+ # {::Google::Shopping::Merchant::DataSources::V1::FetchDataSourceRequest} or an equivalent Hash.
665
+ #
666
+ # @param request [::Google::Shopping::Merchant::DataSources::V1::FetchDataSourceRequest, ::Hash]
667
+ # A request object representing the call parameters. Required. To specify no
668
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
669
+ # @param options [::Gapic::CallOptions, ::Hash]
670
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
671
+ #
672
+ # @overload fetch_data_source(name: nil)
673
+ # Pass arguments to `fetch_data_source` via keyword arguments. Note that at
674
+ # least one keyword argument is required. To specify no parameters, or to keep all
675
+ # the default parameter values, pass an empty Hash as a request object (see above).
676
+ #
677
+ # @param name [::String]
678
+ # Required. The name of the data source resource to fetch.
679
+ # Format: `accounts/{account}/dataSources/{datasource}`
680
+ #
681
+ # @yield [response, operation] Access the result along with the RPC operation
682
+ # @yieldparam response [::Google::Protobuf::Empty]
683
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
684
+ #
685
+ # @return [::Google::Protobuf::Empty]
686
+ #
687
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
688
+ #
689
+ # @example Basic example
690
+ # require "google/shopping/merchant/data_sources/v1"
691
+ #
692
+ # # Create a client object. The client can be reused for multiple calls.
693
+ # client = Google::Shopping::Merchant::DataSources::V1::DataSourcesService::Client.new
694
+ #
695
+ # # Create a request. To set request fields, pass in keyword arguments.
696
+ # request = Google::Shopping::Merchant::DataSources::V1::FetchDataSourceRequest.new
697
+ #
698
+ # # Call the fetch_data_source method.
699
+ # result = client.fetch_data_source request
700
+ #
701
+ # # The returned object is of type Google::Protobuf::Empty.
702
+ # p result
703
+ #
704
+ def fetch_data_source request, options = nil
705
+ raise ::ArgumentError, "request must be provided" if request.nil?
706
+
707
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::DataSources::V1::FetchDataSourceRequest
708
+
709
+ # Converts hash and nil to an options object
710
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
711
+
712
+ # Customize the options with defaults
713
+ metadata = @config.rpcs.fetch_data_source.metadata.to_h
714
+
715
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
716
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
717
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
718
+ gapic_version: ::Google::Shopping::Merchant::DataSources::V1::VERSION
719
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
720
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
721
+
722
+ header_params = {}
723
+ if request.name
724
+ header_params["name"] = request.name
725
+ end
726
+
727
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
728
+ metadata[:"x-goog-request-params"] ||= request_params_header
729
+
730
+ options.apply_defaults timeout: @config.rpcs.fetch_data_source.timeout,
731
+ metadata: metadata,
732
+ retry_policy: @config.rpcs.fetch_data_source.retry_policy
733
+
734
+ options.apply_defaults timeout: @config.timeout,
735
+ metadata: @config.metadata,
736
+ retry_policy: @config.retry_policy
737
+
738
+ @data_sources_service_stub.call_rpc :fetch_data_source, request, options: options do |response, operation|
739
+ yield response, operation if block_given?
740
+ end
741
+ rescue ::GRPC::BadStatus => e
742
+ raise ::Google::Cloud::Error.from_error(e)
743
+ end
744
+
745
+ ##
746
+ # Configuration class for the DataSourcesService API.
747
+ #
748
+ # This class represents the configuration for DataSourcesService,
749
+ # providing control over timeouts, retry behavior, logging, transport
750
+ # parameters, and other low-level controls. Certain parameters can also be
751
+ # applied individually to specific RPCs. See
752
+ # {::Google::Shopping::Merchant::DataSources::V1::DataSourcesService::Client::Configuration::Rpcs}
753
+ # for a list of RPCs that can be configured independently.
754
+ #
755
+ # Configuration can be applied globally to all clients, or to a single client
756
+ # on construction.
757
+ #
758
+ # @example
759
+ #
760
+ # # Modify the global config, setting the timeout for
761
+ # # get_data_source to 20 seconds,
762
+ # # and all remaining timeouts to 10 seconds.
763
+ # ::Google::Shopping::Merchant::DataSources::V1::DataSourcesService::Client.configure do |config|
764
+ # config.timeout = 10.0
765
+ # config.rpcs.get_data_source.timeout = 20.0
766
+ # end
767
+ #
768
+ # # Apply the above configuration only to a new client.
769
+ # client = ::Google::Shopping::Merchant::DataSources::V1::DataSourcesService::Client.new do |config|
770
+ # config.timeout = 10.0
771
+ # config.rpcs.get_data_source.timeout = 20.0
772
+ # end
773
+ #
774
+ # @!attribute [rw] endpoint
775
+ # A custom service endpoint, as a hostname or hostname:port. The default is
776
+ # nil, indicating to use the default endpoint in the current universe domain.
777
+ # @return [::String,nil]
778
+ # @!attribute [rw] credentials
779
+ # Credentials to send with calls. You may provide any of the following types:
780
+ # * (`String`) The path to a service account key file in JSON format
781
+ # * (`Hash`) A service account key as a Hash
782
+ # * (`Google::Auth::Credentials`) A googleauth credentials object
783
+ # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials))
784
+ # * (`Signet::OAuth2::Client`) A signet oauth2 client object
785
+ # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client))
786
+ # * (`GRPC::Core::Channel`) a gRPC channel with included credentials
787
+ # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object
788
+ # * (`nil`) indicating no credentials
789
+ #
790
+ # Warning: If you accept a credential configuration (JSON file or Hash) from an
791
+ # external source for authentication to Google Cloud, you must validate it before
792
+ # providing it to a Google API client library. Providing an unvalidated credential
793
+ # configuration to Google APIs can compromise the security of your systems and data.
794
+ # For more information, refer to [Validate credential configurations from external
795
+ # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials).
796
+ # @return [::Object]
797
+ # @!attribute [rw] scope
798
+ # The OAuth scopes
799
+ # @return [::Array<::String>]
800
+ # @!attribute [rw] lib_name
801
+ # The library name as recorded in instrumentation and logging
802
+ # @return [::String]
803
+ # @!attribute [rw] lib_version
804
+ # The library version as recorded in instrumentation and logging
805
+ # @return [::String]
806
+ # @!attribute [rw] channel_args
807
+ # Extra parameters passed to the gRPC channel. Note: this is ignored if a
808
+ # `GRPC::Core::Channel` object is provided as the credential.
809
+ # @return [::Hash]
810
+ # @!attribute [rw] interceptors
811
+ # An array of interceptors that are run before calls are executed.
812
+ # @return [::Array<::GRPC::ClientInterceptor>]
813
+ # @!attribute [rw] timeout
814
+ # The call timeout in seconds.
815
+ # @return [::Numeric]
816
+ # @!attribute [rw] metadata
817
+ # Additional gRPC headers to be sent with the call.
818
+ # @return [::Hash{::Symbol=>::String}]
819
+ # @!attribute [rw] retry_policy
820
+ # The retry policy. The value is a hash with the following keys:
821
+ # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds.
822
+ # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds.
823
+ # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier.
824
+ # * `:retry_codes` (*type:* `Array<String>`) - The error codes that should
825
+ # trigger a retry.
826
+ # @return [::Hash]
827
+ # @!attribute [rw] quota_project
828
+ # A separate project against which to charge quota.
829
+ # @return [::String]
830
+ # @!attribute [rw] universe_domain
831
+ # The universe domain within which to make requests. This determines the
832
+ # default endpoint URL. The default value of nil uses the environment
833
+ # universe (usually the default "googleapis.com" universe).
834
+ # @return [::String,nil]
835
+ # @!attribute [rw] logger
836
+ # A custom logger to use for request/response debug logging, or the value
837
+ # `:default` (the default) to construct a default logger, or `nil` to
838
+ # explicitly disable logging.
839
+ # @return [::Logger,:default,nil]
840
+ #
841
+ class Configuration
842
+ extend ::Gapic::Config
843
+
844
+ # @private
845
+ # The endpoint specific to the default "googleapis.com" universe. Deprecated.
846
+ DEFAULT_ENDPOINT = "merchantapi.googleapis.com"
847
+
848
+ config_attr :endpoint, nil, ::String, nil
849
+ config_attr :credentials, nil do |value|
850
+ allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil]
851
+ allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC::Core::Channel
852
+ allowed.any? { |klass| klass === value }
853
+ end
854
+ config_attr :scope, nil, ::String, ::Array, nil
855
+ config_attr :lib_name, nil, ::String, nil
856
+ config_attr :lib_version, nil, ::String, nil
857
+ config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil)
858
+ config_attr :interceptors, nil, ::Array, nil
859
+ config_attr :timeout, nil, ::Numeric, nil
860
+ config_attr :metadata, nil, ::Hash, nil
861
+ config_attr :retry_policy, nil, ::Hash, ::Proc, nil
862
+ config_attr :quota_project, nil, ::String, nil
863
+ config_attr :universe_domain, nil, ::String, nil
864
+ config_attr :logger, :default, ::Logger, nil, :default
865
+
866
+ # @private
867
+ def initialize parent_config = nil
868
+ @parent_config = parent_config unless parent_config.nil?
869
+
870
+ yield self if block_given?
871
+ end
872
+
873
+ ##
874
+ # Configurations for individual RPCs
875
+ # @return [Rpcs]
876
+ #
877
+ def rpcs
878
+ @rpcs ||= begin
879
+ parent_rpcs = nil
880
+ parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs)
881
+ Rpcs.new parent_rpcs
882
+ end
883
+ end
884
+
885
+ ##
886
+ # Configuration for the channel pool
887
+ # @return [::Gapic::ServiceStub::ChannelPool::Configuration]
888
+ #
889
+ def channel_pool
890
+ @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new
891
+ end
892
+
893
+ ##
894
+ # Configuration RPC class for the DataSourcesService API.
895
+ #
896
+ # Includes fields providing the configuration for each RPC in this service.
897
+ # Each configuration object is of type `Gapic::Config::Method` and includes
898
+ # the following configuration fields:
899
+ #
900
+ # * `timeout` (*type:* `Numeric`) - The call timeout in seconds
901
+ # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers
902
+ # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields
903
+ # include the following keys:
904
+ # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds.
905
+ # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds.
906
+ # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier.
907
+ # * `:retry_codes` (*type:* `Array<String>`) - The error codes that should
908
+ # trigger a retry.
909
+ #
910
+ class Rpcs
911
+ ##
912
+ # RPC-specific configuration for `get_data_source`
913
+ # @return [::Gapic::Config::Method]
914
+ #
915
+ attr_reader :get_data_source
916
+ ##
917
+ # RPC-specific configuration for `list_data_sources`
918
+ # @return [::Gapic::Config::Method]
919
+ #
920
+ attr_reader :list_data_sources
921
+ ##
922
+ # RPC-specific configuration for `create_data_source`
923
+ # @return [::Gapic::Config::Method]
924
+ #
925
+ attr_reader :create_data_source
926
+ ##
927
+ # RPC-specific configuration for `update_data_source`
928
+ # @return [::Gapic::Config::Method]
929
+ #
930
+ attr_reader :update_data_source
931
+ ##
932
+ # RPC-specific configuration for `delete_data_source`
933
+ # @return [::Gapic::Config::Method]
934
+ #
935
+ attr_reader :delete_data_source
936
+ ##
937
+ # RPC-specific configuration for `fetch_data_source`
938
+ # @return [::Gapic::Config::Method]
939
+ #
940
+ attr_reader :fetch_data_source
941
+
942
+ # @private
943
+ def initialize parent_rpcs = nil
944
+ get_data_source_config = parent_rpcs.get_data_source if parent_rpcs.respond_to? :get_data_source
945
+ @get_data_source = ::Gapic::Config::Method.new get_data_source_config
946
+ list_data_sources_config = parent_rpcs.list_data_sources if parent_rpcs.respond_to? :list_data_sources
947
+ @list_data_sources = ::Gapic::Config::Method.new list_data_sources_config
948
+ create_data_source_config = parent_rpcs.create_data_source if parent_rpcs.respond_to? :create_data_source
949
+ @create_data_source = ::Gapic::Config::Method.new create_data_source_config
950
+ update_data_source_config = parent_rpcs.update_data_source if parent_rpcs.respond_to? :update_data_source
951
+ @update_data_source = ::Gapic::Config::Method.new update_data_source_config
952
+ delete_data_source_config = parent_rpcs.delete_data_source if parent_rpcs.respond_to? :delete_data_source
953
+ @delete_data_source = ::Gapic::Config::Method.new delete_data_source_config
954
+ fetch_data_source_config = parent_rpcs.fetch_data_source if parent_rpcs.respond_to? :fetch_data_source
955
+ @fetch_data_source = ::Gapic::Config::Method.new fetch_data_source_config
956
+
957
+ yield self if block_given?
958
+ end
959
+ end
960
+ end
961
+ end
962
+ end
963
+ end
964
+ end
965
+ end
966
+ end
967
+ end