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

Sign up to get free protection for your applications and to get access to all the features.
Files changed (52) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +2 -1
  3. data/lib/google/shopping/merchant/accounts/v1beta/account_issue_service/client.rb +6 -1
  4. data/lib/google/shopping/merchant/accounts/v1beta/account_issue_service/rest/client.rb +6 -1
  5. data/lib/google/shopping/merchant/accounts/v1beta/account_tax_service/client.rb +5 -0
  6. data/lib/google/shopping/merchant/accounts/v1beta/account_tax_service/rest/client.rb +5 -0
  7. data/lib/google/shopping/merchant/accounts/v1beta/accountissue_pb.rb +1 -3
  8. data/lib/google/shopping/merchant/accounts/v1beta/accounts_pb.rb +3 -2
  9. data/lib/google/shopping/merchant/accounts/v1beta/accounts_service/client.rb +6 -3
  10. data/lib/google/shopping/merchant/accounts/v1beta/accounts_service/rest/client.rb +6 -3
  11. data/lib/google/shopping/merchant/accounts/v1beta/accountservices_pb.rb +49 -0
  12. data/lib/google/shopping/merchant/accounts/v1beta/autofeed_settings_service/client.rb +529 -0
  13. data/lib/google/shopping/merchant/accounts/v1beta/autofeed_settings_service/credentials.rb +49 -0
  14. data/lib/google/shopping/merchant/accounts/v1beta/autofeed_settings_service/paths.rb +49 -0
  15. data/lib/google/shopping/merchant/accounts/v1beta/autofeed_settings_service/rest/client.rb +489 -0
  16. data/lib/google/shopping/merchant/accounts/v1beta/autofeed_settings_service/rest/service_stub.rb +190 -0
  17. data/lib/google/shopping/merchant/accounts/v1beta/autofeed_settings_service/rest.rb +55 -0
  18. data/lib/google/shopping/merchant/accounts/v1beta/autofeed_settings_service.rb +58 -0
  19. data/lib/google/shopping/merchant/accounts/v1beta/autofeedsettings_pb.rb +53 -0
  20. data/lib/google/shopping/merchant/accounts/v1beta/autofeedsettings_services_pb.rb +50 -0
  21. data/lib/google/shopping/merchant/accounts/v1beta/business_identity_service/client.rb +5 -0
  22. data/lib/google/shopping/merchant/accounts/v1beta/business_identity_service/rest/client.rb +5 -0
  23. data/lib/google/shopping/merchant/accounts/v1beta/business_info_service/client.rb +5 -0
  24. data/lib/google/shopping/merchant/accounts/v1beta/business_info_service/rest/client.rb +5 -0
  25. data/lib/google/shopping/merchant/accounts/v1beta/businessinfo_pb.rb +1 -1
  26. data/lib/google/shopping/merchant/accounts/v1beta/email_preferences_service/client.rb +5 -0
  27. data/lib/google/shopping/merchant/accounts/v1beta/email_preferences_service/rest/client.rb +5 -0
  28. data/lib/google/shopping/merchant/accounts/v1beta/homepage_service/client.rb +5 -0
  29. data/lib/google/shopping/merchant/accounts/v1beta/homepage_service/rest/client.rb +5 -0
  30. data/lib/google/shopping/merchant/accounts/v1beta/programs_service/client.rb +5 -0
  31. data/lib/google/shopping/merchant/accounts/v1beta/programs_service/rest/client.rb +5 -0
  32. data/lib/google/shopping/merchant/accounts/v1beta/regions_service/client.rb +5 -0
  33. data/lib/google/shopping/merchant/accounts/v1beta/regions_service/rest/client.rb +5 -0
  34. data/lib/google/shopping/merchant/accounts/v1beta/rest.rb +1 -0
  35. data/lib/google/shopping/merchant/accounts/v1beta/terms_of_service_agreement_state_service/client.rb +6 -0
  36. data/lib/google/shopping/merchant/accounts/v1beta/terms_of_service_agreement_state_service/rest/client.rb +6 -0
  37. data/lib/google/shopping/merchant/accounts/v1beta/terms_of_service_service/client.rb +4 -4
  38. data/lib/google/shopping/merchant/accounts/v1beta/terms_of_service_service/rest/client.rb +4 -4
  39. data/lib/google/shopping/merchant/accounts/v1beta/termsofservice_pb.rb +1 -1
  40. data/lib/google/shopping/merchant/accounts/v1beta/user_service/client.rb +5 -0
  41. data/lib/google/shopping/merchant/accounts/v1beta/user_service/rest/client.rb +5 -0
  42. data/lib/google/shopping/merchant/accounts/v1beta/version.rb +1 -1
  43. data/lib/google/shopping/merchant/accounts/v1beta.rb +1 -0
  44. data/proto_docs/google/shopping/merchant/accounts/v1beta/accountissue.rb +1 -1
  45. data/proto_docs/google/shopping/merchant/accounts/v1beta/accounts.rb +14 -6
  46. data/proto_docs/google/shopping/merchant/accounts/v1beta/accountservices.rb +34 -0
  47. data/proto_docs/google/shopping/merchant/accounts/v1beta/autofeedsettings.rb +75 -0
  48. data/proto_docs/google/shopping/merchant/accounts/v1beta/businessinfo.rb +5 -0
  49. data/proto_docs/google/shopping/merchant/accounts/v1beta/shippingsettings.rb +5 -1
  50. data/proto_docs/google/shopping/merchant/accounts/v1beta/termsofservice.rb +4 -4
  51. data/proto_docs/google/shopping/merchant/accounts/v1beta/termsofserviceagreementstate.rb +3 -0
  52. metadata +29 -5
