google-shopping-merchant-issue_resolution-v1 0.a → 0.1.1

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 (36) 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/issue_resolution/v1/aggregate_product_statuses_service/client.rb +491 -0
  6. data/lib/google/shopping/merchant/issue_resolution/v1/aggregate_product_statuses_service/credentials.rb +49 -0
  7. data/lib/google/shopping/merchant/issue_resolution/v1/aggregate_product_statuses_service/paths.rb +49 -0
  8. data/lib/google/shopping/merchant/issue_resolution/v1/aggregate_product_statuses_service/rest/client.rb +458 -0
  9. data/lib/google/shopping/merchant/issue_resolution/v1/aggregate_product_statuses_service/rest/service_stub.rb +144 -0
  10. data/lib/google/shopping/merchant/issue_resolution/v1/aggregate_product_statuses_service/rest.rb +54 -0
  11. data/lib/google/shopping/merchant/issue_resolution/v1/aggregate_product_statuses_service.rb +57 -0
  12. data/lib/google/shopping/merchant/issue_resolution/v1/issue_resolution_service/client.rb +692 -0
  13. data/lib/google/shopping/merchant/issue_resolution/v1/issue_resolution_service/credentials.rb +49 -0
  14. data/lib/google/shopping/merchant/issue_resolution/v1/issue_resolution_service/paths.rb +66 -0
  15. data/lib/google/shopping/merchant/issue_resolution/v1/issue_resolution_service/rest/client.rb +645 -0
  16. data/lib/google/shopping/merchant/issue_resolution/v1/issue_resolution_service/rest/service_stub.rb +269 -0
  17. data/lib/google/shopping/merchant/issue_resolution/v1/issue_resolution_service/rest.rb +55 -0
  18. data/lib/google/shopping/merchant/issue_resolution/v1/issue_resolution_service.rb +58 -0
  19. data/lib/google/shopping/merchant/issue_resolution/v1/rest.rb +40 -0
  20. data/lib/google/shopping/merchant/issue_resolution/v1/version.rb +7 -2
  21. data/lib/google/shopping/merchant/issue_resolution/v1.rb +48 -0
  22. data/lib/google/shopping/merchant/issueresolution/v1/aggregateproductstatuses_pb.rb +56 -0
  23. data/lib/google/shopping/merchant/issueresolution/v1/aggregateproductstatuses_services_pb.rb +50 -0
  24. data/lib/google/shopping/merchant/issueresolution/v1/issueresolution_pb.rb +87 -0
  25. data/lib/google/shopping/merchant/issueresolution/v1/issueresolution_services_pb.rb +66 -0
  26. data/lib/google-shopping-merchant-issue_resolution-v1.rb +21 -0
  27. data/proto_docs/README.md +4 -0
  28. data/proto_docs/google/api/client.rb +473 -0
  29. data/proto_docs/google/api/field_behavior.rb +85 -0
  30. data/proto_docs/google/api/launch_stage.rb +71 -0
  31. data/proto_docs/google/api/resource.rb +227 -0
  32. data/proto_docs/google/protobuf/duration.rb +98 -0
  33. data/proto_docs/google/shopping/merchant/issueresolution/v1/aggregateproductstatuses.rb +173 -0
  34. data/proto_docs/google/shopping/merchant/issueresolution/v1/issueresolution.rb +952 -0
  35. data/proto_docs/google/shopping/type/types.rb +210 -0
  36. metadata +94 -9
