google-shopping-merchant-lfp-v1beta 0.3.0 → 0.5.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 (23) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +2 -1
  3. data/lib/google/shopping/merchant/lfp/v1beta/lfp_inventory_service/client.rb +2 -2
  4. data/lib/google/shopping/merchant/lfp/v1beta/lfp_inventory_service/rest/client.rb +1 -1
  5. data/lib/google/shopping/merchant/lfp/v1beta/lfp_merchant_state_service/client.rb +467 -0
  6. data/lib/google/shopping/merchant/lfp/v1beta/lfp_merchant_state_service/credentials.rb +49 -0
  7. data/lib/google/shopping/merchant/lfp/v1beta/lfp_merchant_state_service/paths.rb +52 -0
  8. data/lib/google/shopping/merchant/lfp/v1beta/lfp_merchant_state_service/rest/client.rb +434 -0
  9. data/lib/google/shopping/merchant/lfp/v1beta/lfp_merchant_state_service/rest/service_stub.rb +144 -0
  10. data/lib/google/shopping/merchant/lfp/v1beta/lfp_merchant_state_service/rest.rb +56 -0
  11. data/lib/google/shopping/merchant/lfp/v1beta/lfp_merchant_state_service.rb +59 -0
  12. data/lib/google/shopping/merchant/lfp/v1beta/lfp_sale_service/client.rb +2 -2
  13. data/lib/google/shopping/merchant/lfp/v1beta/lfp_sale_service/rest/client.rb +1 -1
  14. data/lib/google/shopping/merchant/lfp/v1beta/lfp_store_service/client.rb +2 -2
  15. data/lib/google/shopping/merchant/lfp/v1beta/lfp_store_service/rest/client.rb +1 -1
  16. data/lib/google/shopping/merchant/lfp/v1beta/lfpmerchantstate_pb.rb +56 -0
  17. data/lib/google/shopping/merchant/lfp/v1beta/lfpmerchantstate_services_pb.rb +49 -0
  18. data/lib/google/shopping/merchant/lfp/v1beta/rest.rb +1 -0
  19. data/lib/google/shopping/merchant/lfp/v1beta/version.rb +1 -1
  20. data/lib/google/shopping/merchant/lfp/v1beta.rb +1 -0
  21. data/proto_docs/google/api/client.rb +14 -0
  22. data/proto_docs/google/shopping/merchant/lfp/v1beta/lfpmerchantstate.rb +179 -0
  23. metadata +33 -17
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: e951aa25c4a01b55a25a67dc2cb72e9e9bd32b67774111308404482e1a3f9f4d
4
- data.tar.gz: f4564b3252950aab0ef0b812bcde04e468be7fe7116e7df614605c9b355076ea
3
+ metadata.gz: 6532090a8e51608c35ff7c318a502dfef196907896f3a4bbba21bc5c98fd9acb
4
+ data.tar.gz: 9a148b4772c924ca82645efa635e8c2df91f2a6c7105e473f767273b4158b603
5
5
  SHA512:
6
- metadata.gz: 3e73f56dd1fd5fd44cce8c11b3c00a581c992faf98e08da147643876231e6ce4139c2e9171d1b20c14bb3f7cd63618e5d5fa8a6016f3f354c1de07e5205e5883
7
- data.tar.gz: ac586f12f5d1cddf7921f4c5090b84647b23fe33ad2afd74a2b342f23e143a5317a2388e52f15216efa10fda13bbaf03f38e5a9270ded433e819ba2f7f744454
6
+ metadata.gz: 6b2ac9e4d7ecde949c8e94c0a8e0f3baba0ad670be5df02613341f58389939ae535675c82556bec72c75c18ee6b0e084ca378af8f3e03598b4f163558ca5c382
7
+ data.tar.gz: b35ae686db427d38451f7980296b203b142eaff00859f1291c0e58687527960b8271e37b4de76cae21d2c24ee1e1661ef3f95224862de9159145c4faaa0cfa37
data/README.md CHANGED
@@ -1,7 +1,8 @@
1
1
  # Ruby Client for the Merchant V1BETA API
2
2
 