@@ -0,0 +1,529 @@
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/accounts/v1beta/autofeedsettings_pb"
21
+
22
+ module Google
23
+ module Shopping
24
+ module Merchant
25
+ module Accounts
26
+ module V1beta
27
+ module AutofeedSettingsService
28
+ ##
29
+ # Client for the AutofeedSettingsService service.
30
+ #
31
+ # Service to support
32
+ # [autofeed](https://support.google.com/merchants/answer/7538732) setting.
33
+ #
34
+ class Client
35
+ # @private
36
+ API_VERSION = ""
37
+
38
+ # @private
39
+ DEFAULT_ENDPOINT_TEMPLATE = "merchantapi.$UNIVERSE_DOMAIN$"
40
+
41
+ include Paths
42
+
43
+ # @private
44
+ attr_reader :autofeed_settings_service_stub
45
+
46
+ ##
47
+ # Configure the AutofeedSettingsService Client class.
48
+ #
49
+ # See {::Google::Shopping::Merchant::Accounts::V1beta::AutofeedSettingsService::Client::Configuration}
50
+ # for a description of the configuration fields.
51
+ #
52
+ # @example
53
+ #
54
+ # # Modify the configuration for all AutofeedSettingsService clients
55
+ # ::Google::Shopping::Merchant::Accounts::V1beta::AutofeedSettingsService::Client.configure do |config|
56
+ # config.timeout = 10.0
57
+ # end
58
+ #
59
+ # @yield [config] Configure the Client client.
60
+ # @yieldparam config [Client::Configuration]
61
+ #
62
+ # @return [Client::Configuration]
63
+ #
64
+ def self.configure
65
+ @configure ||= begin
66
+ namespace = ["Google", "Shopping", "Merchant", "Accounts", "V1beta"]
67
+ parent_config = while namespace.any?
68
+ parent_name = namespace.join "::"
69
+ parent_const = const_get parent_name
70
+ break parent_const.configure if parent_const.respond_to? :configure
71
+ namespace.pop
72
+ end
73
+ default_config = Client::Configuration.new parent_config
74
+
75
+ default_config.timeout = 60.0
76
+ default_config.retry_policy = {
77
+ initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14]
78
+ }
79
+
80
+ default_config
81
+ end
82
+ yield @configure if block_given?
83
+ @configure
84
+ end
85
+
86
+ ##
87
+ # Configure the AutofeedSettingsService Client instance.
88
+ #
89
+ # The configuration is set to the derived mode, meaning that values can be changed,
90
+ # but structural changes (adding new fields, etc.) are not allowed. Structural changes
91
+ # should be made on {Client.configure}.
92
+ #
93
+ # See {::Google::Shopping::Merchant::Accounts::V1beta::AutofeedSettingsService::Client::Configuration}
94
+ # for a description of the configuration fields.
95
+ #
96
+ # @yield [config] Configure the Client client.
97
+ # @yieldparam config [Client::Configuration]
98
+ #
99
+ # @return [Client::Configuration]
100
+ #
101
+ def configure
102
+ yield @config if block_given?
103
+ @config
104
+ end
105
+
106
+ ##
107
+ # The effective universe domain
108
+ #
109
+ # @return [String]
110
+ #
111
+ def universe_domain
112
+ @autofeed_settings_service_stub.universe_domain
113
+ end
114
+
115
+ ##
116
+ # Create a new AutofeedSettingsService client object.
117
+ #
118
+ # @example
119
+ #
120
+ # # Create a client using the default configuration
121
+ # client = ::Google::Shopping::Merchant::Accounts::V1beta::AutofeedSettingsService::Client.new
122
+ #
123
+ # # Create a client using a custom configuration
124
+ # client = ::Google::Shopping::Merchant::Accounts::V1beta::AutofeedSettingsService::Client.new do |config|
125
+ # config.timeout = 10.0
126
+ # end
127
+ #
128
+ # @yield [config] Configure the AutofeedSettingsService client.
129
+ # @yieldparam config [Client::Configuration]
130
+ #
131
+ def initialize
132
+ # These require statements are intentionally placed here to initialize
133
+ # the gRPC module only when it's required.
134
+ # See https://github.com/googleapis/toolkit/issues/446
135
+ require "gapic/grpc"
136
+ require "google/shopping/merchant/accounts/v1beta/autofeedsettings_services_pb"
137
+
138
+ # Create the configuration object
139
+ @config = Configuration.new Client.configure
140
+
141
+ # Yield the configuration if needed
142
+ yield @config if block_given?
143
+
144
+ # Create credentials
145
+ credentials = @config.credentials
146
+ # Use self-signed JWT if the endpoint is unchanged from default,
147
+ # but only if the default endpoint does not have a region prefix.
148
+ enable_self_signed_jwt = @config.endpoint.nil? ||
149
+ (@config.endpoint == Configuration::DEFAULT_ENDPOINT &&
150
+ !@config.endpoint.split(".").first.include?("-"))
151
+ credentials ||= Credentials.default scope: @config.scope,
152
+ enable_self_signed_jwt: enable_self_signed_jwt
153
+ if credentials.is_a?(::String) || credentials.is_a?(::Hash)
154
+ credentials = Credentials.new credentials, scope: @config.scope
155
+ end
156
+ @quota_project_id = @config.quota_project
157
+ @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id
158
+
159
+ @autofeed_settings_service_stub = ::Gapic::ServiceStub.new(
160
+ ::Google::Shopping::Merchant::Accounts::V1beta::AutofeedSettingsService::Stub,
161
+ credentials: credentials,
162
+ endpoint: @config.endpoint,
163
+ endpoint_template: DEFAULT_ENDPOINT_TEMPLATE,
164
+ universe_domain: @config.universe_domain,
165
+ channel_args: @config.channel_args,
166
+ interceptors: @config.interceptors,
167
+ channel_pool_config: @config.channel_pool
168
+ )
169
+ end
170
+
171
+ # Service calls
172
+
173
+ ##
174
+ # Retrieves the autofeed settings of an account.
175
+ #
176
+ # @overload get_autofeed_settings(request, options = nil)
177
+ # Pass arguments to `get_autofeed_settings` via a request object, either of type
178
+ # {::Google::Shopping::Merchant::Accounts::V1beta::GetAutofeedSettingsRequest} or an equivalent Hash.
179
+ #
180
+ # @param request [::Google::Shopping::Merchant::Accounts::V1beta::GetAutofeedSettingsRequest, ::Hash]
181
+ # A request object representing the call parameters. Required. To specify no
182
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
183
+ # @param options [::Gapic::CallOptions, ::Hash]
184
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
185
+ #
186
+ # @overload get_autofeed_settings(name: nil)
187
+ # Pass arguments to `get_autofeed_settings` via keyword arguments. Note that at
188
+ # least one keyword argument is required. To specify no parameters, or to keep all
189
+ # the default parameter values, pass an empty Hash as a request object (see above).
190
+ #
191
+ # @param name [::String]
192
+ # Required. The resource name of the autofeed settings.
193
+ # Format: `accounts/{account}/autofeedSettings`
194
+ #
195
+ # @yield [response, operation] Access the result along with the RPC operation
196
+ # @yieldparam response [::Google::Shopping::Merchant::Accounts::V1beta::AutofeedSettings]
197
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
198
+ #
199
+ # @return [::Google::Shopping::Merchant::Accounts::V1beta::AutofeedSettings]
200
+ #
201
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
202
+ #
203
+ # @example Basic example
204
+ # require "google/shopping/merchant/accounts/v1beta"
205
+ #
206
+ # # Create a client object. The client can be reused for multiple calls.
207
+ # client = Google::Shopping::Merchant::Accounts::V1beta::AutofeedSettingsService::Client.new
208
+ #
209
+ # # Create a request. To set request fields, pass in keyword arguments.
210
+ # request = Google::Shopping::Merchant::Accounts::V1beta::GetAutofeedSettingsRequest.new
211
+ #
212
+ # # Call the get_autofeed_settings method.
213
+ # result = client.get_autofeed_settings request
214
+ #
215
+ # # The returned object is of type Google::Shopping::Merchant::Accounts::V1beta::AutofeedSettings.
216
+ # p result
217
+ #
218
+ def get_autofeed_settings request, options = nil
219
+ raise ::ArgumentError, "request must be provided" if request.nil?
220
+
221
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1beta::GetAutofeedSettingsRequest
222
+
223
+ # Converts hash and nil to an options object
224
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
225
+
226
+ # Customize the options with defaults
227
+ metadata = @config.rpcs.get_autofeed_settings.metadata.to_h
228
+
229
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
230
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
231
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
232
+ gapic_version: ::Google::Shopping::Merchant::Accounts::V1beta::VERSION
233
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
234
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
235
+
236
+ header_params = {}
237
+ if request.name
238
+ header_params["name"] = request.name
239
+ end
240
+
241
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
242
+ metadata[:"x-goog-request-params"] ||= request_params_header
243
+
244
+ options.apply_defaults timeout: @config.rpcs.get_autofeed_settings.timeout,
245
+ metadata: metadata,
246
+ retry_policy: @config.rpcs.get_autofeed_settings.retry_policy
247
+
248
+ options.apply_defaults timeout: @config.timeout,
249
+ metadata: @config.metadata,
250
+ retry_policy: @config.retry_policy
251
+
252
+ @autofeed_settings_service_stub.call_rpc :get_autofeed_settings, request, options: options do |response, operation|
253
+ yield response, operation if block_given?
254
+ return response
255
+ end
256
+ rescue ::GRPC::BadStatus => e
257
+ raise ::Google::Cloud::Error.from_error(e)
258
+ end
259
+
260
+ ##
261
+ # Updates the autofeed settings of an account.
262
+ #
263
+ # @overload update_autofeed_settings(request, options = nil)
264
+ # Pass arguments to `update_autofeed_settings` via a request object, either of type
265
+ # {::Google::Shopping::Merchant::Accounts::V1beta::UpdateAutofeedSettingsRequest} or an equivalent Hash.
266
+ #
267
+ # @param request [::Google::Shopping::Merchant::Accounts::V1beta::UpdateAutofeedSettingsRequest, ::Hash]
268
+ # A request object representing the call parameters. Required. To specify no
269
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
270
+ # @param options [::Gapic::CallOptions, ::Hash]
271
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
272
+ #
273
+ # @overload update_autofeed_settings(autofeed_settings: nil, update_mask: nil)
274
+ # Pass arguments to `update_autofeed_settings` via keyword arguments. Note that at
275
+ # least one keyword argument is required. To specify no parameters, or to keep all
276
+ # the default parameter values, pass an empty Hash as a request object (see above).
277
+ #
278
+ # @param autofeed_settings [::Google::Shopping::Merchant::Accounts::V1beta::AutofeedSettings, ::Hash]
279
+ # Required. The new version of the autofeed setting.
280
+ # @param update_mask [::Google::Protobuf::FieldMask, ::Hash]
281
+ # Required. List of fields being updated.
282
+ #
283
+ # @yield [response, operation] Access the result along with the RPC operation
284
+ # @yieldparam response [::Google::Shopping::Merchant::Accounts::V1beta::AutofeedSettings]
285
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
286
+ #
287
+ # @return [::Google::Shopping::Merchant::Accounts::V1beta::AutofeedSettings]
288
+ #
289
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
290
+ #
291
+ # @example Basic example
292
+ # require "google/shopping/merchant/accounts/v1beta"
293
+ #
294
+ # # Create a client object. The client can be reused for multiple calls.
295
+ # client = Google::Shopping::Merchant::Accounts::V1beta::AutofeedSettingsService::Client.new
296
+ #
297
+ # # Create a request. To set request fields, pass in keyword arguments.
298
+ # request = Google::Shopping::Merchant::Accounts::V1beta::UpdateAutofeedSettingsRequest.new
299
+ #
300
+ # # Call the update_autofeed_settings method.
301
+ # result = client.update_autofeed_settings request
302
+ #
303
+ # # The returned object is of type Google::Shopping::Merchant::Accounts::V1beta::AutofeedSettings.
304
+ # p result
305
+ #
306
+ def update_autofeed_settings request, options = nil
307
+ raise ::ArgumentError, "request must be provided" if request.nil?
308
+
309
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1beta::UpdateAutofeedSettingsRequest
310
+
311
+ # Converts hash and nil to an options object
312
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
313
+
314
+ # Customize the options with defaults
315
+ metadata = @config.rpcs.update_autofeed_settings.metadata.to_h
316
+
317
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
318
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
319
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
320
+ gapic_version: ::Google::Shopping::Merchant::Accounts::V1beta::VERSION
321
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
322
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
323
+
324
+ header_params = {}
325
+ if request.autofeed_settings&.name
326
+ header_params["autofeed_settings.name"] = request.autofeed_settings.name
327
+ end
328
+
329
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
330
+ metadata[:"x-goog-request-params"] ||= request_params_header
331
+
332
+ options.apply_defaults timeout: @config.rpcs.update_autofeed_settings.timeout,
333
+ metadata: metadata,
334
+ retry_policy: @config.rpcs.update_autofeed_settings.retry_policy
335
+
336
+ options.apply_defaults timeout: @config.timeout,
337
+ metadata: @config.metadata,
338
+ retry_policy: @config.retry_policy
339
+
340
+ @autofeed_settings_service_stub.call_rpc :update_autofeed_settings, request, options: options do |response, operation|
341
+ yield response, operation if block_given?
342
+ return response
343
+ end
344
+ rescue ::GRPC::BadStatus => e
345
+ raise ::Google::Cloud::Error.from_error(e)
346
+ end
347
+
348
+ ##
349
+ # Configuration class for the AutofeedSettingsService API.
350
+ #
351
+ # This class represents the configuration for AutofeedSettingsService,
352
+ # providing control over timeouts, retry behavior, logging, transport
353
+ # parameters, and other low-level controls. Certain parameters can also be
354
+ # applied individually to specific RPCs. See
355
+ # {::Google::Shopping::Merchant::Accounts::V1beta::AutofeedSettingsService::Client::Configuration::Rpcs}
356
+ # for a list of RPCs that can be configured independently.
357
+ #
358
+ # Configuration can be applied globally to all clients, or to a single client
359
+ # on construction.
360
+ #
361
+ # @example
362
+ #
363
+ # # Modify the global config, setting the timeout for
364
+ # # get_autofeed_settings to 20 seconds,
365
+ # # and all remaining timeouts to 10 seconds.
366
+ # ::Google::Shopping::Merchant::Accounts::V1beta::AutofeedSettingsService::Client.configure do |config|
367
+ # config.timeout = 10.0
368
+ # config.rpcs.get_autofeed_settings.timeout = 20.0
369
+ # end
370
+ #
371
+ # # Apply the above configuration only to a new client.
372
+ # client = ::Google::Shopping::Merchant::Accounts::V1beta::AutofeedSettingsService::Client.new do |config|
373
+ # config.timeout = 10.0
374
+ # config.rpcs.get_autofeed_settings.timeout = 20.0
375
+ # end
376
+ #
377
+ # @!attribute [rw] endpoint
378
+ # A custom service endpoint, as a hostname or hostname:port. The default is
379
+ # nil, indicating to use the default endpoint in the current universe domain.
380
+ # @return [::String,nil]
381
+ # @!attribute [rw] credentials
382
+ # Credentials to send with calls. You may provide any of the following types:
383
+ # * (`String`) The path to a service account key file in JSON format
384
+ # * (`Hash`) A service account key as a Hash
385
+ # * (`Google::Auth::Credentials`) A googleauth credentials object
386
+ # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials))
387
+ # * (`Signet::OAuth2::Client`) A signet oauth2 client object
388
+ # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client))
389
+ # * (`GRPC::Core::Channel`) a gRPC channel with included credentials
390
+ # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object
391
+ # * (`nil`) indicating no credentials
392
+ # @return [::Object]
393
+ # @!attribute [rw] scope
394
+ # The OAuth scopes
395
+ # @return [::Array<::String>]
396
+ # @!attribute [rw] lib_name
397
+ # The library name as recorded in instrumentation and logging
398
+ # @return [::String]
399
+ # @!attribute [rw] lib_version
400
+ # The library version as recorded in instrumentation and logging
401
+ # @return [::String]
402
+ # @!attribute [rw] channel_args
403
+ # Extra parameters passed to the gRPC channel. Note: this is ignored if a
404
+ # `GRPC::Core::Channel` object is provided as the credential.
405
+ # @return [::Hash]
406
+ # @!attribute [rw] interceptors
407
+ # An array of interceptors that are run before calls are executed.
408
+ # @return [::Array<::GRPC::ClientInterceptor>]
409
+ # @!attribute [rw] timeout
410
+ # The call timeout in seconds.
411
+ # @return [::Numeric]
412
+ # @!attribute [rw] metadata
413
+ # Additional gRPC headers to be sent with the call.
414
+ # @return [::Hash{::Symbol=>::String}]
415
+ # @!attribute [rw] retry_policy
416
+ # The retry policy. The value is a hash with the following keys:
417
+ # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds.
418
+ # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds.
419
+ # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier.
420
+ # * `:retry_codes` (*type:* `Array<String>`) - The error codes that should
421
+ # trigger a retry.
422
+ # @return [::Hash]
423
+ # @!attribute [rw] quota_project
424
+ # A separate project against which to charge quota.
425
+ # @return [::String]
426
+ # @!attribute [rw] universe_domain
427
+ # The universe domain within which to make requests. This determines the
428
+ # default endpoint URL. The default value of nil uses the environment
429
+ # universe (usually the default "googleapis.com" universe).
430
+ # @return [::String,nil]
431
+ #
432
+ class Configuration
433
+ extend ::Gapic::Config
434
+
435
+ # @private
436
+ # The endpoint specific to the default "googleapis.com" universe. Deprecated.
437
+ DEFAULT_ENDPOINT = "merchantapi.googleapis.com"
438
+
439
+ config_attr :endpoint, nil, ::String, nil
440
+ config_attr :credentials, nil do |value|
441
+ allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Signet::OAuth2::Client, nil]
442
+ allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC
443
+ allowed.any? { |klass| klass === value }
444
+ end
445
+ config_attr :scope, nil, ::String, ::Array, nil
446
+ config_attr :lib_name, nil, ::String, nil
447
+ config_attr :lib_version, nil, ::String, nil
448
+ config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil)
449
+ config_attr :interceptors, nil, ::Array, nil
450
+ config_attr :timeout, nil, ::Numeric, nil
451
+ config_attr :metadata, nil, ::Hash, nil
452
+ config_attr :retry_policy, nil, ::Hash, ::Proc, nil
453
+ config_attr :quota_project, nil, ::String, nil
454
+ config_attr :universe_domain, nil, ::String, nil
455
+
456
+ # @private
457
+ def initialize parent_config = nil
458
+ @parent_config = parent_config unless parent_config.nil?
459
+
460
+ yield self if block_given?
461
+ end
462
+
463
+ ##
464
+ # Configurations for individual RPCs
465
+ # @return [Rpcs]
466
+ #
467
+ def rpcs
468
+ @rpcs ||= begin
469
+ parent_rpcs = nil
470
+ parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs)
471
+ Rpcs.new parent_rpcs
472
+ end
473
+ end
474
+
475
+ ##
476
+ # Configuration for the channel pool
477
+ # @return [::Gapic::ServiceStub::ChannelPool::Configuration]
478
+ #
479
+ def channel_pool
480
+ @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new
481
+ end
482
+
483
+ ##
484
+ # Configuration RPC class for the AutofeedSettingsService API.
485
+ #
486
+ # Includes fields providing the configuration for each RPC in this service.
487
+ # Each configuration object is of type `Gapic::Config::Method` and includes
488
+ # the following configuration fields:
489
+ #
490
+ # * `timeout` (*type:* `Numeric`) - The call timeout in seconds
491
+ # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers
492
+ # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields
493
+ # include the following keys:
494
+ # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds.
495
+ # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds.
496
+ # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier.
497
+ # * `:retry_codes` (*type:* `Array<String>`) - The error codes that should
498
+ # trigger a retry.
499
+ #
500
+ class Rpcs
501
+ ##
502
+ # RPC-specific configuration for `get_autofeed_settings`
503
+ # @return [::Gapic::Config::Method]
504
+ #
505
+ attr_reader :get_autofeed_settings
506
+ ##
507
+ # RPC-specific configuration for `update_autofeed_settings`
508
+ # @return [::Gapic::Config::Method]
509
+ #
510
+ attr_reader :update_autofeed_settings
511
+
512
+ # @private
513
+ def initialize parent_rpcs = nil
514
+ get_autofeed_settings_config = parent_rpcs.get_autofeed_settings if parent_rpcs.respond_to? :get_autofeed_settings
515
+ @get_autofeed_settings = ::Gapic::Config::Method.new get_autofeed_settings_config
516
+ update_autofeed_settings_config = parent_rpcs.update_autofeed_settings if parent_rpcs.respond_to? :update_autofeed_settings
517
+ @update_autofeed_settings = ::Gapic::Config::Method.new update_autofeed_settings_config
518
+
519
+ yield self if block_given?
520
+ end
521
+ end
522
+ end
523
+ end
524
+ end
525
+ end
526
+ end
527
+ end
528
+ end
529
+ end
@@ -0,0 +1,49 @@
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 "googleauth"
20
+
21
+ module Google
22
+ module Shopping
23
+ module Merchant
24
+ module Accounts
25
+ module V1beta
26
+ module AutofeedSettingsService
27
+ # Credentials for the AutofeedSettingsService API.
28
+ class Credentials < ::Google::Auth::Credentials
29
+ self.scope = [
30
+ "https://www.googleapis.com/auth/content"
31
+ ]
32
+ self.env_vars = [
33
+ "GOOGLE_CLOUD_CREDENTIALS",
34
+ "GOOGLE_CLOUD_KEYFILE",
35
+ "GCLOUD_KEYFILE",
36
+ "GOOGLE_CLOUD_CREDENTIALS_JSON",
37
+ "GOOGLE_CLOUD_KEYFILE_JSON",
38
+ "GCLOUD_KEYFILE_JSON"
39
+ ]
40
+ self.paths = [
41
+ "~/.config/google_cloud/application_default_credentials.json"
42
+ ]
43
+ end
44
+ end
45
+ end
46
+ end
47
+ end
48
+ end
49
+ end
@@ -0,0 +1,49 @@
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
+
20
+ module Google
21
+ module Shopping
22
+ module Merchant
23
+ module Accounts
24
+ module V1beta
25
+ module AutofeedSettingsService
26
+ # Path helper methods for the AutofeedSettingsService API.
27
+ module Paths
28
+ ##
29
+ # Create a fully-qualified AutofeedSettings resource string.
30
+ #
31
+ # The resource will be in the following format:
32
+ #
33
+ # `accounts/{account}/autofeedSettings`
34
+ #
35
+ # @param account [String]
36
+ #
37
+ # @return [::String]
38
+ def autofeed_settings_path account:
39
+ "accounts/#{account}/autofeedSettings"
40
+ end
41
+
42
+ extend self
43
+ end
44
+ end
45
+ end
46
+ end
47
+ end
48
+ end
49
+ end