@@ -0,0 +1,458 @@
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/issueresolution/v1/aggregateproductstatuses_pb"
21
+ require "google/shopping/merchant/issue_resolution/v1/aggregate_product_statuses_service/rest/service_stub"
22
+
23
+ module Google
24
+ module Shopping
25
+ module Merchant
26
+ module IssueResolution
27
+ module V1
28
+ module AggregateProductStatusesService
29
+ module Rest
30
+ ##
31
+ # REST client for the AggregateProductStatusesService service.
32
+ #
33
+ # Service to manage aggregate product statuses.
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 :aggregate_product_statuses_service_stub
46
+
47
+ ##
48
+ # Configure the AggregateProductStatusesService Client class.
49
+ #
50
+ # See {::Google::Shopping::Merchant::IssueResolution::V1::AggregateProductStatusesService::Rest::Client::Configuration}
51
+ # for a description of the configuration fields.
52
+ #
53
+ # @example
54
+ #
55
+ # # Modify the configuration for all AggregateProductStatusesService clients
56
+ # ::Google::Shopping::Merchant::IssueResolution::V1::AggregateProductStatusesService::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", "IssueResolution", "V1"]
68
+ parent_config = while namespace.any?
69
+ parent_name = namespace.join "::"
70
+ parent_const = const_get parent_name
71
+ break parent_const.configure if parent_const.respond_to? :configure
72
+ namespace.pop
73
+ end
74
+ default_config = Client::Configuration.new parent_config
75
+
76
+ default_config.timeout = 60.0
77
+ default_config.retry_policy = {
78
+ initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14]
79
+ }
80
+
81
+ default_config
82
+ end
83
+ yield @configure if block_given?
84
+ @configure
85
+ end
86
+
87
+ ##
88
+ # Configure the AggregateProductStatusesService 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::IssueResolution::V1::AggregateProductStatusesService::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
+ @aggregate_product_statuses_service_stub.universe_domain
114
+ end
115
+
116
+ ##
117
+ # Create a new AggregateProductStatusesService REST client object.
118
+ #
119
+ # @example
120
+ #
121
+ # # Create a client using the default configuration
122
+ # client = ::Google::Shopping::Merchant::IssueResolution::V1::AggregateProductStatusesService::Rest::Client.new
123
+ #
124
+ # # Create a client using a custom configuration
125
+ # client = ::Google::Shopping::Merchant::IssueResolution::V1::AggregateProductStatusesService::Rest::Client.new do |config|
126
+ # config.timeout = 10.0
127
+ # end
128
+ #
129
+ # @yield [config] Configure the AggregateProductStatusesService 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
+ @aggregate_product_statuses_service_stub = ::Google::Shopping::Merchant::IssueResolution::V1::AggregateProductStatusesService::Rest::ServiceStub.new(
156
+ endpoint: @config.endpoint,
157
+ endpoint_template: DEFAULT_ENDPOINT_TEMPLATE,
158
+ universe_domain: @config.universe_domain,
159
+ credentials: credentials,
160
+ logger: @config.logger
161
+ )
162
+
163
+ @aggregate_product_statuses_service_stub.logger(stub: true)&.info do |entry|
164
+ entry.set_system_name
165
+ entry.set_service
166
+ entry.message = "Created client for #{entry.service}"
167
+ entry.set_credentials_fields credentials
168
+ entry.set "customEndpoint", @config.endpoint if @config.endpoint
169
+ entry.set "defaultTimeout", @config.timeout if @config.timeout
170
+ entry.set "quotaProject", @quota_project_id if @quota_project_id
171
+ end
172
+ end
173
+
174
+ ##
175
+ # The logger used for request/response debug logging.
176
+ #
177
+ # @return [Logger]
178
+ #
179
+ def logger
180
+ @aggregate_product_statuses_service_stub.logger
181
+ end
182
+
183
+ # Service calls
184
+
185
+ ##
186
+ # Lists the `AggregateProductStatuses` resources for your merchant account.
187
+ # The response might contain fewer items than specified by `pageSize`.
188
+ # If `pageToken` was returned in previous request, it can be used to obtain
189
+ # additional results.
190
+ #
191
+ # @overload list_aggregate_product_statuses(request, options = nil)
192
+ # Pass arguments to `list_aggregate_product_statuses` via a request object, either of type
193
+ # {::Google::Shopping::Merchant::IssueResolution::V1::ListAggregateProductStatusesRequest} or an equivalent Hash.
194
+ #
195
+ # @param request [::Google::Shopping::Merchant::IssueResolution::V1::ListAggregateProductStatusesRequest, ::Hash]
196
+ # A request object representing the call parameters. Required. To specify no
197
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
198
+ # @param options [::Gapic::CallOptions, ::Hash]
199
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
200
+ #
201
+ # @overload list_aggregate_product_statuses(parent: nil, page_size: nil, page_token: nil, filter: nil)
202
+ # Pass arguments to `list_aggregate_product_statuses` via keyword arguments. Note that at
203
+ # least one keyword argument is required. To specify no parameters, or to keep all
204
+ # the default parameter values, pass an empty Hash as a request object (see above).
205
+ #
206
+ # @param parent [::String]
207
+ # Required. The account to list aggregate product statuses for.
208
+ # Format: `accounts/{account}`
209
+ # @param page_size [::Integer]
210
+ # Optional. The maximum number of aggregate product statuses to return. The
211
+ # service may return fewer than this value. If unspecified, at most 25
212
+ # aggregate product statuses are returned. The maximum value is 250; values
213
+ # above 250 are coerced to 250.
214
+ # @param page_token [::String]
215
+ # Optional. A page token, received from a previous
216
+ # `ListAggregateProductStatuses` call. Provide this to retrieve the
217
+ # subsequent page.
218
+ #
219
+ # When paginating, all other parameters provided to
220
+ # `ListAggregateProductStatuses` must match the call that provided the page
221
+ # token.
222
+ # @param filter [::String]
223
+ # Optional. A filter expression that filters the aggregate product statuses.
224
+ # Filtering is only supported by the `reporting_context` and `country` field.
225
+ # For example: `reporting_context = "SHOPPING_ADS" AND country = "US"`.
226
+ # @yield [result, operation] Access the result along with the TransportOperation object
227
+ # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Shopping::Merchant::IssueResolution::V1::AggregateProductStatus>]
228
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
229
+ #
230
+ # @return [::Gapic::Rest::PagedEnumerable<::Google::Shopping::Merchant::IssueResolution::V1::AggregateProductStatus>]
231
+ #
232
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
233
+ #
234
+ # @example Basic example
235
+ # require "google/shopping/merchant/issue_resolution/v1"
236
+ #
237
+ # # Create a client object. The client can be reused for multiple calls.
238
+ # client = Google::Shopping::Merchant::IssueResolution::V1::AggregateProductStatusesService::Rest::Client.new
239
+ #
240
+ # # Create a request. To set request fields, pass in keyword arguments.
241
+ # request = Google::Shopping::Merchant::IssueResolution::V1::ListAggregateProductStatusesRequest.new
242
+ #
243
+ # # Call the list_aggregate_product_statuses method.
244
+ # result = client.list_aggregate_product_statuses request
245
+ #
246
+ # # The returned object is of type Gapic::PagedEnumerable. You can iterate
247
+ # # over elements, and API calls will be issued to fetch pages as needed.
248
+ # result.each do |item|
249
+ # # Each element is of type ::Google::Shopping::Merchant::IssueResolution::V1::AggregateProductStatus.
250
+ # p item
251
+ # end
252
+ #
253
+ def list_aggregate_product_statuses request, options = nil
254
+ raise ::ArgumentError, "request must be provided" if request.nil?
255
+
256
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::IssueResolution::V1::ListAggregateProductStatusesRequest
257
+
258
+ # Converts hash and nil to an options object
259
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
260
+
261
+ # Customize the options with defaults
262
+ call_metadata = @config.rpcs.list_aggregate_product_statuses.metadata.to_h
263
+
264
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
265
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
266
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
267
+ gapic_version: ::Google::Shopping::Merchant::IssueResolution::V1::VERSION,
268
+ transports_version_send: [:rest]
269
+
270
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
271
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
272
+
273
+ options.apply_defaults timeout: @config.rpcs.list_aggregate_product_statuses.timeout,
274
+ metadata: call_metadata,
275
+ retry_policy: @config.rpcs.list_aggregate_product_statuses.retry_policy
276
+
277
+ options.apply_defaults timeout: @config.timeout,
278
+ metadata: @config.metadata,
279
+ retry_policy: @config.retry_policy
280
+
281
+ @aggregate_product_statuses_service_stub.list_aggregate_product_statuses request, options do |result, operation|
282
+ result = ::Gapic::Rest::PagedEnumerable.new @aggregate_product_statuses_service_stub, :list_aggregate_product_statuses, "aggregate_product_statuses", request, result, options
283
+ yield result, operation if block_given?
284
+ throw :response, result
285
+ end
286
+ rescue ::Gapic::Rest::Error => e
287
+ raise ::Google::Cloud::Error.from_error(e)
288
+ end
289
+
290
+ ##
291
+ # Configuration class for the AggregateProductStatusesService REST API.
292
+ #
293
+ # This class represents the configuration for AggregateProductStatusesService REST,
294
+ # providing control over timeouts, retry behavior, logging, transport
295
+ # parameters, and other low-level controls. Certain parameters can also be
296
+ # applied individually to specific RPCs. See
297
+ # {::Google::Shopping::Merchant::IssueResolution::V1::AggregateProductStatusesService::Rest::Client::Configuration::Rpcs}
298
+ # for a list of RPCs that can be configured independently.
299
+ #
300
+ # Configuration can be applied globally to all clients, or to a single client
301
+ # on construction.
302
+ #
303
+ # @example
304
+ #
305
+ # # Modify the global config, setting the timeout for
306
+ # # list_aggregate_product_statuses to 20 seconds,
307
+ # # and all remaining timeouts to 10 seconds.
308
+ # ::Google::Shopping::Merchant::IssueResolution::V1::AggregateProductStatusesService::Rest::Client.configure do |config|
309
+ # config.timeout = 10.0
310
+ # config.rpcs.list_aggregate_product_statuses.timeout = 20.0
311
+ # end
312
+ #
313
+ # # Apply the above configuration only to a new client.
314
+ # client = ::Google::Shopping::Merchant::IssueResolution::V1::AggregateProductStatusesService::Rest::Client.new do |config|
315
+ # config.timeout = 10.0
316
+ # config.rpcs.list_aggregate_product_statuses.timeout = 20.0
317
+ # end
318
+ #
319
+ # @!attribute [rw] endpoint
320
+ # A custom service endpoint, as a hostname or hostname:port. The default is
321
+ # nil, indicating to use the default endpoint in the current universe domain.
322
+ # @return [::String,nil]
323
+ # @!attribute [rw] credentials
324
+ # Credentials to send with calls. You may provide any of the following types:
325
+ # * (`String`) The path to a service account key file in JSON format
326
+ # * (`Hash`) A service account key as a Hash
327
+ # * (`Google::Auth::Credentials`) A googleauth credentials object
328
+ # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials))
329
+ # * (`Signet::OAuth2::Client`) A signet oauth2 client object
330
+ # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client))
331
+ # * (`nil`) indicating no credentials
332
+ #
333
+ # Warning: If you accept a credential configuration (JSON file or Hash) from an
334
+ # external source for authentication to Google Cloud, you must validate it before
335
+ # providing it to a Google API client library. Providing an unvalidated credential
336
+ # configuration to Google APIs can compromise the security of your systems and data.
337
+ # For more information, refer to [Validate credential configurations from external
338
+ # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials).
339
+ # @return [::Object]
340
+ # @!attribute [rw] scope
341
+ # The OAuth scopes
342
+ # @return [::Array<::String>]
343
+ # @!attribute [rw] lib_name
344
+ # The library name as recorded in instrumentation and logging
345
+ # @return [::String]
346
+ # @!attribute [rw] lib_version
347
+ # The library version as recorded in instrumentation and logging
348
+ # @return [::String]
349
+ # @!attribute [rw] timeout
350
+ # The call timeout in seconds.
351
+ # @return [::Numeric]
352
+ # @!attribute [rw] metadata
353
+ # Additional headers to be sent with the call.
354
+ # @return [::Hash{::Symbol=>::String}]
355
+ # @!attribute [rw] retry_policy
356
+ # The retry policy. The value is a hash with the following keys:
357
+ # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds.
358
+ # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds.
359
+ # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier.
360
+ # * `:retry_codes` (*type:* `Array<String>`) - The error codes that should
361
+ # trigger a retry.
362
+ # @return [::Hash]
363
+ # @!attribute [rw] quota_project
364
+ # A separate project against which to charge quota.
365
+ # @return [::String]
366
+ # @!attribute [rw] universe_domain
367
+ # The universe domain within which to make requests. This determines the
368
+ # default endpoint URL. The default value of nil uses the environment
369
+ # universe (usually the default "googleapis.com" universe).
370
+ # @return [::String,nil]
371
+ # @!attribute [rw] logger
372
+ # A custom logger to use for request/response debug logging, or the value
373
+ # `:default` (the default) to construct a default logger, or `nil` to
374
+ # explicitly disable logging.
375
+ # @return [::Logger,:default,nil]
376
+ #
377
+ class Configuration
378
+ extend ::Gapic::Config
379
+
380
+ # @private
381
+ # The endpoint specific to the default "googleapis.com" universe. Deprecated.
382
+ DEFAULT_ENDPOINT = "merchantapi.googleapis.com"
383
+
384
+ config_attr :endpoint, nil, ::String, nil
385
+ config_attr :credentials, nil do |value|
386
+ allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil]
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 :timeout, nil, ::Numeric, nil
393
+ config_attr :metadata, nil, ::Hash, nil
394
+ config_attr :retry_policy, nil, ::Hash, ::Proc, nil
395
+ config_attr :quota_project, nil, ::String, nil
396
+ config_attr :universe_domain, nil, ::String, nil
397
+ config_attr :logger, :default, ::Logger, nil, :default
398
+
399
+ # @private
400
+ def initialize parent_config = nil
401
+ @parent_config = parent_config unless parent_config.nil?
402
+
403
+ yield self if block_given?
404
+ end
405
+
406
+ ##
407
+ # Configurations for individual RPCs
408
+ # @return [Rpcs]
409
+ #
410
+ def rpcs
411
+ @rpcs ||= begin
412
+ parent_rpcs = nil
413
+ parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs)
414
+ Rpcs.new parent_rpcs
415
+ end
416
+ end
417
+
418
+ ##
419
+ # Configuration RPC class for the AggregateProductStatusesService API.
420
+ #
421
+ # Includes fields providing the configuration for each RPC in this service.
422
+ # Each configuration object is of type `Gapic::Config::Method` and includes
423
+ # the following configuration fields:
424
+ #
425
+ # * `timeout` (*type:* `Numeric`) - The call timeout in seconds
426
+ # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers
427
+ # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields
428
+ # include the following keys:
429
+ # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds.
430
+ # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds.
431
+ # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier.
432
+ # * `:retry_codes` (*type:* `Array<String>`) - The error codes that should
433
+ # trigger a retry.
434
+ #
435
+ class Rpcs
436
+ ##
437
+ # RPC-specific configuration for `list_aggregate_product_statuses`
438
+ # @return [::Gapic::Config::Method]
439
+ #
440
+ attr_reader :list_aggregate_product_statuses
441
+
442
+ # @private
443
+ def initialize parent_rpcs = nil
444
+ list_aggregate_product_statuses_config = parent_rpcs.list_aggregate_product_statuses if parent_rpcs.respond_to? :list_aggregate_product_statuses
445
+ @list_aggregate_product_statuses = ::Gapic::Config::Method.new list_aggregate_product_statuses_config
446
+
447
+ yield self if block_given?
448
+ end
449
+ end
450
+ end
451
+ end
452
+ end
453
+ end
454
+ end
455
+ end
456
+ end
457
+ end
458
+ end
@@ -0,0 +1,144 @@
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/shopping/merchant/issueresolution/v1/aggregateproductstatuses_pb"
20
+
21
+ module Google
22
+ module Shopping
23
+ module Merchant
24
+ module IssueResolution
25
+ module V1
26
+ module AggregateProductStatusesService
27
+ module Rest
28
+ ##
29
+ # REST service stub for the AggregateProductStatusesService service.
30
+ # Service stub contains baseline method implementations
31
+ # including transcoding, making the REST call, and deserialing the response.
32
+ #
33
+ class ServiceStub
34
+ # @private
35
+ def initialize endpoint:, endpoint_template:, universe_domain:, credentials:, logger:
36
+ # These require statements are intentionally placed here to initialize
37
+ # the REST modules only when it's required.
38
+ require "gapic/rest"
39
+
40
+ @client_stub = ::Gapic::Rest::ClientStub.new endpoint: endpoint,
41
+ endpoint_template: endpoint_template,
42
+ universe_domain: universe_domain,
43
+ credentials: credentials,
44
+ numeric_enums: true,
45
+ service_name: self.class,
46
+ raise_faraday_errors: false,
47
+ logger: logger
48
+ end
49
+
50
+ ##
51
+ # The effective universe domain
52
+ #
53
+ # @return [String]
54
+ #
55
+ def universe_domain
56
+ @client_stub.universe_domain
57
+ end
58
+
59
+ ##
60
+ # The effective endpoint
61
+ #
62
+ # @return [String]
63
+ #
64
+ def endpoint
65
+ @client_stub.endpoint
66
+ end
67
+
68
+ ##
69
+ # The logger used for request/response debug logging.
70
+ #
71
+ # @return [Logger]
72
+ #
73
+ def logger stub: false
74
+ stub ? @client_stub.stub_logger : @client_stub.logger
75
+ end
76
+
77
+ ##
78
+ # Baseline implementation for the list_aggregate_product_statuses REST call
79
+ #
80
+ # @param request_pb [::Google::Shopping::Merchant::IssueResolution::V1::ListAggregateProductStatusesRequest]
81
+ # A request object representing the call parameters. Required.
82
+ # @param options [::Gapic::CallOptions]
83
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
84
+ #
85
+ # @yield [result, operation] Access the result along with the TransportOperation object
86
+ # @yieldparam result [::Google::Shopping::Merchant::IssueResolution::V1::ListAggregateProductStatusesResponse]
87
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
88
+ #
89
+ # @return [::Google::Shopping::Merchant::IssueResolution::V1::ListAggregateProductStatusesResponse]
90
+ # A result object deserialized from the server's reply
91
+ def list_aggregate_product_statuses request_pb, options = nil
92
+ raise ::ArgumentError, "request must be provided" if request_pb.nil?
93
+
94
+ verb, uri, query_string_params, body = ServiceStub.transcode_list_aggregate_product_statuses_request request_pb
95
+ query_string_params = if query_string_params.any?
96
+ query_string_params.to_h { |p| p.split "=", 2 }
97
+ else
98
+ {}
99
+ end
100
+
101
+ response = @client_stub.make_http_request(
102
+ verb,
103
+ uri: uri,
104
+ body: body || "",
105
+ params: query_string_params,
106
+ method_name: "list_aggregate_product_statuses",
107
+ options: options
108
+ )
109
+ operation = ::Gapic::Rest::TransportOperation.new response
110
+ result = ::Google::Shopping::Merchant::IssueResolution::V1::ListAggregateProductStatusesResponse.decode_json response.body, ignore_unknown_fields: true
111
+ catch :response do
112
+ yield result, operation if block_given?
113
+ result
114
+ end
115
+ end
116
+
117
+ ##
118
+ # @private
119
+ #
120
+ # GRPC transcoding helper method for the list_aggregate_product_statuses REST call
121
+ #
122
+ # @param request_pb [::Google::Shopping::Merchant::IssueResolution::V1::ListAggregateProductStatusesRequest]
123
+ # A request object representing the call parameters. Required.
124
+ # @return [Array(String, [String, nil], Hash{String => String})]
125
+ # Uri, Body, Query string parameters
126
+ def self.transcode_list_aggregate_product_statuses_request request_pb
127
+ transcoder = Gapic::Rest::GrpcTranscoder.new
128
+ .with_bindings(
129
+ uri_method: :get,
130
+ uri_template: "/issueresolution/v1/{parent}/aggregateProductStatuses",
131
+ matches: [
132
+ ["parent", %r{^accounts/[^/]+/?$}, false]
133
+ ]
134
+ )
135
+ transcoder.transcode request_pb
136
+ end
137
+ end
138
+ end
139
+ end
140
+ end
141
+ end
142
+ end
143
+ end
144
+ end
@@ -0,0 +1,54 @@
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/rest"
20
+ require "gapic/config"
21
+ require "gapic/config/method"
22
+
23
+ require "google/shopping/merchant/issue_resolution/v1/version"
24
+
25
+ require "google/shopping/merchant/issue_resolution/v1/aggregate_product_statuses_service/credentials"
26
+ require "google/shopping/merchant/issue_resolution/v1/aggregate_product_statuses_service/paths"
27
+ require "google/shopping/merchant/issue_resolution/v1/aggregate_product_statuses_service/rest/client"
28
+
29
+ module Google
30
+ module Shopping
31
+ module Merchant
32
+ module IssueResolution
33
+ module V1
34
+ ##
35
+ # Service to manage aggregate product statuses.
36
+ #
37
+ # To load this service and instantiate a REST client:
38
+ #
39
+ # require "google/shopping/merchant/issue_resolution/v1/aggregate_product_statuses_service/rest"
40
+ # client = ::Google::Shopping::Merchant::IssueResolution::V1::AggregateProductStatusesService::Rest::Client.new
41
+ #
42
+ module AggregateProductStatusesService
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/issue_resolution/v1/aggregate_product_statuses_service/rest/helpers" if ::File.file? helper_path