google-shopping-merchant-reports-v1beta 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 (27) hide show
  1. checksums.yaml +4 -4
  2. data/.yardopts +12 -0
  3. data/AUTHENTICATION.md +149 -0
  4. data/README.md +144 -8
  5. data/lib/google/shopping/merchant/reports/v1beta/report_service/client.rb +426 -0
  6. data/lib/google/shopping/merchant/reports/v1beta/report_service/credentials.rb +49 -0
  7. data/lib/google/shopping/merchant/reports/v1beta/report_service/rest/client.rb +390 -0
  8. data/lib/google/shopping/merchant/reports/v1beta/report_service/rest/service_stub.rb +110 -0
  9. data/lib/google/shopping/merchant/reports/v1beta/report_service/rest.rb +54 -0
  10. data/lib/google/shopping/merchant/reports/v1beta/report_service.rb +57 -0
  11. data/lib/google/shopping/merchant/reports/v1beta/reports_pb.rb +84 -0
  12. data/lib/google/shopping/merchant/reports/v1beta/reports_services_pb.rb +50 -0
  13. data/lib/google/shopping/merchant/reports/v1beta/rest.rb +39 -0
  14. data/lib/google/shopping/merchant/reports/v1beta/version.rb +7 -2
  15. data/lib/google/shopping/merchant/reports/v1beta.rb +47 -0
  16. data/lib/google-shopping-merchant-reports-v1beta.rb +21 -0
  17. data/proto_docs/README.md +4 -0
  18. data/proto_docs/google/api/client.rb +381 -0
  19. data/proto_docs/google/api/field_behavior.rb +85 -0
  20. data/proto_docs/google/api/launch_stage.rb +71 -0
  21. data/proto_docs/google/api/resource.rb +222 -0
  22. data/proto_docs/google/protobuf/duration.rb +98 -0
  23. data/proto_docs/google/protobuf/timestamp.rb +127 -0
  24. data/proto_docs/google/shopping/merchant/reports/v1beta/reports.rb +1260 -0
  25. data/proto_docs/google/shopping/type/types.rb +175 -0
  26. data/proto_docs/google/type/date.rb +53 -0
  27. metadata +200 -12
