google-shopping-merchant-data_sources-v1beta 0.1.2 → 0.2.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,402 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Copyright 2024 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/v1beta/fileuploads_pb"
21
+ require "google/shopping/merchant/data_sources/v1beta/file_uploads_service/rest/service_stub"
22
+
23
+ module Google
24
+ module Shopping
25
+ module Merchant
26
+ module DataSources
27
+ module V1beta
28
+ module FileUploadsService
29
+ module Rest
30
+ ##
31
+ # REST client for the FileUploadsService service.
32
+ #
33
+ # Service to manage data source file uploads.
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 :file_uploads_service_stub
46
+
47
+ ##
48
+ # Configure the FileUploadsService Client class.
49
+ #
50
+ # See {::Google::Shopping::Merchant::DataSources::V1beta::FileUploadsService::Rest::Client::Configuration}
51
+ # for a description of the configuration fields.
52
+ #
53
+ # @example
54
+ #
55
+ # # Modify the configuration for all FileUploadsService clients
56
+ # ::Google::Shopping::Merchant::DataSources::V1beta::FileUploadsService::Rest::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", "V1beta"]
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 FileUploadsService 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::V1beta::FileUploadsService::Rest::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
+ @file_uploads_service_stub.universe_domain
114
+ end
115
+
116
+ ##
117
+ # Create a new FileUploadsService REST client object.
118
+ #
119
+ # @example
120
+ #
121
+ # # Create a client using the default configuration
122
+ # client = ::Google::Shopping::Merchant::DataSources::V1beta::FileUploadsService::Rest::Client.new
123
+ #
124
+ # # Create a client using a custom configuration
125
+ # client = ::Google::Shopping::Merchant::DataSources::V1beta::FileUploadsService::Rest::Client.new do |config|
126
+ # config.timeout = 10.0
127
+ # end
128
+ #
129
+ # @yield [config] Configure the FileUploadsService client.
130
+ # @yieldparam config [Client::Configuration]
131
+ #
132
+ def initialize
133
+ # Create the configuration object
134
+ @config = Configuration.new Client.configure
135
+
136
+ # Yield the configuration if needed
137
+ yield @config if block_given?
138
+
139
+ # Create credentials
140
+ credentials = @config.credentials
141
+ # Use self-signed JWT if the endpoint is unchanged from default,
142
+ # but only if the default endpoint does not have a region prefix.
143
+ enable_self_signed_jwt = @config.endpoint.nil? ||
144
+ (@config.endpoint == Configuration::DEFAULT_ENDPOINT &&
145
+ !@config.endpoint.split(".").first.include?("-"))
146
+ credentials ||= Credentials.default scope: @config.scope,
147
+ enable_self_signed_jwt: enable_self_signed_jwt
148
+ if credentials.is_a?(::String) || credentials.is_a?(::Hash)
149
+ credentials = Credentials.new credentials, scope: @config.scope
150
+ end
151
+
152
+ @quota_project_id = @config.quota_project
153
+ @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id
154
+
155
+ @file_uploads_service_stub = ::Google::Shopping::Merchant::DataSources::V1beta::FileUploadsService::Rest::ServiceStub.new(
156
+ endpoint: @config.endpoint,
157
+ endpoint_template: DEFAULT_ENDPOINT_TEMPLATE,
158
+ universe_domain: @config.universe_domain,
159
+ credentials: credentials
160
+ )
161
+ end
162
+
163
+ # Service calls
164
+
165
+ ##
166
+ # Gets the latest data source file upload. Only the `latest` alias is
167
+ # accepted for a file upload.
168
+ #
169
+ # @overload get_file_upload(request, options = nil)
170
+ # Pass arguments to `get_file_upload` via a request object, either of type
171
+ # {::Google::Shopping::Merchant::DataSources::V1beta::GetFileUploadRequest} or an equivalent Hash.
172
+ #
173
+ # @param request [::Google::Shopping::Merchant::DataSources::V1beta::GetFileUploadRequest, ::Hash]
174
+ # A request object representing the call parameters. Required. To specify no
175
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
176
+ # @param options [::Gapic::CallOptions, ::Hash]
177
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
178
+ #
179
+ # @overload get_file_upload(name: nil)
180
+ # Pass arguments to `get_file_upload` via keyword arguments. Note that at
181
+ # least one keyword argument is required. To specify no parameters, or to keep all
182
+ # the default parameter values, pass an empty Hash as a request object (see above).
183
+ #
184
+ # @param name [::String]
185
+ # Required. The name of the data source file upload to retrieve.
186
+ # Format:
187
+ # `accounts/{account}/dataSources/{datasource}/fileUploads/latest`
188
+ # @yield [result, operation] Access the result along with the TransportOperation object
189
+ # @yieldparam result [::Google::Shopping::Merchant::DataSources::V1beta::FileUpload]
190
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
191
+ #
192
+ # @return [::Google::Shopping::Merchant::DataSources::V1beta::FileUpload]
193
+ #
194
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
195
+ #
196
+ # @example Basic example
197
+ # require "google/shopping/merchant/data_sources/v1beta"
198
+ #
199
+ # # Create a client object. The client can be reused for multiple calls.
200
+ # client = Google::Shopping::Merchant::DataSources::V1beta::FileUploadsService::Rest::Client.new
201
+ #
202
+ # # Create a request. To set request fields, pass in keyword arguments.
203
+ # request = Google::Shopping::Merchant::DataSources::V1beta::GetFileUploadRequest.new
204
+ #
205
+ # # Call the get_file_upload method.
206
+ # result = client.get_file_upload request
207
+ #
208
+ # # The returned object is of type Google::Shopping::Merchant::DataSources::V1beta::FileUpload.
209
+ # p result
210
+ #
211
+ def get_file_upload request, options = nil
212
+ raise ::ArgumentError, "request must be provided" if request.nil?
213
+
214
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::DataSources::V1beta::GetFileUploadRequest
215
+
216
+ # Converts hash and nil to an options object
217
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
218
+
219
+ # Customize the options with defaults
220
+ call_metadata = @config.rpcs.get_file_upload.metadata.to_h
221
+
222
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
223
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
224
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
225
+ gapic_version: ::Google::Shopping::Merchant::DataSources::V1beta::VERSION,
226
+ transports_version_send: [:rest]
227
+
228
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
229
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
230
+
231
+ options.apply_defaults timeout: @config.rpcs.get_file_upload.timeout,
232
+ metadata: call_metadata,
233
+ retry_policy: @config.rpcs.get_file_upload.retry_policy
234
+
235
+ options.apply_defaults timeout: @config.timeout,
236
+ metadata: @config.metadata,
237
+ retry_policy: @config.retry_policy
238
+
239
+ @file_uploads_service_stub.get_file_upload request, options do |result, operation|
240
+ yield result, operation if block_given?
241
+ return result
242
+ end
243
+ rescue ::Gapic::Rest::Error => e
244
+ raise ::Google::Cloud::Error.from_error(e)
245
+ end
246
+
247
+ ##
248
+ # Configuration class for the FileUploadsService REST API.
249
+ #
250
+ # This class represents the configuration for FileUploadsService REST,
251
+ # providing control over timeouts, retry behavior, logging, transport
252
+ # parameters, and other low-level controls. Certain parameters can also be
253
+ # applied individually to specific RPCs. See
254
+ # {::Google::Shopping::Merchant::DataSources::V1beta::FileUploadsService::Rest::Client::Configuration::Rpcs}
255
+ # for a list of RPCs that can be configured independently.
256
+ #
257
+ # Configuration can be applied globally to all clients, or to a single client
258
+ # on construction.
259
+ #
260
+ # @example
261
+ #
262
+ # # Modify the global config, setting the timeout for
263
+ # # get_file_upload to 20 seconds,
264
+ # # and all remaining timeouts to 10 seconds.
265
+ # ::Google::Shopping::Merchant::DataSources::V1beta::FileUploadsService::Rest::Client.configure do |config|
266
+ # config.timeout = 10.0
267
+ # config.rpcs.get_file_upload.timeout = 20.0
268
+ # end
269
+ #
270
+ # # Apply the above configuration only to a new client.
271
+ # client = ::Google::Shopping::Merchant::DataSources::V1beta::FileUploadsService::Rest::Client.new do |config|
272
+ # config.timeout = 10.0
273
+ # config.rpcs.get_file_upload.timeout = 20.0
274
+ # end
275
+ #
276
+ # @!attribute [rw] endpoint
277
+ # A custom service endpoint, as a hostname or hostname:port. The default is
278
+ # nil, indicating to use the default endpoint in the current universe domain.
279
+ # @return [::String,nil]
280
+ # @!attribute [rw] credentials
281
+ # Credentials to send with calls. You may provide any of the following types:
282
+ # * (`String`) The path to a service account key file in JSON format
283
+ # * (`Hash`) A service account key as a Hash
284
+ # * (`Google::Auth::Credentials`) A googleauth credentials object
285
+ # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials))
286
+ # * (`Signet::OAuth2::Client`) A signet oauth2 client object
287
+ # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client))
288
+ # * (`nil`) indicating no credentials
289
+ # @return [::Object]
290
+ # @!attribute [rw] scope
291
+ # The OAuth scopes
292
+ # @return [::Array<::String>]
293
+ # @!attribute [rw] lib_name
294
+ # The library name as recorded in instrumentation and logging
295
+ # @return [::String]
296
+ # @!attribute [rw] lib_version
297
+ # The library version as recorded in instrumentation and logging
298
+ # @return [::String]
299
+ # @!attribute [rw] timeout
300
+ # The call timeout in seconds.
301
+ # @return [::Numeric]
302
+ # @!attribute [rw] metadata
303
+ # Additional headers to be sent with the call.
304
+ # @return [::Hash{::Symbol=>::String}]
305
+ # @!attribute [rw] retry_policy
306
+ # The retry policy. The value is a hash with the following keys:
307
+ # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds.
308
+ # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds.
309
+ # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier.
310
+ # * `:retry_codes` (*type:* `Array<String>`) - The error codes that should
311
+ # trigger a retry.
312
+ # @return [::Hash]
313
+ # @!attribute [rw] quota_project
314
+ # A separate project against which to charge quota.
315
+ # @return [::String]
316
+ # @!attribute [rw] universe_domain
317
+ # The universe domain within which to make requests. This determines the
318
+ # default endpoint URL. The default value of nil uses the environment
319
+ # universe (usually the default "googleapis.com" universe).
320
+ # @return [::String,nil]
321
+ #
322
+ class Configuration
323
+ extend ::Gapic::Config
324
+
325
+ # @private
326
+ # The endpoint specific to the default "googleapis.com" universe. Deprecated.
327
+ DEFAULT_ENDPOINT = "merchantapi.googleapis.com"
328
+
329
+ config_attr :endpoint, nil, ::String, nil
330
+ config_attr :credentials, nil do |value|
331
+ allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Signet::OAuth2::Client, nil]
332
+ allowed.any? { |klass| klass === value }
333
+ end
334
+ config_attr :scope, nil, ::String, ::Array, nil
335
+ config_attr :lib_name, nil, ::String, nil
336
+ config_attr :lib_version, nil, ::String, nil
337
+ config_attr :timeout, nil, ::Numeric, nil
338
+ config_attr :metadata, nil, ::Hash, nil
339
+ config_attr :retry_policy, nil, ::Hash, ::Proc, nil
340
+ config_attr :quota_project, nil, ::String, nil
341
+ config_attr :universe_domain, nil, ::String, nil
342
+
343
+ # @private
344
+ def initialize parent_config = nil
345
+ @parent_config = parent_config unless parent_config.nil?
346
+
347
+ yield self if block_given?
348
+ end
349
+
350
+ ##
351
+ # Configurations for individual RPCs
352
+ # @return [Rpcs]
353
+ #
354
+ def rpcs
355
+ @rpcs ||= begin
356
+ parent_rpcs = nil
357
+ parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs)
358
+ Rpcs.new parent_rpcs
359
+ end
360
+ end
361
+
362
+ ##
363
+ # Configuration RPC class for the FileUploadsService API.
364
+ #
365
+ # Includes fields providing the configuration for each RPC in this service.
366
+ # Each configuration object is of type `Gapic::Config::Method` and includes
367
+ # the following configuration fields:
368
+ #
369
+ # * `timeout` (*type:* `Numeric`) - The call timeout in seconds
370
+ # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers
371
+ # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields
372
+ # include the following keys:
373
+ # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds.
374
+ # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds.
375
+ # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier.
376
+ # * `:retry_codes` (*type:* `Array<String>`) - The error codes that should
377
+ # trigger a retry.
378
+ #
379
+ class Rpcs
380
+ ##
381
+ # RPC-specific configuration for `get_file_upload`
382
+ # @return [::Gapic::Config::Method]
383
+ #
384
+ attr_reader :get_file_upload
385
+
386
+ # @private
387
+ def initialize parent_rpcs = nil
388
+ get_file_upload_config = parent_rpcs.get_file_upload if parent_rpcs.respond_to? :get_file_upload
389
+ @get_file_upload = ::Gapic::Config::Method.new get_file_upload_config
390
+
391
+ yield self if block_given?
392
+ end
393
+ end
394
+ end
395
+ end
396
+ end
397
+ end
398
+ end
399
+ end
400
+ end
401
+ end
402
+ end
@@ -0,0 +1,130 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Copyright 2024 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/shopping/merchant/datasources/v1beta/fileuploads_pb"
20
+
21
+ module Google
22
+ module Shopping
23
+ module Merchant
24
+ module DataSources
25
+ module V1beta
26
+ module FileUploadsService
27
+ module Rest
28
+ ##
29
+ # REST service stub for the FileUploadsService service.
30
+ # Service stub contains baseline method implementations
31
+ # including transcoding, making the REST call, and deserialing the response.
32
+ #
33
+ class ServiceStub
34
+ def initialize endpoint:, endpoint_template:, universe_domain:, credentials:
35
+ # These require statements are intentionally placed here to initialize
36
+ # the REST modules only when it's required.
37
+ require "gapic/rest"
38
+
39
+ @client_stub = ::Gapic::Rest::ClientStub.new endpoint: endpoint,
40
+ endpoint_template: endpoint_template,
41
+ universe_domain: universe_domain,
42
+ credentials: credentials,
43
+ numeric_enums: true,
44
+ raise_faraday_errors: false
45
+ end
46
+
47
+ ##
48
+ # The effective universe domain
49
+ #
50
+ # @return [String]
51
+ #
52
+ def universe_domain
53
+ @client_stub.universe_domain
54
+ end
55
+
56
+ ##
57
+ # The effective endpoint
58
+ #
59
+ # @return [String]
60
+ #
61
+ def endpoint
62
+ @client_stub.endpoint
63
+ end
64
+
65
+ ##
66
+ # Baseline implementation for the get_file_upload REST call
67
+ #
68
+ # @param request_pb [::Google::Shopping::Merchant::DataSources::V1beta::GetFileUploadRequest]
69
+ # A request object representing the call parameters. Required.
70
+ # @param options [::Gapic::CallOptions]
71
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
72
+ #
73
+ # @yield [result, operation] Access the result along with the TransportOperation object
74
+ # @yieldparam result [::Google::Shopping::Merchant::DataSources::V1beta::FileUpload]
75
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
76
+ #
77
+ # @return [::Google::Shopping::Merchant::DataSources::V1beta::FileUpload]
78
+ # A result object deserialized from the server's reply
79
+ def get_file_upload request_pb, options = nil
80
+ raise ::ArgumentError, "request must be provided" if request_pb.nil?
81
+
82
+ verb, uri, query_string_params, body = ServiceStub.transcode_get_file_upload_request request_pb
83
+ query_string_params = if query_string_params.any?
84
+ query_string_params.to_h { |p| p.split "=", 2 }
85
+ else
86
+ {}
87
+ end
88
+
89
+ response = @client_stub.make_http_request(
90
+ verb,
91
+ uri: uri,
92
+ body: body || "",
93
+ params: query_string_params,
94
+ options: options
95
+ )
96
+ operation = ::Gapic::Rest::TransportOperation.new response
97
+ result = ::Google::Shopping::Merchant::DataSources::V1beta::FileUpload.decode_json response.body, ignore_unknown_fields: true
98
+
99
+ yield result, operation if block_given?
100
+ result
101
+ end
102
+
103
+ ##
104
+ # @private
105
+ #
106
+ # GRPC transcoding helper method for the get_file_upload REST call
107
+ #
108
+ # @param request_pb [::Google::Shopping::Merchant::DataSources::V1beta::GetFileUploadRequest]
109
+ # A request object representing the call parameters. Required.
110
+ # @return [Array(String, [String, nil], Hash{String => String})]
111
+ # Uri, Body, Query string parameters
112
+ def self.transcode_get_file_upload_request request_pb
113
+ transcoder = Gapic::Rest::GrpcTranscoder.new
114
+ .with_bindings(
115
+ uri_method: :get,
116
+ uri_template: "/datasources/v1beta/{name}",
117
+ matches: [
118
+ ["name", %r{^accounts/[^/]+/dataSources/[^/]+/fileUploads/[^/]+/?$}, false]
119
+ ]
120
+ )
121
+ transcoder.transcode request_pb
122
+ end
123
+ end
124
+ end
125
+ end
126
+ end
127
+ end
128
+ end
129
+ end
130
+ end
@@ -0,0 +1,54 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Copyright 2024 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/rest"
20
+ require "gapic/config"
21
+ require "gapic/config/method"
22
+
23
+ require "google/shopping/merchant/data_sources/v1beta/version"
24
+
25
+ require "google/shopping/merchant/data_sources/v1beta/file_uploads_service/credentials"
26
+ require "google/shopping/merchant/data_sources/v1beta/file_uploads_service/paths"
27
+ require "google/shopping/merchant/data_sources/v1beta/file_uploads_service/rest/client"
28
+
29
+ module Google
30
+ module Shopping
31
+ module Merchant
32
+ module DataSources
33
+ module V1beta
34
+ ##
35
+ # Service to manage data source file uploads.
36
+ #
37
+ # To load this service and instantiate a REST client:
38
+ #
39
+ # require "google/shopping/merchant/data_sources/v1beta/file_uploads_service/rest"
40
+ # client = ::Google::Shopping::Merchant::DataSources::V1beta::FileUploadsService::Rest::Client.new
41
+ #
42
+ module FileUploadsService
43
+ # Client for the REST transport
44
+ module Rest
45
+ end
46
+ end
47
+ end
48
+ end
49
+ end
50
+ end
51
+ end
52
+
53
+ helper_path = ::File.join __dir__, "rest", "helpers.rb"
54
+ require "google/shopping/merchant/data_sources/v1beta/file_uploads_service/rest/helpers" if ::File.file? helper_path
@@ -0,0 +1,57 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Copyright 2024 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/shopping/merchant/data_sources/v1beta/version"
24
+
25
+ require "google/shopping/merchant/data_sources/v1beta/file_uploads_service/credentials"
26
+ require "google/shopping/merchant/data_sources/v1beta/file_uploads_service/paths"
27
+ require "google/shopping/merchant/data_sources/v1beta/file_uploads_service/client"
28
+ require "google/shopping/merchant/data_sources/v1beta/file_uploads_service/rest"
29
+
30
+ module Google
31
+ module Shopping
32
+ module Merchant
33
+ module DataSources
34
+ module V1beta
35
+ ##
36
+ # Service to manage data source file uploads.
37
+ #
38
+ # @example Load this service and instantiate a gRPC client
39
+ #
40
+ # require "google/shopping/merchant/data_sources/v1beta/file_uploads_service"
41
+ # client = ::Google::Shopping::Merchant::DataSources::V1beta::FileUploadsService::Client.new
42
+ #
43
+ # @example Load this service and instantiate a REST client
44
+ #
45
+ # require "google/shopping/merchant/data_sources/v1beta/file_uploads_service/rest"
46
+ # client = ::Google::Shopping::Merchant::DataSources::V1beta::FileUploadsService::Rest::Client.new
47
+ #
48
+ module FileUploadsService
49
+ end
50
+ end
51
+ end
52
+ end
53
+ end
54
+ end
55
+
56
+ helper_path = ::File.join __dir__, "file_uploads_service", "helpers.rb"
57
+ require "google/shopping/merchant/data_sources/v1beta/file_uploads_service/helpers" if ::File.file? helper_path
@@ -17,6 +17,7 @@
17
17
  # Auto-generated by gapic-generator-ruby. DO NOT EDIT!
18
18
 
19
19
  require "google/shopping/merchant/data_sources/v1beta/data_sources_service/rest"
20
+ require "google/shopping/merchant/data_sources/v1beta/file_uploads_service/rest"
20
21
  require "google/shopping/merchant/data_sources/v1beta/version"
21
22
 
22
23
  module Google
@@ -22,7 +22,7 @@ module Google
22
22
  module Merchant
23
23
  module DataSources
24
24
  module V1beta
25
- VERSION = "0.1.2"
25
+ VERSION = "0.2.0"
26
26
  end
27
27
  end
28
28
  end
@@ -17,6 +17,7 @@
17
17
  # Auto-generated by gapic-generator-ruby. DO NOT EDIT!
18
18
 
19
19
  require "google/shopping/merchant/data_sources/v1beta/data_sources_service"
20
+ require "google/shopping/merchant/data_sources/v1beta/file_uploads_service"
20
21
  require "google/shopping/merchant/data_sources/v1beta/version"
21
22
 
22
23
  module Google