google-shopping-merchant-quota-v1beta 0.a → 0.1.2

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,412 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Copyright 2024 Google LLC
4
+ #
5
+ # Licensed under the Apache License, Version 2.0 (the "License");
6
+ # you may not use this file except in compliance with the License.
7
+ # You may obtain a copy of the License at
8
+ #
9
+ # https://www.apache.org/licenses/LICENSE-2.0
10
+ #
11
+ # Unless required by applicable law or agreed to in writing, software
12
+ # distributed under the License is distributed on an "AS IS" BASIS,
13
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ # See the License for the specific language governing permissions and
15
+ # limitations under the License.
16
+
17
+ # Auto-generated by gapic-generator-ruby. DO NOT EDIT!
18
+
19
+ require "google/cloud/errors"
20
+ require "google/shopping/merchant/quota/v1beta/quota_pb"
21
+ require "google/shopping/merchant/quota/v1beta/quota_service/rest/service_stub"
22
+
23
+ module Google
24
+ module Shopping
25
+ module Merchant
26
+ module Quota
27
+ module V1beta
28
+ module QuotaService
29
+ module Rest
30
+ ##
31
+ # REST client for the QuotaService service.
32
+ #
33
+ # Service to get method call quota information per Merchant API method.
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 :quota_service_stub
46
+
47
+ ##
48
+ # Configure the QuotaService Client class.
49
+ #
50
+ # See {::Google::Shopping::Merchant::Quota::V1beta::QuotaService::Rest::Client::Configuration}
51
+ # for a description of the configuration fields.
52
+ #
53
+ # @example
54
+ #
55
+ # # Modify the configuration for all QuotaService clients
56
+ # ::Google::Shopping::Merchant::Quota::V1beta::QuotaService::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", "Quota", "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 QuotaService 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::Quota::V1beta::QuotaService::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
+ @quota_service_stub.universe_domain
114
+ end
115
+
116
+ ##
117
+ # Create a new QuotaService REST client object.
118
+ #
119
+ # @example
120
+ #
121
+ # # Create a client using the default configuration
122
+ # client = ::Google::Shopping::Merchant::Quota::V1beta::QuotaService::Rest::Client.new
123
+ #
124
+ # # Create a client using a custom configuration
125
+ # client = ::Google::Shopping::Merchant::Quota::V1beta::QuotaService::Rest::Client.new do |config|
126
+ # config.timeout = 10.0
127
+ # end
128
+ #
129
+ # @yield [config] Configure the QuotaService 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
+ @quota_service_stub = ::Google::Shopping::Merchant::Quota::V1beta::QuotaService::Rest::ServiceStub.new(
156
+ endpoint: @config.endpoint,
157
+ endpoint_template: DEFAULT_ENDPOINT_TEMPLATE,
158
+ universe_domain: @config.universe_domain,
159
+ credentials: credentials
160
+ )
161
+ end
162
+
163
+ # Service calls
164
+
165
+ ##
166
+ # Lists the daily call quota and usage per group for your Merchant
167
+ # Center account.
168
+ #
169
+ # @overload list_quota_groups(request, options = nil)
170
+ # Pass arguments to `list_quota_groups` via a request object, either of type
171
+ # {::Google::Shopping::Merchant::Quota::V1beta::ListQuotaGroupsRequest} or an equivalent Hash.
172
+ #
173
+ # @param request [::Google::Shopping::Merchant::Quota::V1beta::ListQuotaGroupsRequest, ::Hash]
174
+ # A request object representing the call parameters. Required. To specify no
175
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
176
+ # @param options [::Gapic::CallOptions, ::Hash]
177
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
178
+ #
179
+ # @overload list_quota_groups(parent: nil, page_size: nil, page_token: nil)
180
+ # Pass arguments to `list_quota_groups` via keyword arguments. Note that at
181
+ # least one keyword argument is required. To specify no parameters, or to keep all
182
+ # the default parameter values, pass an empty Hash as a request object (see above).
183
+ #
184
+ # @param parent [::String]
185
+ # Required. The merchant account who owns the collection of method quotas
186
+ # Format: accounts/\\{account}
187
+ # @param page_size [::Integer]
188
+ # Optional. The maximum number of quotas to return in the response, used
189
+ # for paging. Defaults to 500; values above 1000 will be coerced to 1000.
190
+ # @param page_token [::String]
191
+ # Optional. Token (if provided) to retrieve the subsequent page. All other
192
+ # parameters must match the original call that provided the page token.
193
+ # @yield [result, operation] Access the result along with the TransportOperation object
194
+ # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Shopping::Merchant::Quota::V1beta::QuotaGroup>]
195
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
196
+ #
197
+ # @return [::Gapic::Rest::PagedEnumerable<::Google::Shopping::Merchant::Quota::V1beta::QuotaGroup>]
198
+ #
199
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
200
+ #
201
+ # @example Basic example
202
+ # require "google/shopping/merchant/quota/v1beta"
203
+ #
204
+ # # Create a client object. The client can be reused for multiple calls.
205
+ # client = Google::Shopping::Merchant::Quota::V1beta::QuotaService::Rest::Client.new
206
+ #
207
+ # # Create a request. To set request fields, pass in keyword arguments.
208
+ # request = Google::Shopping::Merchant::Quota::V1beta::ListQuotaGroupsRequest.new
209
+ #
210
+ # # Call the list_quota_groups method.
211
+ # result = client.list_quota_groups request
212
+ #
213
+ # # The returned object is of type Gapic::PagedEnumerable. You can iterate
214
+ # # over elements, and API calls will be issued to fetch pages as needed.
215
+ # result.each do |item|
216
+ # # Each element is of type ::Google::Shopping::Merchant::Quota::V1beta::QuotaGroup.
217
+ # p item
218
+ # end
219
+ #
220
+ def list_quota_groups request, options = nil
221
+ raise ::ArgumentError, "request must be provided" if request.nil?
222
+
223
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Quota::V1beta::ListQuotaGroupsRequest
224
+
225
+ # Converts hash and nil to an options object
226
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
227
+
228
+ # Customize the options with defaults
229
+ call_metadata = @config.rpcs.list_quota_groups.metadata.to_h
230
+
231
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
232
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
233
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
234
+ gapic_version: ::Google::Shopping::Merchant::Quota::V1beta::VERSION,
235
+ transports_version_send: [:rest]
236
+
237
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
238
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
239
+
240
+ options.apply_defaults timeout: @config.rpcs.list_quota_groups.timeout,
241
+ metadata: call_metadata,
242
+ retry_policy: @config.rpcs.list_quota_groups.retry_policy
243
+
244
+ options.apply_defaults timeout: @config.timeout,
245
+ metadata: @config.metadata,
246
+ retry_policy: @config.retry_policy
247
+
248
+ @quota_service_stub.list_quota_groups request, options do |result, operation|
249
+ result = ::Gapic::Rest::PagedEnumerable.new @quota_service_stub, :list_quota_groups, "quota_groups", request, result, options
250
+ yield result, operation if block_given?
251
+ return result
252
+ end
253
+ rescue ::Gapic::Rest::Error => e
254
+ raise ::Google::Cloud::Error.from_error(e)
255
+ end
256
+
257
+ ##
258
+ # Configuration class for the QuotaService REST API.
259
+ #
260
+ # This class represents the configuration for QuotaService REST,
261
+ # providing control over timeouts, retry behavior, logging, transport
262
+ # parameters, and other low-level controls. Certain parameters can also be
263
+ # applied individually to specific RPCs. See
264
+ # {::Google::Shopping::Merchant::Quota::V1beta::QuotaService::Rest::Client::Configuration::Rpcs}
265
+ # for a list of RPCs that can be configured independently.
266
+ #
267
+ # Configuration can be applied globally to all clients, or to a single client
268
+ # on construction.
269
+ #
270
+ # @example
271
+ #
272
+ # # Modify the global config, setting the timeout for
273
+ # # list_quota_groups to 20 seconds,
274
+ # # and all remaining timeouts to 10 seconds.
275
+ # ::Google::Shopping::Merchant::Quota::V1beta::QuotaService::Rest::Client.configure do |config|
276
+ # config.timeout = 10.0
277
+ # config.rpcs.list_quota_groups.timeout = 20.0
278
+ # end
279
+ #
280
+ # # Apply the above configuration only to a new client.
281
+ # client = ::Google::Shopping::Merchant::Quota::V1beta::QuotaService::Rest::Client.new do |config|
282
+ # config.timeout = 10.0
283
+ # config.rpcs.list_quota_groups.timeout = 20.0
284
+ # end
285
+ #
286
+ # @!attribute [rw] endpoint
287
+ # A custom service endpoint, as a hostname or hostname:port. The default is
288
+ # nil, indicating to use the default endpoint in the current universe domain.
289
+ # @return [::String,nil]
290
+ # @!attribute [rw] credentials
291
+ # Credentials to send with calls. You may provide any of the following types:
292
+ # * (`String`) The path to a service account key file in JSON format
293
+ # * (`Hash`) A service account key as a Hash
294
+ # * (`Google::Auth::Credentials`) A googleauth credentials object
295
+ # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials))
296
+ # * (`Signet::OAuth2::Client`) A signet oauth2 client object
297
+ # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client))
298
+ # * (`nil`) indicating no credentials
299
+ # @return [::Object]
300
+ # @!attribute [rw] scope
301
+ # The OAuth scopes
302
+ # @return [::Array<::String>]
303
+ # @!attribute [rw] lib_name
304
+ # The library name as recorded in instrumentation and logging
305
+ # @return [::String]
306
+ # @!attribute [rw] lib_version
307
+ # The library version as recorded in instrumentation and logging
308
+ # @return [::String]
309
+ # @!attribute [rw] timeout
310
+ # The call timeout in seconds.
311
+ # @return [::Numeric]
312
+ # @!attribute [rw] metadata
313
+ # Additional headers to be sent with the call.
314
+ # @return [::Hash{::Symbol=>::String}]
315
+ # @!attribute [rw] retry_policy
316
+ # The retry policy. The value is a hash with the following keys:
317
+ # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds.
318
+ # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds.
319
+ # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier.
320
+ # * `:retry_codes` (*type:* `Array<String>`) - The error codes that should
321
+ # trigger a retry.
322
+ # @return [::Hash]
323
+ # @!attribute [rw] quota_project
324
+ # A separate project against which to charge quota.
325
+ # @return [::String]
326
+ # @!attribute [rw] universe_domain
327
+ # The universe domain within which to make requests. This determines the
328
+ # default endpoint URL. The default value of nil uses the environment
329
+ # universe (usually the default "googleapis.com" universe).
330
+ # @return [::String,nil]
331
+ #
332
+ class Configuration
333
+ extend ::Gapic::Config
334
+
335
+ # @private
336
+ # The endpoint specific to the default "googleapis.com" universe. Deprecated.
337
+ DEFAULT_ENDPOINT = "merchantapi.googleapis.com"
338
+
339
+ config_attr :endpoint, nil, ::String, nil
340
+ config_attr :credentials, nil do |value|
341
+ allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Signet::OAuth2::Client, nil]
342
+ allowed.any? { |klass| klass === value }
343
+ end
344
+ config_attr :scope, nil, ::String, ::Array, nil
345
+ config_attr :lib_name, nil, ::String, nil
346
+ config_attr :lib_version, nil, ::String, nil
347
+ config_attr :timeout, nil, ::Numeric, nil
348
+ config_attr :metadata, nil, ::Hash, nil
349
+ config_attr :retry_policy, nil, ::Hash, ::Proc, nil
350
+ config_attr :quota_project, nil, ::String, nil
351
+ config_attr :universe_domain, nil, ::String, nil
352
+
353
+ # @private
354
+ def initialize parent_config = nil
355
+ @parent_config = parent_config unless parent_config.nil?
356
+
357
+ yield self if block_given?
358
+ end
359
+
360
+ ##
361
+ # Configurations for individual RPCs
362
+ # @return [Rpcs]
363
+ #
364
+ def rpcs
365
+ @rpcs ||= begin
366
+ parent_rpcs = nil
367
+ parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs)
368
+ Rpcs.new parent_rpcs
369
+ end
370
+ end
371
+
372
+ ##
373
+ # Configuration RPC class for the QuotaService API.
374
+ #
375
+ # Includes fields providing the configuration for each RPC in this service.
376
+ # Each configuration object is of type `Gapic::Config::Method` and includes
377
+ # the following configuration fields:
378
+ #
379
+ # * `timeout` (*type:* `Numeric`) - The call timeout in seconds
380
+ # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers
381
+ # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields
382
+ # include the following keys:
383
+ # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds.
384
+ # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds.
385
+ # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier.
386
+ # * `:retry_codes` (*type:* `Array<String>`) - The error codes that should
387
+ # trigger a retry.
388
+ #
389
+ class Rpcs
390
+ ##
391
+ # RPC-specific configuration for `list_quota_groups`
392
+ # @return [::Gapic::Config::Method]
393
+ #
394
+ attr_reader :list_quota_groups
395
+
396
+ # @private
397
+ def initialize parent_rpcs = nil
398
+ list_quota_groups_config = parent_rpcs.list_quota_groups if parent_rpcs.respond_to? :list_quota_groups
399
+ @list_quota_groups = ::Gapic::Config::Method.new list_quota_groups_config
400
+
401
+ yield self if block_given?
402
+ end
403
+ end
404
+ end
405
+ end
406
+ end
407
+ end
408
+ end
409
+ end
410
+ end
411
+ end
412
+ end
@@ -0,0 +1,130 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Copyright 2024 Google LLC
4
+ #
5
+ # Licensed under the Apache License, Version 2.0 (the "License");
6
+ # you may not use this file except in compliance with the License.
7
+ # You may obtain a copy of the License at
8
+ #
9
+ # https://www.apache.org/licenses/LICENSE-2.0
10
+ #
11
+ # Unless required by applicable law or agreed to in writing, software
12
+ # distributed under the License is distributed on an "AS IS" BASIS,
13
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ # See the License for the specific language governing permissions and
15
+ # limitations under the License.
16
+
17
+ # Auto-generated by gapic-generator-ruby. DO NOT EDIT!
18
+
19
+ require "google/shopping/merchant/quota/v1beta/quota_pb"
20
+
21
+ module Google
22
+ module Shopping
23
+ module Merchant
24
+ module Quota
25
+ module V1beta
26
+ module QuotaService
27
+ module Rest
28
+ ##
29
+ # REST service stub for the QuotaService 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:, endpoint_template:, universe_domain:, 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,
40
+ endpoint_template: endpoint_template,
41
+ universe_domain: universe_domain,
42
+ credentials: credentials,
43
+ numeric_enums: true,
44
+ raise_faraday_errors: false
45
+ end
46
+
47
+ ##
48
+ # The effective universe domain
49
+ #
50
+ # @return [String]
51
+ #
52
+ def universe_domain
53
+ @client_stub.universe_domain
54
+ end
55
+
56
+ ##
57
+ # The effective endpoint
58
+ #
59
+ # @return [String]
60
+ #
61
+ def endpoint
62
+ @client_stub.endpoint
63
+ end
64
+
65
+ ##
66
+ # Baseline implementation for the list_quota_groups REST call
67
+ #
68
+ # @param request_pb [::Google::Shopping::Merchant::Quota::V1beta::ListQuotaGroupsRequest]
69
+ # A request object representing the call parameters. Required.
70
+ # @param options [::Gapic::CallOptions]
71
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
72
+ #
73
+ # @yield [result, operation] Access the result along with the TransportOperation object
74
+ # @yieldparam result [::Google::Shopping::Merchant::Quota::V1beta::ListQuotaGroupsResponse]
75
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
76
+ #
77
+ # @return [::Google::Shopping::Merchant::Quota::V1beta::ListQuotaGroupsResponse]
78
+ # A result object deserialized from the server's reply
79
+ def list_quota_groups request_pb, options = nil
80
+ raise ::ArgumentError, "request must be provided" if request_pb.nil?
81
+
82
+ verb, uri, query_string_params, body = ServiceStub.transcode_list_quota_groups_request request_pb
83
+ query_string_params = if query_string_params.any?
84
+ query_string_params.to_h { |p| p.split "=", 2 }
85
+ else
86
+ {}
87
+ end
88
+
89
+ response = @client_stub.make_http_request(
90
+ verb,
91
+ uri: uri,
92
+ body: body || "",
93
+ params: query_string_params,
94
+ options: options
95
+ )
96
+ operation = ::Gapic::Rest::TransportOperation.new response
97
+ result = ::Google::Shopping::Merchant::Quota::V1beta::ListQuotaGroupsResponse.decode_json response.body, ignore_unknown_fields: true
98
+
99
+ yield result, operation if block_given?
100
+ result
101
+ end
102
+
103
+ ##
104
+ # @private
105
+ #
106
+ # GRPC transcoding helper method for the list_quota_groups REST call
107
+ #
108
+ # @param request_pb [::Google::Shopping::Merchant::Quota::V1beta::ListQuotaGroupsRequest]
109
+ # A request object representing the call parameters. Required.
110
+ # @return [Array(String, [String, nil], Hash{String => String})]
111
+ # Uri, Body, Query string parameters
112
+ def self.transcode_list_quota_groups_request request_pb
113
+ transcoder = Gapic::Rest::GrpcTranscoder.new
114
+ .with_bindings(
115
+ uri_method: :get,
116
+ uri_template: "/quota/v1beta/{parent}/quotas",
117
+ matches: [
118
+ ["parent", %r{^accounts/[^/]+/?$}, false]
119
+ ]
120
+ )
121
+ transcoder.transcode request_pb
122
+ end
123
+ end
124
+ end
125
+ end
126
+ end
127
+ end
128
+ end
129
+ end
130
+ end
@@ -0,0 +1,54 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Copyright 2024 Google LLC
4
+ #
5
+ # Licensed under the Apache License, Version 2.0 (the "License");
6
+ # you may not use this file except in compliance with the License.
7
+ # You may obtain a copy of the License at
8
+ #
9
+ # https://www.apache.org/licenses/LICENSE-2.0
10
+ #
11
+ # Unless required by applicable law or agreed to in writing, software
12
+ # distributed under the License is distributed on an "AS IS" BASIS,
13
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ # See the License for the specific language governing permissions and
15
+ # limitations under the License.
16
+
17
+ # Auto-generated by gapic-generator-ruby. DO NOT EDIT!
18
+
19
+ require "gapic/rest"
20
+ require "gapic/config"
21
+ require "gapic/config/method"
22
+
23
+ require "google/shopping/merchant/quota/v1beta/version"
24
+
25
+ require "google/shopping/merchant/quota/v1beta/quota_service/credentials"
26
+ require "google/shopping/merchant/quota/v1beta/quota_service/paths"
27
+ require "google/shopping/merchant/quota/v1beta/quota_service/rest/client"
28
+
29
+ module Google
30
+ module Shopping
31
+ module Merchant
32
+ module Quota
33
+ module V1beta
34
+ ##
35
+ # Service to get method call quota information per Merchant API method.
36
+ #
37
+ # To load this service and instantiate a REST client:
38
+ #
39
+ # require "google/shopping/merchant/quota/v1beta/quota_service/rest"
40
+ # client = ::Google::Shopping::Merchant::Quota::V1beta::QuotaService::Rest::Client.new
41
+ #
42
+ module QuotaService
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/quota/v1beta/quota_service/rest/helpers" if ::File.file? helper_path
@@ -0,0 +1,57 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Copyright 2024 Google LLC
4
+ #
5
+ # Licensed under the Apache License, Version 2.0 (the "License");
6
+ # you may not use this file except in compliance with the License.
7
+ # You may obtain a copy of the License at
8
+ #
9
+ # https://www.apache.org/licenses/LICENSE-2.0
10
+ #
11
+ # Unless required by applicable law or agreed to in writing, software
12
+ # distributed under the License is distributed on an "AS IS" BASIS,
13
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ # See the License for the specific language governing permissions and
15
+ # limitations under the License.
16
+
17
+ # Auto-generated by gapic-generator-ruby. DO NOT EDIT!
18
+
19
+ require "gapic/common"
20
+ require "gapic/config"
21
+ require "gapic/config/method"
22
+
23
+ require "google/shopping/merchant/quota/v1beta/version"
24
+
25
+ require "google/shopping/merchant/quota/v1beta/quota_service/credentials"
26
+ require "google/shopping/merchant/quota/v1beta/quota_service/paths"
27
+ require "google/shopping/merchant/quota/v1beta/quota_service/client"
28
+ require "google/shopping/merchant/quota/v1beta/quota_service/rest"
29
+
30
+ module Google
31
+ module Shopping
32
+ module Merchant
33
+ module Quota
34
+ module V1beta
35
+ ##
36
+ # Service to get method call quota information per Merchant API method.
37
+ #
38
+ # @example Load this service and instantiate a gRPC client
39
+ #
40
+ # require "google/shopping/merchant/quota/v1beta/quota_service"
41
+ # client = ::Google::Shopping::Merchant::Quota::V1beta::QuotaService::Client.new
42
+ #
43
+ # @example Load this service and instantiate a REST client
44
+ #
45
+ # require "google/shopping/merchant/quota/v1beta/quota_service/rest"
46
+ # client = ::Google::Shopping::Merchant::Quota::V1beta::QuotaService::Rest::Client.new
47
+ #
48
+ module QuotaService
49
+ end
50
+ end
51
+ end
52
+ end
53
+ end
54
+ end
55
+
56
+ helper_path = ::File.join __dir__, "quota_service", "helpers.rb"
57
+ require "google/shopping/merchant/quota/v1beta/quota_service/helpers" if ::File.file? helper_path