@@ -0,0 +1,390 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Copyright 2023 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/reports/v1beta/reports_pb"
21
+ require "google/shopping/merchant/reports/v1beta/report_service/rest/service_stub"
22
+
23
+ module Google
24
+ module Shopping
25
+ module Merchant
26
+ module Reports
27
+ module V1beta
28
+ module ReportService
29
+ module Rest
30
+ ##
31
+ # REST client for the ReportService service.
32
+ #
33
+ # Service for retrieving reports and insights about your products, their
34
+ # performance, and their competitive environment on Google.
35
+ #
36
+ class Client
37
+ # @private
38
+ attr_reader :report_service_stub
39
+
40
+ ##
41
+ # Configure the ReportService Client class.
42
+ #
43
+ # See {::Google::Shopping::Merchant::Reports::V1beta::ReportService::Rest::Client::Configuration}
44
+ # for a description of the configuration fields.
45
+ #
46
+ # @example
47
+ #
48
+ # # Modify the configuration for all ReportService clients
49
+ # ::Google::Shopping::Merchant::Reports::V1beta::ReportService::Rest::Client.configure do |config|
50
+ # config.timeout = 10.0
51
+ # end
52
+ #
53
+ # @yield [config] Configure the Client client.
54
+ # @yieldparam config [Client::Configuration]
55
+ #
56
+ # @return [Client::Configuration]
57
+ #
58
+ def self.configure
59
+ @configure ||= begin
60
+ namespace = ["Google", "Shopping", "Merchant", "Reports", "V1beta"]
61
+ parent_config = while namespace.any?
62
+ parent_name = namespace.join "::"
63
+ parent_const = const_get parent_name
64
+ break parent_const.configure if parent_const.respond_to? :configure
65
+ namespace.pop
66
+ end
67
+ default_config = Client::Configuration.new parent_config
68
+
69
+ default_config.timeout = 60.0
70
+ default_config.retry_policy = {
71
+ initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14]
72
+ }
73
+
74
+ default_config
75
+ end
76
+ yield @configure if block_given?
77
+ @configure
78
+ end
79
+
80
+ ##
81
+ # Configure the ReportService Client instance.
82
+ #
83
+ # The configuration is set to the derived mode, meaning that values can be changed,
84
+ # but structural changes (adding new fields, etc.) are not allowed. Structural changes
85
+ # should be made on {Client.configure}.
86
+ #
87
+ # See {::Google::Shopping::Merchant::Reports::V1beta::ReportService::Rest::Client::Configuration}
88
+ # for a description of the configuration fields.
89
+ #
90
+ # @yield [config] Configure the Client client.
91
+ # @yieldparam config [Client::Configuration]
92
+ #
93
+ # @return [Client::Configuration]
94
+ #
95
+ def configure
96
+ yield @config if block_given?
97
+ @config
98
+ end
99
+
100
+ ##
101
+ # Create a new ReportService REST client object.
102
+ #
103
+ # @example
104
+ #
105
+ # # Create a client using the default configuration
106
+ # client = ::Google::Shopping::Merchant::Reports::V1beta::ReportService::Rest::Client.new
107
+ #
108
+ # # Create a client using a custom configuration
109
+ # client = ::Google::Shopping::Merchant::Reports::V1beta::ReportService::Rest::Client.new do |config|
110
+ # config.timeout = 10.0
111
+ # end
112
+ #
113
+ # @yield [config] Configure the ReportService client.
114
+ # @yieldparam config [Client::Configuration]
115
+ #
116
+ def initialize
117
+ # Create the configuration object
118
+ @config = Configuration.new Client.configure
119
+
120
+ # Yield the configuration if needed
121
+ yield @config if block_given?
122
+
123
+ # Create credentials
124
+ credentials = @config.credentials
125
+ # Use self-signed JWT if the endpoint is unchanged from default,
126
+ # but only if the default endpoint does not have a region prefix.
127
+ enable_self_signed_jwt = @config.endpoint == Configuration::DEFAULT_ENDPOINT &&
128
+ !@config.endpoint.split(".").first.include?("-")
129
+ credentials ||= Credentials.default scope: @config.scope,
130
+ enable_self_signed_jwt: enable_self_signed_jwt
131
+ if credentials.is_a?(::String) || credentials.is_a?(::Hash)
132
+ credentials = Credentials.new credentials, scope: @config.scope
133
+ end
134
+
135
+ @quota_project_id = @config.quota_project
136
+ @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id
137
+
138
+ @report_service_stub = ::Google::Shopping::Merchant::Reports::V1beta::ReportService::Rest::ServiceStub.new endpoint: @config.endpoint, credentials: credentials
139
+ end
140
+
141
+ # Service calls
142
+
143
+ ##
144
+ # Retrieves a report defined by a search query. The response might contain
145
+ # fewer rows than specified by `page_size`. Rely on `next_page_token` to
146
+ # determine if there are more rows to be requested.
147
+ #
148
+ # @overload search(request, options = nil)
149
+ # Pass arguments to `search` via a request object, either of type
150
+ # {::Google::Shopping::Merchant::Reports::V1beta::SearchRequest} or an equivalent Hash.
151
+ #
152
+ # @param request [::Google::Shopping::Merchant::Reports::V1beta::SearchRequest, ::Hash]
153
+ # A request object representing the call parameters. Required. To specify no
154
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
155
+ # @param options [::Gapic::CallOptions, ::Hash]
156
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
157
+ #
158
+ # @overload search(parent: nil, query: nil, page_size: nil, page_token: nil)
159
+ # Pass arguments to `search` via keyword arguments. Note that at
160
+ # least one keyword argument is required. To specify no parameters, or to keep all
161
+ # the default parameter values, pass an empty Hash as a request object (see above).
162
+ #
163
+ # @param parent [::String]
164
+ # Required. Id of the account making the call. Must be a standalone account
165
+ # or an MCA subaccount. Format: accounts/\\{account}
166
+ # @param query [::String]
167
+ # Required. Query that defines a report to be retrieved.
168
+ #
169
+ # For details on how to construct your query, see the Query Language
170
+ # guide. For the full list of available tables and fields, see the Available
171
+ # fields.
172
+ # @param page_size [::Integer]
173
+ # Optional. Number of `ReportRows` to retrieve in a single page. Defaults to
174
+ # the maximum of 1000. Values above 1000 are coerced to 1000.
175
+ # @param page_token [::String]
176
+ # Optional. Token of the page to retrieve. If not specified, the first page
177
+ # of results is returned. In order to request the next page of results, the
178
+ # value obtained from `next_page_token` in the previous response should be
179
+ # used.
180
+ # @yield [result, operation] Access the result along with the TransportOperation object
181
+ # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Shopping::Merchant::Reports::V1beta::ReportRow>]
182
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
183
+ #
184
+ # @return [::Gapic::Rest::PagedEnumerable<::Google::Shopping::Merchant::Reports::V1beta::ReportRow>]
185
+ #
186
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
187
+ #
188
+ # @example Basic example
189
+ # require "google/shopping/merchant/reports/v1beta"
190
+ #
191
+ # # Create a client object. The client can be reused for multiple calls.
192
+ # client = Google::Shopping::Merchant::Reports::V1beta::ReportService::Rest::Client.new
193
+ #
194
+ # # Create a request. To set request fields, pass in keyword arguments.
195
+ # request = Google::Shopping::Merchant::Reports::V1beta::SearchRequest.new
196
+ #
197
+ # # Call the search method.
198
+ # result = client.search request
199
+ #
200
+ # # The returned object is of type Gapic::PagedEnumerable. You can iterate
201
+ # # over elements, and API calls will be issued to fetch pages as needed.
202
+ # result.each do |item|
203
+ # # Each element is of type ::Google::Shopping::Merchant::Reports::V1beta::ReportRow.
204
+ # p item
205
+ # end
206
+ #
207
+ def search request, options = nil
208
+ raise ::ArgumentError, "request must be provided" if request.nil?
209
+
210
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Reports::V1beta::SearchRequest
211
+
212
+ # Converts hash and nil to an options object
213
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
214
+
215
+ # Customize the options with defaults
216
+ call_metadata = @config.rpcs.search.metadata.to_h
217
+
218
+ # Set x-goog-api-client and x-goog-user-project headers
219
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
220
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
221
+ gapic_version: ::Google::Shopping::Merchant::Reports::V1beta::VERSION,
222
+ transports_version_send: [:rest]
223
+
224
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
225
+
226
+ options.apply_defaults timeout: @config.rpcs.search.timeout,
227
+ metadata: call_metadata,
228
+ retry_policy: @config.rpcs.search.retry_policy
229
+
230
+ options.apply_defaults timeout: @config.timeout,
231
+ metadata: @config.metadata,
232
+ retry_policy: @config.retry_policy
233
+
234
+ @report_service_stub.search request, options do |result, operation|
235
+ result = ::Gapic::Rest::PagedEnumerable.new @report_service_stub, :search, "results", request, result, options
236
+ yield result, operation if block_given?
237
+ return result
238
+ end
239
+ rescue ::Gapic::Rest::Error => e
240
+ raise ::Google::Cloud::Error.from_error(e)
241
+ end
242
+
243
+ ##
244
+ # Configuration class for the ReportService REST API.
245
+ #
246
+ # This class represents the configuration for ReportService REST,
247
+ # providing control over timeouts, retry behavior, logging, transport
248
+ # parameters, and other low-level controls. Certain parameters can also be
249
+ # applied individually to specific RPCs. See
250
+ # {::Google::Shopping::Merchant::Reports::V1beta::ReportService::Rest::Client::Configuration::Rpcs}
251
+ # for a list of RPCs that can be configured independently.
252
+ #
253
+ # Configuration can be applied globally to all clients, or to a single client
254
+ # on construction.
255
+ #
256
+ # @example
257
+ #
258
+ # # Modify the global config, setting the timeout for
259
+ # # search to 20 seconds,
260
+ # # and all remaining timeouts to 10 seconds.
261
+ # ::Google::Shopping::Merchant::Reports::V1beta::ReportService::Rest::Client.configure do |config|
262
+ # config.timeout = 10.0
263
+ # config.rpcs.search.timeout = 20.0
264
+ # end
265
+ #
266
+ # # Apply the above configuration only to a new client.
267
+ # client = ::Google::Shopping::Merchant::Reports::V1beta::ReportService::Rest::Client.new do |config|
268
+ # config.timeout = 10.0
269
+ # config.rpcs.search.timeout = 20.0
270
+ # end
271
+ #
272
+ # @!attribute [rw] endpoint
273
+ # The hostname or hostname:port of the service endpoint.
274
+ # Defaults to `"merchantapi.googleapis.com"`.
275
+ # @return [::String]
276
+ # @!attribute [rw] credentials
277
+ # Credentials to send with calls. You may provide any of the following types:
278
+ # * (`String`) The path to a service account key file in JSON format
279
+ # * (`Hash`) A service account key as a Hash
280
+ # * (`Google::Auth::Credentials`) A googleauth credentials object
281
+ # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials))
282
+ # * (`Signet::OAuth2::Client`) A signet oauth2 client object
283
+ # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client))
284
+ # * (`nil`) indicating no credentials
285
+ # @return [::Object]
286
+ # @!attribute [rw] scope
287
+ # The OAuth scopes
288
+ # @return [::Array<::String>]
289
+ # @!attribute [rw] lib_name
290
+ # The library name as recorded in instrumentation and logging
291
+ # @return [::String]
292
+ # @!attribute [rw] lib_version
293
+ # The library version as recorded in instrumentation and logging
294
+ # @return [::String]
295
+ # @!attribute [rw] timeout
296
+ # The call timeout in seconds.
297
+ # @return [::Numeric]
298
+ # @!attribute [rw] metadata
299
+ # Additional headers to be sent with the call.
300
+ # @return [::Hash{::Symbol=>::String}]
301
+ # @!attribute [rw] retry_policy
302
+ # The retry policy. The value is a hash with the following keys:
303
+ # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds.
304
+ # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds.
305
+ # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier.
306
+ # * `:retry_codes` (*type:* `Array<String>`) - The error codes that should
307
+ # trigger a retry.
308
+ # @return [::Hash]
309
+ # @!attribute [rw] quota_project
310
+ # A separate project against which to charge quota.
311
+ # @return [::String]
312
+ #
313
+ class Configuration
314
+ extend ::Gapic::Config
315
+
316
+ DEFAULT_ENDPOINT = "merchantapi.googleapis.com"
317
+
318
+ config_attr :endpoint, DEFAULT_ENDPOINT, ::String
319
+ config_attr :credentials, nil do |value|
320
+ allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Signet::OAuth2::Client, nil]
321
+ allowed.any? { |klass| klass === value }
322
+ end
323
+ config_attr :scope, nil, ::String, ::Array, nil
324
+ config_attr :lib_name, nil, ::String, nil
325
+ config_attr :lib_version, nil, ::String, nil
326
+ config_attr :timeout, nil, ::Numeric, nil
327
+ config_attr :metadata, nil, ::Hash, nil
328
+ config_attr :retry_policy, nil, ::Hash, ::Proc, nil
329
+ config_attr :quota_project, nil, ::String, nil
330
+
331
+ # @private
332
+ def initialize parent_config = nil
333
+ @parent_config = parent_config unless parent_config.nil?
334
+
335
+ yield self if block_given?
336
+ end
337
+
338
+ ##
339
+ # Configurations for individual RPCs
340
+ # @return [Rpcs]
341
+ #
342
+ def rpcs
343
+ @rpcs ||= begin
344
+ parent_rpcs = nil
345
+ parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs)
346
+ Rpcs.new parent_rpcs
347
+ end
348
+ end
349
+
350
+ ##
351
+ # Configuration RPC class for the ReportService API.
352
+ #
353
+ # Includes fields providing the configuration for each RPC in this service.
354
+ # Each configuration object is of type `Gapic::Config::Method` and includes
355
+ # the following configuration fields:
356
+ #
357
+ # * `timeout` (*type:* `Numeric`) - The call timeout in seconds
358
+ # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers
359
+ # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields
360
+ # include the following keys:
361
+ # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds.
362
+ # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds.
363
+ # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier.
364
+ # * `:retry_codes` (*type:* `Array<String>`) - The error codes that should
365
+ # trigger a retry.
366
+ #
367
+ class Rpcs
368
+ ##
369
+ # RPC-specific configuration for `search`
370
+ # @return [::Gapic::Config::Method]
371
+ #
372
+ attr_reader :search
373
+
374
+ # @private
375
+ def initialize parent_rpcs = nil
376
+ search_config = parent_rpcs.search if parent_rpcs.respond_to? :search
377
+ @search = ::Gapic::Config::Method.new search_config
378
+
379
+ yield self if block_given?
380
+ end
381
+ end
382
+ end
383
+ end
384
+ end
385
+ end
386
+ end
387
+ end
388
+ end
389
+ end
390
+ end
@@ -0,0 +1,110 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Copyright 2023 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/reports/v1beta/reports_pb"
20
+
21
+ module Google
22
+ module Shopping
23
+ module Merchant
24
+ module Reports
25
+ module V1beta
26
+ module ReportService
27
+ module Rest
28
+ ##
29
+ # REST service stub for the ReportService service.
30
+ # Service stub contains baseline method implementations
31
+ # including transcoding, making the REST call, and deserialing the response.
32
+ #
33
+ class ServiceStub
34
+ def initialize endpoint:, credentials:
35
+ # These require statements are intentionally placed here to initialize
36
+ # the REST modules only when it's required.
37
+ require "gapic/rest"
38
+
39
+ @client_stub = ::Gapic::Rest::ClientStub.new endpoint: endpoint, credentials: credentials,
40
+ numeric_enums: true,
41
+ raise_faraday_errors: false
42
+ end
43
+
44
+ ##
45
+ # Baseline implementation for the search REST call
46
+ #
47
+ # @param request_pb [::Google::Shopping::Merchant::Reports::V1beta::SearchRequest]
48
+ # A request object representing the call parameters. Required.
49
+ # @param options [::Gapic::CallOptions]
50
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
51
+ #
52
+ # @yield [result, operation] Access the result along with the TransportOperation object
53
+ # @yieldparam result [::Google::Shopping::Merchant::Reports::V1beta::SearchResponse]
54
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
55
+ #
56
+ # @return [::Google::Shopping::Merchant::Reports::V1beta::SearchResponse]
57
+ # A result object deserialized from the server's reply
58
+ def search request_pb, options = nil
59
+ raise ::ArgumentError, "request must be provided" if request_pb.nil?
60
+
61
+ verb, uri, query_string_params, body = ServiceStub.transcode_search_request request_pb
62
+ query_string_params = if query_string_params.any?
63
+ query_string_params.to_h { |p| p.split "=", 2 }
64
+ else
65
+ {}
66
+ end
67
+
68
+ response = @client_stub.make_http_request(
69
+ verb,
70
+ uri: uri,
71
+ body: body || "",
72
+ params: query_string_params,
73
+ options: options
74
+ )
75
+ operation = ::Gapic::Rest::TransportOperation.new response
76
+ result = ::Google::Shopping::Merchant::Reports::V1beta::SearchResponse.decode_json response.body, ignore_unknown_fields: true
77
+
78
+ yield result, operation if block_given?
79
+ result
80
+ end
81
+
82
+ ##
83
+ # @private
84
+ #
85
+ # GRPC transcoding helper method for the search REST call
86
+ #
87
+ # @param request_pb [::Google::Shopping::Merchant::Reports::V1beta::SearchRequest]
88
+ # A request object representing the call parameters. Required.
89
+ # @return [Array(String, [String, nil], Hash{String => String})]
90
+ # Uri, Body, Query string parameters
91
+ def self.transcode_search_request request_pb
92
+ transcoder = Gapic::Rest::GrpcTranscoder.new
93
+ .with_bindings(
94
+ uri_method: :post,
95
+ uri_template: "/reports/v1beta/{parent}/reports:search",
96
+ body: "*",
97
+ matches: [
98
+ ["parent", %r{^accounts/[^/]+/?$}, false]
99
+ ]
100
+ )
101
+ transcoder.transcode request_pb
102
+ end
103
+ end
104
+ end
105
+ end
106
+ end
107
+ end
108
+ end
109
+ end
110
+ end
@@ -0,0 +1,54 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Copyright 2023 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/reports/v1beta/version"
24
+
25
+ require "google/shopping/merchant/reports/v1beta/report_service/credentials"
26
+ require "google/shopping/merchant/reports/v1beta/report_service/rest/client"
27
+
28
+ module Google
29
+ module Shopping
30
+ module Merchant
31
+ module Reports
32
+ module V1beta
33
+ ##
34
+ # Service for retrieving reports and insights about your products, their
35
+ # performance, and their competitive environment on Google.
36
+ #
37
+ # To load this service and instantiate a REST client:
38
+ #
39
+ # require "google/shopping/merchant/reports/v1beta/report_service/rest"
40
+ # client = ::Google::Shopping::Merchant::Reports::V1beta::ReportService::Rest::Client.new
41
+ #
42
+ module ReportService
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/reports/v1beta/report_service/rest/helpers" if ::File.file? helper_path
@@ -0,0 +1,57 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Copyright 2023 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/reports/v1beta/version"
24
+
25
+ require "google/shopping/merchant/reports/v1beta/report_service/credentials"
26
+ require "google/shopping/merchant/reports/v1beta/report_service/client"
27
+ require "google/shopping/merchant/reports/v1beta/report_service/rest"
28
+
29
+ module Google
30
+ module Shopping
31
+ module Merchant
32
+ module Reports
33
+ module V1beta
34
+ ##
35
+ # Service for retrieving reports and insights about your products, their
36
+ # performance, and their competitive environment on Google.
37
+ #
38
+ # @example Load this service and instantiate a gRPC client
39
+ #
40
+ # require "google/shopping/merchant/reports/v1beta/report_service"
41
+ # client = ::Google::Shopping::Merchant::Reports::V1beta::ReportService::Client.new
42
+ #
43
+ # @example Load this service and instantiate a REST client
44
+ #
45
+ # require "google/shopping/merchant/reports/v1beta/report_service/rest"
46
+ # client = ::Google::Shopping::Merchant::Reports::V1beta::ReportService::Rest::Client.new
47
+ #
48
+ module ReportService
49
+ end
50
+ end
51
+ end
52
+ end
53
+ end
54
+ end
55
+
56
+ helper_path = ::File.join __dir__, "report_service", "helpers.rb"
57
+ require "google/shopping/merchant/reports/v1beta/report_service/helpers" if ::File.file? helper_path