3
- Programmatically manage your Merchant Center accounts.
3
+ Programmatically manage your Merchant Center Accounts.
4
4
 
5
+ Merchant API consists of multiple Sub-APIs. Accounts Sub-API: Enables you to programmatically manage your accounts. Conversions Sub-API: Enables you to programmatically manage your conversion sources for a merchant account. Datasources Sub-API: Enables you to programmatically manage your datasources. Inventories Sub-API: This bundle enables you to programmatically manage your local and regional inventories. Local Feeds Partnerships Sub-API: This bundle enables LFP partners to submit local inventories for a merchant. Notifications Sub-API: This bundle enables you to programmatically manage your notification subscriptions. Products Sub-API: This bundle enables you to programmatically manage your products. Promotions Sub-API: This bundle enables you to programmatically manage your promotions for products. Quota Sub-API: This bundle enables you to list your quotas for all APIs you are using. Reports Sub-API: This bundle enables you to programmatically retrieve reports and insights about products, their performance and their competitive environment.
5
6
 
6
7
  https://github.com/googleapis/google-cloud-ruby
7
8
 
@@ -386,8 +386,8 @@ module Google
386
386
 
387
387
  config_attr :endpoint, nil, ::String, nil
388
388
  config_attr :credentials, nil do |value|
389
- allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Signet::OAuth2::Client, nil]
390
- allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC
389
+ allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil]
390
+ allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC::Core::Channel
391
391
  allowed.any? { |klass| klass === value }
392
392
  end
393
393
  config_attr :scope, nil, ::String, ::Array, nil
@@ -363,7 +363,7 @@ module Google
363
363
 
364
364
  config_attr :endpoint, nil, ::String, nil
365
365
  config_attr :credentials, nil do |value|
366
- allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Signet::OAuth2::Client, nil]
366
+ allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil]
367
367
  allowed.any? { |klass| klass === value }
368
368
  end
369
369
  config_attr :scope, nil, ::String, ::Array, nil
