google-shopping-merchant-lfp-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 (59) 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/lfp/v1/lfp_inventory_service/client.rb +471 -0
  6. data/lib/google/shopping/merchant/lfp/v1/lfp_inventory_service/credentials.rb +49 -0
  7. data/lib/google/shopping/merchant/lfp/v1/lfp_inventory_service/paths.rb +70 -0
  8. data/lib/google/shopping/merchant/lfp/v1/lfp_inventory_service/rest/client.rb +438 -0
  9. data/lib/google/shopping/merchant/lfp/v1/lfp_inventory_service/rest/service_stub.rb +145 -0
  10. data/lib/google/shopping/merchant/lfp/v1/lfp_inventory_service/rest.rb +56 -0
  11. data/lib/google/shopping/merchant/lfp/v1/lfp_inventory_service.rb +59 -0
  12. data/lib/google/shopping/merchant/lfp/v1/lfp_merchant_state_service/client.rb +471 -0
  13. data/lib/google/shopping/merchant/lfp/v1/lfp_merchant_state_service/credentials.rb +49 -0
  14. data/lib/google/shopping/merchant/lfp/v1/lfp_merchant_state_service/paths.rb +52 -0
  15. data/lib/google/shopping/merchant/lfp/v1/lfp_merchant_state_service/rest/client.rb +438 -0
  16. data/lib/google/shopping/merchant/lfp/v1/lfp_merchant_state_service/rest/service_stub.rb +144 -0
  17. data/lib/google/shopping/merchant/lfp/v1/lfp_merchant_state_service/rest.rb +59 -0
  18. data/lib/google/shopping/merchant/lfp/v1/lfp_merchant_state_service.rb +62 -0
  19. data/lib/google/shopping/merchant/lfp/v1/lfp_sale_service/client.rb +469 -0
  20. data/lib/google/shopping/merchant/lfp/v1/lfp_sale_service/credentials.rb +49 -0
  21. data/lib/google/shopping/merchant/lfp/v1/lfp_sale_service/paths.rb +52 -0
  22. data/lib/google/shopping/merchant/lfp/v1/lfp_sale_service/rest/client.rb +436 -0
  23. data/lib/google/shopping/merchant/lfp/v1/lfp_sale_service/rest/service_stub.rb +145 -0
  24. data/lib/google/shopping/merchant/lfp/v1/lfp_sale_service/rest.rb +56 -0
  25. data/lib/google/shopping/merchant/lfp/v1/lfp_sale_service.rb +59 -0
  26. data/lib/google/shopping/merchant/lfp/v1/lfp_store_service/client.rb +771 -0
  27. data/lib/google/shopping/merchant/lfp/v1/lfp_store_service/credentials.rb +49 -0
  28. data/lib/google/shopping/merchant/lfp/v1/lfp_store_service/paths.rb +68 -0
  29. data/lib/google/shopping/merchant/lfp/v1/lfp_store_service/rest/client.rb +717 -0
  30. data/lib/google/shopping/merchant/lfp/v1/lfp_store_service/rest/service_stub.rb +328 -0
  31. data/lib/google/shopping/merchant/lfp/v1/lfp_store_service/rest.rb +56 -0
  32. data/lib/google/shopping/merchant/lfp/v1/lfp_store_service.rb +59 -0
  33. data/lib/google/shopping/merchant/lfp/v1/lfpinventory_pb.rb +54 -0
  34. data/lib/google/shopping/merchant/lfp/v1/lfpinventory_services_pb.rb +51 -0
  35. data/lib/google/shopping/merchant/lfp/v1/lfpmerchantstate_pb.rb +56 -0
  36. data/lib/google/shopping/merchant/lfp/v1/lfpmerchantstate_services_pb.rb +52 -0
  37. data/lib/google/shopping/merchant/lfp/v1/lfpsale_pb.rb +55 -0
  38. data/lib/google/shopping/merchant/lfp/v1/lfpsale_services_pb.rb +49 -0
  39. data/lib/google/shopping/merchant/lfp/v1/lfpstore_pb.rb +56 -0
  40. data/lib/google/shopping/merchant/lfp/v1/lfpstore_services_pb.rb +57 -0
  41. data/lib/google/shopping/merchant/lfp/v1/rest.rb +42 -0
  42. data/lib/google/shopping/merchant/lfp/v1/version.rb +7 -2
  43. data/lib/google/shopping/merchant/lfp/v1.rb +50 -0
  44. data/lib/google-shopping-merchant-lfp-v1.rb +21 -0
  45. data/proto_docs/README.md +4 -0
  46. data/proto_docs/google/api/client.rb +473 -0
  47. data/proto_docs/google/api/field_behavior.rb +85 -0
  48. data/proto_docs/google/api/field_info.rb +88 -0
  49. data/proto_docs/google/api/launch_stage.rb +71 -0
  50. data/proto_docs/google/api/resource.rb +227 -0
  51. data/proto_docs/google/protobuf/duration.rb +98 -0
  52. data/proto_docs/google/protobuf/empty.rb +34 -0
  53. data/proto_docs/google/protobuf/timestamp.rb +127 -0
  54. data/proto_docs/google/shopping/merchant/lfp/v1/lfpinventory.rb +113 -0
  55. data/proto_docs/google/shopping/merchant/lfp/v1/lfpmerchantstate.rb +181 -0
  56. data/proto_docs/google/shopping/merchant/lfp/v1/lfpsale.rb +96 -0
  57. data/proto_docs/google/shopping/merchant/lfp/v1/lfpstore.rb +185 -0
  58. data/proto_docs/google/shopping/type/types.rb +210 -0
  59. metadata +117 -9
@@ -0,0 +1,59 @@
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 "gapic/common"
20
+ require "gapic/config"
21
+ require "gapic/config/method"
22
+
23
+ require "google/shopping/merchant/lfp/v1/version"
24
+
25
+ require "google/shopping/merchant/lfp/v1/lfp_inventory_service/credentials"
26
+ require "google/shopping/merchant/lfp/v1/lfp_inventory_service/paths"
27
+ require "google/shopping/merchant/lfp/v1/lfp_inventory_service/client"
28
+ require "google/shopping/merchant/lfp/v1/lfp_inventory_service/rest"
29
+
30
+ module Google
31
+ module Shopping
32
+ module Merchant
33
+ module Lfp
34
+ module V1
35
+ ##
36
+ # Service for a [LFP
37
+ # partner](https://support.google.com/merchants/answer/7676652) to submit local
38
+ # inventories for a merchant.
39
+ #
40
+ # @example Load this service and instantiate a gRPC client
41
+ #
42
+ # require "google/shopping/merchant/lfp/v1/lfp_inventory_service"
43
+ # client = ::Google::Shopping::Merchant::Lfp::V1::LfpInventoryService::Client.new
44
+ #
45
+ # @example Load this service and instantiate a REST client
46
+ #
47
+ # require "google/shopping/merchant/lfp/v1/lfp_inventory_service/rest"
48
+ # client = ::Google::Shopping::Merchant::Lfp::V1::LfpInventoryService::Rest::Client.new
49
+ #
50
+ module LfpInventoryService
51
+ end
52
+ end
53
+ end
54
+ end
55
+ end
56
+ end
57
+
58
+ helper_path = ::File.join __dir__, "lfp_inventory_service", "helpers.rb"
59
+ require "google/shopping/merchant/lfp/v1/lfp_inventory_service/helpers" if ::File.file? helper_path
@@ -0,0 +1,471 @@
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/v1/lfpmerchantstate_pb"
21
+
22
+ module Google
23
+ module Shopping
24
+ module Merchant
25
+ module Lfp
26
+ module V1
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
+ # For information about onboarding a retailer, see [How to onboard a
36
+ # retailer](https://support.google.com/merchants/answer/15243706).
37
+ #
38
+ class Client
39
+ # @private
40
+ API_VERSION = ""
41
+
42
+ # @private
43
+ DEFAULT_ENDPOINT_TEMPLATE = "merchantapi.$UNIVERSE_DOMAIN$"
44
+
45
+ include Paths
46
+
47
+ # @private
48
+ attr_reader :lfp_merchant_state_service_stub
49
+
50
+ ##
51
+ # Configure the LfpMerchantStateService Client class.
52
+ #
53
+ # See {::Google::Shopping::Merchant::Lfp::V1::LfpMerchantStateService::Client::Configuration}
54
+ # for a description of the configuration fields.
55
+ #
56
+ # @example
57
+ #
58
+ # # Modify the configuration for all LfpMerchantStateService clients
59
+ # ::Google::Shopping::Merchant::Lfp::V1::LfpMerchantStateService::Client.configure do |config|
60
+ # config.timeout = 10.0
61
+ # end
62
+ #
63
+ # @yield [config] Configure the Client client.
64
+ # @yieldparam config [Client::Configuration]
65
+ #
66
+ # @return [Client::Configuration]
67
+ #
68
+ def self.configure
69
+ @configure ||= begin
70
+ namespace = ["Google", "Shopping", "Merchant", "Lfp", "V1"]
71
+ parent_config = while namespace.any?
72
+ parent_name = namespace.join "::"
73
+ parent_const = const_get parent_name
74
+ break parent_const.configure if parent_const.respond_to? :configure
75
+ namespace.pop
76
+ end
77
+ default_config = Client::Configuration.new parent_config
78
+
79
+ default_config.timeout = 60.0
80
+ default_config.retry_policy = {
81
+ initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14]
82
+ }
83
+
84
+ default_config
85
+ end
86
+ yield @configure if block_given?
87
+ @configure
88
+ end
89
+
90
+ ##
91
+ # Configure the LfpMerchantStateService Client instance.
92
+ #
93
+ # The configuration is set to the derived mode, meaning that values can be changed,
94
+ # but structural changes (adding new fields, etc.) are not allowed. Structural changes
95
+ # should be made on {Client.configure}.
96
+ #
97
+ # See {::Google::Shopping::Merchant::Lfp::V1::LfpMerchantStateService::Client::Configuration}
98
+ # for a description of the configuration fields.
99
+ #
100
+ # @yield [config] Configure the Client client.
101
+ # @yieldparam config [Client::Configuration]
102
+ #
103
+ # @return [Client::Configuration]
104
+ #
105
+ def configure
106
+ yield @config if block_given?
107
+ @config
108
+ end
109
+
110
+ ##
111
+ # The effective universe domain
112
+ #
113
+ # @return [String]
114
+ #
115
+ def universe_domain
116
+ @lfp_merchant_state_service_stub.universe_domain
117
+ end
118
+
119
+ ##
120
+ # Create a new LfpMerchantStateService client object.
121
+ #
122
+ # @example
123
+ #
124
+ # # Create a client using the default configuration
125
+ # client = ::Google::Shopping::Merchant::Lfp::V1::LfpMerchantStateService::Client.new
126
+ #
127
+ # # Create a client using a custom configuration
128
+ # client = ::Google::Shopping::Merchant::Lfp::V1::LfpMerchantStateService::Client.new do |config|
129
+ # config.timeout = 10.0
130
+ # end
131
+ #
132
+ # @yield [config] Configure the LfpMerchantStateService client.
133
+ # @yieldparam config [Client::Configuration]
134
+ #
135
+ def initialize
136
+ # These require statements are intentionally placed here to initialize
137
+ # the gRPC module only when it's required.
138
+ # See https://github.com/googleapis/toolkit/issues/446
139
+ require "gapic/grpc"
140
+ require "google/shopping/merchant/lfp/v1/lfpmerchantstate_services_pb"
141
+
142
+ # Create the configuration object
143
+ @config = Configuration.new Client.configure
144
+
145
+ # Yield the configuration if needed
146
+ yield @config if block_given?
147
+
148
+ # Create credentials
149
+ credentials = @config.credentials
150
+ # Use self-signed JWT if the endpoint is unchanged from default,
151
+ # but only if the default endpoint does not have a region prefix.
152
+ enable_self_signed_jwt = @config.endpoint.nil? ||
153
+ (@config.endpoint == Configuration::DEFAULT_ENDPOINT &&
154
+ !@config.endpoint.split(".").first.include?("-"))
155
+ credentials ||= Credentials.default scope: @config.scope,
156
+ enable_self_signed_jwt: enable_self_signed_jwt
157
+ if credentials.is_a?(::String) || credentials.is_a?(::Hash)
158
+ credentials = Credentials.new credentials, scope: @config.scope
159
+ end
160
+ @quota_project_id = @config.quota_project
161
+ @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id
162
+
163
+ @lfp_merchant_state_service_stub = ::Gapic::ServiceStub.new(
164
+ ::Google::Shopping::Merchant::Lfp::V1::LfpMerchantStateService::Stub,
165
+ credentials: credentials,
166
+ endpoint: @config.endpoint,
167
+ endpoint_template: DEFAULT_ENDPOINT_TEMPLATE,
168
+ universe_domain: @config.universe_domain,
169
+ channel_args: @config.channel_args,
170
+ interceptors: @config.interceptors,
171
+ channel_pool_config: @config.channel_pool,
172
+ logger: @config.logger
173
+ )
174
+
175
+ @lfp_merchant_state_service_stub.stub_logger&.info do |entry|
176
+ entry.set_system_name
177
+ entry.set_service
178
+ entry.message = "Created client for #{entry.service}"
179
+ entry.set_credentials_fields credentials
180
+ entry.set "customEndpoint", @config.endpoint if @config.endpoint
181
+ entry.set "defaultTimeout", @config.timeout if @config.timeout
182
+ entry.set "quotaProject", @quota_project_id if @quota_project_id
183
+ end
184
+ end
185
+
186
+ ##
187
+ # The logger used for request/response debug logging.
188
+ #
189
+ # @return [Logger]
190
+ #
191
+ def logger
192
+ @lfp_merchant_state_service_stub.logger
193
+ end
194
+
195
+ # Service calls
196
+
197
+ ##
198
+ # Gets the LFP state of a merchant
199
+ #
200
+ # @overload get_lfp_merchant_state(request, options = nil)
201
+ # Pass arguments to `get_lfp_merchant_state` via a request object, either of type
202
+ # {::Google::Shopping::Merchant::Lfp::V1::GetLfpMerchantStateRequest} or an equivalent Hash.
203
+ #
204
+ # @param request [::Google::Shopping::Merchant::Lfp::V1::GetLfpMerchantStateRequest, ::Hash]
205
+ # A request object representing the call parameters. Required. To specify no
206
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
207
+ # @param options [::Gapic::CallOptions, ::Hash]
208
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
209
+ #
210
+ # @overload get_lfp_merchant_state(name: nil)
211
+ # Pass arguments to `get_lfp_merchant_state` via keyword arguments. Note that at
212
+ # least one keyword argument is required. To specify no parameters, or to keep all
213
+ # the default parameter values, pass an empty Hash as a request object (see above).
214
+ #
215
+ # @param name [::String]
216
+ # Required. The name of the state to retrieve.
217
+ # Format: `accounts/{account}/lfpMerchantStates/{target_merchant}`. For
218
+ # example, `accounts/123456/lfpMerchantStates/567890`.
219
+ #
220
+ # @yield [response, operation] Access the result along with the RPC operation
221
+ # @yieldparam response [::Google::Shopping::Merchant::Lfp::V1::LfpMerchantState]
222
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
223
+ #
224
+ # @return [::Google::Shopping::Merchant::Lfp::V1::LfpMerchantState]
225
+ #
226
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
227
+ #
228
+ # @example Basic example
229
+ # require "google/shopping/merchant/lfp/v1"
230
+ #
231
+ # # Create a client object. The client can be reused for multiple calls.
232
+ # client = Google::Shopping::Merchant::Lfp::V1::LfpMerchantStateService::Client.new
233
+ #
234
+ # # Create a request. To set request fields, pass in keyword arguments.
235
+ # request = Google::Shopping::Merchant::Lfp::V1::GetLfpMerchantStateRequest.new
236
+ #
237
+ # # Call the get_lfp_merchant_state method.
238
+ # result = client.get_lfp_merchant_state request
239
+ #
240
+ # # The returned object is of type Google::Shopping::Merchant::Lfp::V1::LfpMerchantState.
241
+ # p result
242
+ #
243
+ def get_lfp_merchant_state request, options = nil
244
+ raise ::ArgumentError, "request must be provided" if request.nil?
245
+
246
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Lfp::V1::GetLfpMerchantStateRequest
247
+
248
+ # Converts hash and nil to an options object
249
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
250
+
251
+ # Customize the options with defaults
252
+ metadata = @config.rpcs.get_lfp_merchant_state.metadata.to_h
253
+
254
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
255
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
256
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
257
+ gapic_version: ::Google::Shopping::Merchant::Lfp::V1::VERSION
258
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
259
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
260
+
261
+ header_params = {}
262
+ if request.name
263
+ header_params["name"] = request.name
264
+ end
265
+
266
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
267
+ metadata[:"x-goog-request-params"] ||= request_params_header
268
+
269
+ options.apply_defaults timeout: @config.rpcs.get_lfp_merchant_state.timeout,
270
+ metadata: metadata,
271
+ retry_policy: @config.rpcs.get_lfp_merchant_state.retry_policy
272
+
273
+ options.apply_defaults timeout: @config.timeout,
274
+ metadata: @config.metadata,
275
+ retry_policy: @config.retry_policy
276
+
277
+ @lfp_merchant_state_service_stub.call_rpc :get_lfp_merchant_state, request, options: options do |response, operation|
278
+ yield response, operation if block_given?
279
+ end
280
+ rescue ::GRPC::BadStatus => e
281
+ raise ::Google::Cloud::Error.from_error(e)
282
+ end
283
+
284
+ ##
285
+ # Configuration class for the LfpMerchantStateService API.
286
+ #
287
+ # This class represents the configuration for LfpMerchantStateService,
288
+ # providing control over timeouts, retry behavior, logging, transport
289
+ # parameters, and other low-level controls. Certain parameters can also be
290
+ # applied individually to specific RPCs. See
291
+ # {::Google::Shopping::Merchant::Lfp::V1::LfpMerchantStateService::Client::Configuration::Rpcs}
292
+ # for a list of RPCs that can be configured independently.
293
+ #
294
+ # Configuration can be applied globally to all clients, or to a single client
295
+ # on construction.
296
+ #
297
+ # @example
298
+ #
299
+ # # Modify the global config, setting the timeout for
300
+ # # get_lfp_merchant_state to 20 seconds,
301
+ # # and all remaining timeouts to 10 seconds.
302
+ # ::Google::Shopping::Merchant::Lfp::V1::LfpMerchantStateService::Client.configure do |config|
303
+ # config.timeout = 10.0
304
+ # config.rpcs.get_lfp_merchant_state.timeout = 20.0
305
+ # end
306
+ #
307
+ # # Apply the above configuration only to a new client.
308
+ # client = ::Google::Shopping::Merchant::Lfp::V1::LfpMerchantStateService::Client.new do |config|
309
+ # config.timeout = 10.0
310
+ # config.rpcs.get_lfp_merchant_state.timeout = 20.0
311
+ # end
312
+ #
313
+ # @!attribute [rw] endpoint
314
+ # A custom service endpoint, as a hostname or hostname:port. The default is
315
+ # nil, indicating to use the default endpoint in the current universe domain.
316
+ # @return [::String,nil]
317
+ # @!attribute [rw] credentials
318
+ # Credentials to send with calls. You may provide any of the following types:
319
+ # * (`String`) The path to a service account key file in JSON format
320
+ # * (`Hash`) A service account key as a Hash
321
+ # * (`Google::Auth::Credentials`) A googleauth credentials object
322
+ # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials))
323
+ # * (`Signet::OAuth2::Client`) A signet oauth2 client object
324
+ # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client))
325
+ # * (`GRPC::Core::Channel`) a gRPC channel with included credentials
326
+ # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object
327
+ # * (`nil`) indicating no credentials
328
+ #
329
+ # Warning: If you accept a credential configuration (JSON file or Hash) from an
330
+ # external source for authentication to Google Cloud, you must validate it before
331
+ # providing it to a Google API client library. Providing an unvalidated credential
332
+ # configuration to Google APIs can compromise the security of your systems and data.
333
+ # For more information, refer to [Validate credential configurations from external
334
+ # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials).
335
+ # @return [::Object]
336
+ # @!attribute [rw] scope
337
+ # The OAuth scopes
338
+ # @return [::Array<::String>]
339
+ # @!attribute [rw] lib_name
340
+ # The library name as recorded in instrumentation and logging
341
+ # @return [::String]
342
+ # @!attribute [rw] lib_version
343
+ # The library version as recorded in instrumentation and logging
344
+ # @return [::String]
345
+ # @!attribute [rw] channel_args
346
+ # Extra parameters passed to the gRPC channel. Note: this is ignored if a
347
+ # `GRPC::Core::Channel` object is provided as the credential.
348
+ # @return [::Hash]
349
+ # @!attribute [rw] interceptors
350
+ # An array of interceptors that are run before calls are executed.
351
+ # @return [::Array<::GRPC::ClientInterceptor>]
352
+ # @!attribute [rw] timeout
353
+ # The call timeout in seconds.
354
+ # @return [::Numeric]
355
+ # @!attribute [rw] metadata
356
+ # Additional gRPC headers to be sent with the call.
357
+ # @return [::Hash{::Symbol=>::String}]
358
+ # @!attribute [rw] retry_policy
359
+ # The retry policy. The value is a hash with the following keys:
360
+ # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds.
361
+ # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds.
362
+ # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier.
363
+ # * `:retry_codes` (*type:* `Array<String>`) - The error codes that should
364
+ # trigger a retry.
365
+ # @return [::Hash]
366
+ # @!attribute [rw] quota_project
367
+ # A separate project against which to charge quota.
368
+ # @return [::String]
369
+ # @!attribute [rw] universe_domain
370
+ # The universe domain within which to make requests. This determines the
371
+ # default endpoint URL. The default value of nil uses the environment
372
+ # universe (usually the default "googleapis.com" universe).
373
+ # @return [::String,nil]
374
+ # @!attribute [rw] logger
375
+ # A custom logger to use for request/response debug logging, or the value
376
+ # `:default` (the default) to construct a default logger, or `nil` to
377
+ # explicitly disable logging.
378
+ # @return [::Logger,:default,nil]
379
+ #
380
+ class Configuration
381
+ extend ::Gapic::Config
382
+
383
+ # @private
384
+ # The endpoint specific to the default "googleapis.com" universe. Deprecated.
385
+ DEFAULT_ENDPOINT = "merchantapi.googleapis.com"
386
+
387
+ config_attr :endpoint, nil, ::String, nil
388
+ config_attr :credentials, nil do |value|
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
+ allowed.any? { |klass| klass === value }
392
+ end
393
+ config_attr :scope, nil, ::String, ::Array, nil
394
+ config_attr :lib_name, nil, ::String, nil
395
+ config_attr :lib_version, nil, ::String, nil
396
+ config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil)
397
+ config_attr :interceptors, nil, ::Array, nil
398
+ config_attr :timeout, nil, ::Numeric, nil
399
+ config_attr :metadata, nil, ::Hash, nil
400
+ config_attr :retry_policy, nil, ::Hash, ::Proc, nil
401
+ config_attr :quota_project, nil, ::String, nil
402
+ config_attr :universe_domain, nil, ::String, nil
403
+ config_attr :logger, :default, ::Logger, nil, :default
404
+
405
+ # @private
406
+ def initialize parent_config = nil
407
+ @parent_config = parent_config unless parent_config.nil?
408
+
409
+ yield self if block_given?
410
+ end
411
+
412
+ ##
413
+ # Configurations for individual RPCs
414
+ # @return [Rpcs]
415
+ #
416
+ def rpcs
417
+ @rpcs ||= begin
418
+ parent_rpcs = nil
419
+ parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs)
420
+ Rpcs.new parent_rpcs
421
+ end
422
+ end
423
+
424
+ ##
425
+ # Configuration for the channel pool
426
+ # @return [::Gapic::ServiceStub::ChannelPool::Configuration]
427
+ #
428
+ def channel_pool
429
+ @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new
430
+ end
431
+
432
+ ##
433
+ # Configuration RPC class for the LfpMerchantStateService API.
434
+ #
435
+ # Includes fields providing the configuration for each RPC in this service.
436
+ # Each configuration object is of type `Gapic::Config::Method` and includes
437
+ # the following configuration fields:
438
+ #
439
+ # * `timeout` (*type:* `Numeric`) - The call timeout in seconds
440
+ # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers
441
+ # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields
442
+ # include the following keys:
443
+ # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds.
444
+ # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds.
445
+ # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier.
446
+ # * `:retry_codes` (*type:* `Array<String>`) - The error codes that should
447
+ # trigger a retry.
448
+ #
449
+ class Rpcs
450
+ ##
451
+ # RPC-specific configuration for `get_lfp_merchant_state`
452
+ # @return [::Gapic::Config::Method]
453
+ #
454
+ attr_reader :get_lfp_merchant_state
455
+
456
+ # @private
457
+ def initialize parent_rpcs = nil
458
+ get_lfp_merchant_state_config = parent_rpcs.get_lfp_merchant_state if parent_rpcs.respond_to? :get_lfp_merchant_state
459
+ @get_lfp_merchant_state = ::Gapic::Config::Method.new get_lfp_merchant_state_config
460
+
461
+ yield self if block_given?
462
+ end
463
+ end
464
+ end
465
+ end
466
+ end
467
+ end
468
+ end
469
+ end
470
+ end
471
+ 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 V1
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 V1
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