@@ -0,0 +1,467 @@
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/lfp/v1beta/lfpmerchantstate_pb"
21
+
22
+ module Google
23
+ module Shopping
24
+ module Merchant
25
+ module Lfp
26
+ module V1beta
27
+ module LfpMerchantStateService
28
+ ##
29
+ # Client for the LfpMerchantStateService service.
30
+ #
31
+ # Service for a [LFP
32
+ # partner](https://support.google.com/merchants/answer/7676652) to get the
33
+ # state of a merchant.
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 :lfp_merchant_state_service_stub
46
+
47
+ ##
48
+ # Configure the LfpMerchantStateService Client class.
49
+ #
50
+ # See {::Google::Shopping::Merchant::Lfp::V1beta::LfpMerchantStateService::Client::Configuration}
51
+ # for a description of the configuration fields.
52
+ #
53
+ # @example
54
+ #
55
+ # # Modify the configuration for all LfpMerchantStateService clients
56
+ # ::Google::Shopping::Merchant::Lfp::V1beta::LfpMerchantStateService::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", "Lfp", "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 LfpMerchantStateService 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::Lfp::V1beta::LfpMerchantStateService::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
+ @lfp_merchant_state_service_stub.universe_domain
114
+ end
115
+
116
+ ##
117
+ # Create a new LfpMerchantStateService client object.
118
+ #
119
+ # @example
120
+ #
121
+ # # Create a client using the default configuration
122
+ # client = ::Google::Shopping::Merchant::Lfp::V1beta::LfpMerchantStateService::Client.new
123
+ #
124
+ # # Create a client using a custom configuration
125
+ # client = ::Google::Shopping::Merchant::Lfp::V1beta::LfpMerchantStateService::Client.new do |config|
126
+ # config.timeout = 10.0
127
+ # end
128
+ #
129
+ # @yield [config] Configure the LfpMerchantStateService 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/lfp/v1beta/lfpmerchantstate_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
+ @lfp_merchant_state_service_stub = ::Gapic::ServiceStub.new(
161
+ ::Google::Shopping::Merchant::Lfp::V1beta::LfpMerchantStateService::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
+ @lfp_merchant_state_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
+ @lfp_merchant_state_service_stub.logger
190
+ end
191
+
192
+ # Service calls
193
+
194
+ ##
195
+ # Gets the LFP state of a merchant
196
+ #
197
+ # @overload get_lfp_merchant_state(request, options = nil)
198
+ # Pass arguments to `get_lfp_merchant_state` via a request object, either of type
199
+ # {::Google::Shopping::Merchant::Lfp::V1beta::GetLfpMerchantStateRequest} or an equivalent Hash.
200
+ #
201
+ # @param request [::Google::Shopping::Merchant::Lfp::V1beta::GetLfpMerchantStateRequest, ::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_lfp_merchant_state(name: nil)
208
+ # Pass arguments to `get_lfp_merchant_state` 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 state to retrieve.
214
+ # Format: `accounts/{account}/lfpMerchantStates/{target_merchant}`
215
+ #
216
+ # @yield [response, operation] Access the result along with the RPC operation
217
+ # @yieldparam response [::Google::Shopping::Merchant::Lfp::V1beta::LfpMerchantState]
218
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
219
+ #
220
+ # @return [::Google::Shopping::Merchant::Lfp::V1beta::LfpMerchantState]
221
+ #
222
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
223
+ #
224
+ # @example Basic example
225
+ # require "google/shopping/merchant/lfp/v1beta"
226
+ #
227
+ # # Create a client object. The client can be reused for multiple calls.
228
+ # client = Google::Shopping::Merchant::Lfp::V1beta::LfpMerchantStateService::Client.new
229
+ #
230
+ # # Create a request. To set request fields, pass in keyword arguments.
231
+ # request = Google::Shopping::Merchant::Lfp::V1beta::GetLfpMerchantStateRequest.new
232
+ #
233
+ # # Call the get_lfp_merchant_state method.
234
+ # result = client.get_lfp_merchant_state request
235
+ #
236
+ # # The returned object is of type Google::Shopping::Merchant::Lfp::V1beta::LfpMerchantState.
237
+ # p result
238
+ #
239
+ def get_lfp_merchant_state request, options = nil
240
+ raise ::ArgumentError, "request must be provided" if request.nil?
241
+
242
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Lfp::V1beta::GetLfpMerchantStateRequest
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_lfp_merchant_state.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::Lfp::V1beta::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_lfp_merchant_state.timeout,
266
+ metadata: metadata,
267
+ retry_policy: @config.rpcs.get_lfp_merchant_state.retry_policy
268
+
269
+ options.apply_defaults timeout: @config.timeout,
270
+ metadata: @config.metadata,
271
+ retry_policy: @config.retry_policy
272
+
273
+ @lfp_merchant_state_service_stub.call_rpc :get_lfp_merchant_state, 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
+ # Configuration class for the LfpMerchantStateService API.
282
+ #
283
+ # This class represents the configuration for LfpMerchantStateService,
284
+ # providing control over timeouts, retry behavior, logging, transport
285
+ # parameters, and other low-level controls. Certain parameters can also be
286
+ # applied individually to specific RPCs. See
287
+ # {::Google::Shopping::Merchant::Lfp::V1beta::LfpMerchantStateService::Client::Configuration::Rpcs}
288
+ # for a list of RPCs that can be configured independently.
289
+ #
290
+ # Configuration can be applied globally to all clients, or to a single client
291
+ # on construction.
292
+ #
293
+ # @example
294
+ #
295
+ # # Modify the global config, setting the timeout for
296
+ # # get_lfp_merchant_state to 20 seconds,
297
+ # # and all remaining timeouts to 10 seconds.
298
+ # ::Google::Shopping::Merchant::Lfp::V1beta::LfpMerchantStateService::Client.configure do |config|
299
+ # config.timeout = 10.0
300
+ # config.rpcs.get_lfp_merchant_state.timeout = 20.0
301
+ # end
302
+ #
303
+ # # Apply the above configuration only to a new client.
304
+ # client = ::Google::Shopping::Merchant::Lfp::V1beta::LfpMerchantStateService::Client.new do |config|
305
+ # config.timeout = 10.0
306
+ # config.rpcs.get_lfp_merchant_state.timeout = 20.0
307
+ # end
308
+ #
309
+ # @!attribute [rw] endpoint
310
+ # A custom service endpoint, as a hostname or hostname:port. The default is
311
+ # nil, indicating to use the default endpoint in the current universe domain.
312
+ # @return [::String,nil]
313
+ # @!attribute [rw] credentials
314
+ # Credentials to send with calls. You may provide any of the following types:
315
+ # * (`String`) The path to a service account key file in JSON format
316
+ # * (`Hash`) A service account key as a Hash
317
+ # * (`Google::Auth::Credentials`) A googleauth credentials object
318
+ # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials))
319
+ # * (`Signet::OAuth2::Client`) A signet oauth2 client object
320
+ # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client))
321
+ # * (`GRPC::Core::Channel`) a gRPC channel with included credentials
322
+ # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object
323
+ # * (`nil`) indicating no credentials
324
+ #
325
+ # Warning: If you accept a credential configuration (JSON file or Hash) from an
326
+ # external source for authentication to Google Cloud, you must validate it before
327
+ # providing it to a Google API client library. Providing an unvalidated credential
328
+ # configuration to Google APIs can compromise the security of your systems and data.
329
+ # For more information, refer to [Validate credential configurations from external
330
+ # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials).
331
+ # @return [::Object]
332
+ # @!attribute [rw] scope
333
+ # The OAuth scopes
334
+ # @return [::Array<::String>]
335
+ # @!attribute [rw] lib_name
336
+ # The library name as recorded in instrumentation and logging
337
+ # @return [::String]
338
+ # @!attribute [rw] lib_version
339
+ # The library version as recorded in instrumentation and logging
340
+ # @return [::String]
341
+ # @!attribute [rw] channel_args
342
+ # Extra parameters passed to the gRPC channel. Note: this is ignored if a
343
+ # `GRPC::Core::Channel` object is provided as the credential.
344
+ # @return [::Hash]
345
+ # @!attribute [rw] interceptors
346
+ # An array of interceptors that are run before calls are executed.
347
+ # @return [::Array<::GRPC::ClientInterceptor>]
348
+ # @!attribute [rw] timeout
349
+ # The call timeout in seconds.
350
+ # @return [::Numeric]
351
+ # @!attribute [rw] metadata
352
+ # Additional gRPC headers to be sent with the call.
353
+ # @return [::Hash{::Symbol=>::String}]
354
+ # @!attribute [rw] retry_policy
355
+ # The retry policy. The value is a hash with the following keys:
356
+ # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds.
357
+ # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds.
358
+ # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier.
359
+ # * `:retry_codes` (*type:* `Array<String>`) - The error codes that should
360
+ # trigger a retry.
361
+ # @return [::Hash]
362
+ # @!attribute [rw] quota_project
363
+ # A separate project against which to charge quota.
364
+ # @return [::String]
365
+ # @!attribute [rw] universe_domain
366
+ # The universe domain within which to make requests. This determines the
367
+ # default endpoint URL. The default value of nil uses the environment
368
+ # universe (usually the default "googleapis.com" universe).
369
+ # @return [::String,nil]
370
+ # @!attribute [rw] logger
371
+ # A custom logger to use for request/response debug logging, or the value
372
+ # `:default` (the default) to construct a default logger, or `nil` to
373
+ # explicitly disable logging.
374
+ # @return [::Logger,:default,nil]
375
+ #
376
+ class Configuration
377
+ extend ::Gapic::Config
378
+
379
+ # @private
380
+ # The endpoint specific to the default "googleapis.com" universe. Deprecated.
381
+ DEFAULT_ENDPOINT = "merchantapi.googleapis.com"
382
+
383
+ config_attr :endpoint, nil, ::String, nil
384
+ config_attr :credentials, nil do |value|
385
+ allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil]
386
+ allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC::Core::Channel
387
+ allowed.any? { |klass| klass === value }
388
+ end
389
+ config_attr :scope, nil, ::String, ::Array, nil
390
+ config_attr :lib_name, nil, ::String, nil
391
+ config_attr :lib_version, nil, ::String, nil
392
+ config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil)
393
+ config_attr :interceptors, nil, ::Array, nil
394
+ config_attr :timeout, nil, ::Numeric, nil
395
+ config_attr :metadata, nil, ::Hash, nil
396
+ config_attr :retry_policy, nil, ::Hash, ::Proc, nil
397
+ config_attr :quota_project, nil, ::String, nil
398
+ config_attr :universe_domain, nil, ::String, nil
399
+ config_attr :logger, :default, ::Logger, nil, :default
400
+
401
+ # @private
402
+ def initialize parent_config = nil
403
+ @parent_config = parent_config unless parent_config.nil?
404
+
405
+ yield self if block_given?
406
+ end
407
+
408
+ ##
409
+ # Configurations for individual RPCs
410
+ # @return [Rpcs]
411
+ #
412
+ def rpcs
413
+ @rpcs ||= begin
414
+ parent_rpcs = nil
415
+ parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs)
416
+ Rpcs.new parent_rpcs
417
+ end
418
+ end
419
+
420
+ ##
421
+ # Configuration for the channel pool
422
+ # @return [::Gapic::ServiceStub::ChannelPool::Configuration]
423
+ #
424
+ def channel_pool
425
+ @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new
426
+ end
427
+
428
+ ##
429
+ # Configuration RPC class for the LfpMerchantStateService API.
430
+ #
431
+ # Includes fields providing the configuration for each RPC in this service.
432
+ # Each configuration object is of type `Gapic::Config::Method` and includes
433
+ # the following configuration fields:
434
+ #
435
+ # * `timeout` (*type:* `Numeric`) - The call timeout in seconds
436
+ # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers
437
+ # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields
438
+ # include the following keys:
439
+ # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds.
440
+ # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds.
441
+ # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier.
442
+ # * `:retry_codes` (*type:* `Array<String>`) - The error codes that should
443
+ # trigger a retry.
444
+ #
445
+ class Rpcs
446
+ ##
447
+ # RPC-specific configuration for `get_lfp_merchant_state`
448
+ # @return [::Gapic::Config::Method]
449
+ #
450
+ attr_reader :get_lfp_merchant_state
451
+
452
+ # @private
453
+ def initialize parent_rpcs = nil
454
+ get_lfp_merchant_state_config = parent_rpcs.get_lfp_merchant_state if parent_rpcs.respond_to? :get_lfp_merchant_state
455
+ @get_lfp_merchant_state = ::Gapic::Config::Method.new get_lfp_merchant_state_config
456
+
457
+ yield self if block_given?
458
+ end
459
+ end
460
+ end
461
+ end
462
+ end
463
+ end
464
+ end
465
+ end
466
+ end
467
+ end
@@ -0,0 +1,49 @@
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 "googleauth"
20
+
21
+ module Google
22
+ module Shopping
23
+ module Merchant
24
+ module Lfp
25
+ module V1beta
26
+ module LfpMerchantStateService
27
+ # Credentials for the LfpMerchantStateService 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,52 @@
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
+
20
+ module Google
21
+ module Shopping
22
+ module Merchant
23
+ module Lfp
24
+ module V1beta
25
+ module LfpMerchantStateService
26
+ # Path helper methods for the LfpMerchantStateService API.
27
+ module Paths
28
+ ##
29
+ # Create a fully-qualified LfpMerchantState resource string.
30
+ #
31
+ # The resource will be in the following format:
32
+ #
33
+ # `accounts/{account}/lfpMerchantStates/{lfp_merchant_state}`
34
+ #
35
+ # @param account [String]
36
+ # @param lfp_merchant_state [String]
37
+ #
38
+ # @return [::String]
39
+ def lfp_merchant_state_path account:, lfp_merchant_state:
40
+ raise ::ArgumentError, "account cannot contain /" if account.to_s.include? "/"
41
+
42
+ "accounts/#{account}/lfpMerchantStates/#{lfp_merchant_state}"
43
+ end
44
+
45
+ extend self
46
+ end
47
+ end
48
+ end
49
+ end
50
+ end
51
+ end
52
+ end