google-shopping-css-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 (60) hide show
  1. checksums.yaml +4 -4
  2. data/.yardopts +12 -0
  3. data/AUTHENTICATION.md +122 -0
  4. data/README.md +144 -8
  5. data/lib/google/shopping/css/v1/account_labels_service/client.rb +736 -0
  6. data/lib/google/shopping/css/v1/account_labels_service/credentials.rb +47 -0
  7. data/lib/google/shopping/css/v1/account_labels_service/paths.rb +64 -0
  8. data/lib/google/shopping/css/v1/account_labels_service/rest/client.rb +682 -0
  9. data/lib/google/shopping/css/v1/account_labels_service/rest/service_stub.rb +307 -0
  10. data/lib/google/shopping/css/v1/account_labels_service/rest.rb +52 -0
  11. data/lib/google/shopping/css/v1/account_labels_service.rb +55 -0
  12. data/lib/google/shopping/css/v1/accounts_labels_pb.rb +54 -0
  13. data/lib/google/shopping/css/v1/accounts_labels_services_pb.rb +51 -0
  14. data/lib/google/shopping/css/v1/accounts_pb.rb +52 -0
  15. data/lib/google/shopping/css/v1/accounts_service/client.rb +659 -0
  16. data/lib/google/shopping/css/v1/accounts_service/credentials.rb +47 -0
  17. data/lib/google/shopping/css/v1/accounts_service/paths.rb +47 -0
  18. data/lib/google/shopping/css/v1/accounts_service/rest/client.rb +612 -0
  19. data/lib/google/shopping/css/v1/accounts_service/rest/service_stub.rb +247 -0
  20. data/lib/google/shopping/css/v1/accounts_service/rest.rb +52 -0
  21. data/lib/google/shopping/css/v1/accounts_service.rb +55 -0
  22. data/lib/google/shopping/css/v1/accounts_services_pb.rb +50 -0
  23. data/lib/google/shopping/css/v1/css_product_common_pb.rb +55 -0
  24. data/lib/google/shopping/css/v1/css_product_inputs_pb.rb +56 -0
  25. data/lib/google/shopping/css/v1/css_product_inputs_service/client.rb +546 -0
  26. data/lib/google/shopping/css/v1/css_product_inputs_service/credentials.rb +47 -0
  27. data/lib/google/shopping/css/v1/css_product_inputs_service/paths.rb +64 -0
  28. data/lib/google/shopping/css/v1/css_product_inputs_service/rest/client.rb +506 -0
  29. data/lib/google/shopping/css/v1/css_product_inputs_service/rest/service_stub.rb +188 -0
  30. data/lib/google/shopping/css/v1/css_product_inputs_service/rest.rb +53 -0
  31. data/lib/google/shopping/css/v1/css_product_inputs_service.rb +56 -0
  32. data/lib/google/shopping/css/v1/css_product_inputs_services_pb.rb +56 -0
  33. data/lib/google/shopping/css/v1/css_products_pb.rb +54 -0
  34. data/lib/google/shopping/css/v1/css_products_service/client.rb +554 -0
  35. data/lib/google/shopping/css/v1/css_products_service/credentials.rb +47 -0
  36. data/lib/google/shopping/css/v1/css_products_service/paths.rb +64 -0
  37. data/lib/google/shopping/css/v1/css_products_service/rest/client.rb +514 -0
  38. data/lib/google/shopping/css/v1/css_products_service/rest/service_stub.rb +187 -0
  39. data/lib/google/shopping/css/v1/css_products_service/rest.rb +53 -0
  40. data/lib/google/shopping/css/v1/css_products_service.rb +56 -0
  41. data/lib/google/shopping/css/v1/css_products_services_pb.rb +56 -0
  42. data/lib/google/shopping/css/v1/rest.rb +40 -0
  43. data/lib/google/shopping/css/v1/version.rb +8 -3
  44. data/lib/google/shopping/css/v1.rb +48 -0
  45. data/lib/google-shopping-css-v1.rb +21 -0
  46. data/proto_docs/README.md +4 -0
  47. data/proto_docs/google/api/client.rb +399 -0
  48. data/proto_docs/google/api/field_behavior.rb +85 -0
  49. data/proto_docs/google/api/launch_stage.rb +71 -0
  50. data/proto_docs/google/api/resource.rb +222 -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/css/v1/accounts.rb +168 -0
  55. data/proto_docs/google/shopping/css/v1/accounts_labels.rb +131 -0
  56. data/proto_docs/google/shopping/css/v1/css_product_common.rb +352 -0
  57. data/proto_docs/google/shopping/css/v1/css_product_inputs.rb +130 -0
  58. data/proto_docs/google/shopping/css/v1/css_products.rb +109 -0
  59. data/proto_docs/google/shopping/type/types.rb +210 -0
  60. metadata +123 -13
@@ -0,0 +1,514 @@
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/css/v1/css_products_pb"
21
+ require "google/shopping/css/v1/css_products_service/rest/service_stub"
22
+
23
+ module Google
24
+ module Shopping
25
+ module Css
26
+ module V1
27
+ module CssProductsService
28
+ module Rest
29
+ ##
30
+ # REST client for the CssProductsService service.
31
+ #
32
+ # Service for doing get and list on Css Products(a.k.a Aggregate Offers
33
+ # internally).
34
+ #
35
+ class Client
36
+ # @private
37
+ API_VERSION = ""
38
+
39
+ # @private
40
+ DEFAULT_ENDPOINT_TEMPLATE = "css.$UNIVERSE_DOMAIN$"
41
+
42
+ include Paths
43
+
44
+ # @private
45
+ attr_reader :css_products_service_stub
46
+
47
+ ##
48
+ # Configure the CssProductsService Client class.
49
+ #
50
+ # See {::Google::Shopping::Css::V1::CssProductsService::Rest::Client::Configuration}
51
+ # for a description of the configuration fields.
52
+ #
53
+ # @example
54
+ #
55
+ # # Modify the configuration for all CssProductsService clients
56
+ # ::Google::Shopping::Css::V1::CssProductsService::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", "Css", "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.rpcs.get_css_product.timeout = 60.0
77
+ default_config.rpcs.get_css_product.retry_policy = {
78
+ initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14]
79
+ }
80
+
81
+ default_config.rpcs.list_css_products.timeout = 60.0
82
+ default_config.rpcs.list_css_products.retry_policy = {
83
+ initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14]
84
+ }
85
+
86
+ default_config
87
+ end
88
+ yield @configure if block_given?
89
+ @configure
90
+ end
91
+
92
+ ##
93
+ # Configure the CssProductsService Client instance.
94
+ #
95
+ # The configuration is set to the derived mode, meaning that values can be changed,
96
+ # but structural changes (adding new fields, etc.) are not allowed. Structural changes
97
+ # should be made on {Client.configure}.
98
+ #
99
+ # See {::Google::Shopping::Css::V1::CssProductsService::Rest::Client::Configuration}
100
+ # for a description of the configuration fields.
101
+ #
102
+ # @yield [config] Configure the Client client.
103
+ # @yieldparam config [Client::Configuration]
104
+ #
105
+ # @return [Client::Configuration]
106
+ #
107
+ def configure
108
+ yield @config if block_given?
109
+ @config
110
+ end
111
+
112
+ ##
113
+ # The effective universe domain
114
+ #
115
+ # @return [String]
116
+ #
117
+ def universe_domain
118
+ @css_products_service_stub.universe_domain
119
+ end
120
+
121
+ ##
122
+ # Create a new CssProductsService REST client object.
123
+ #
124
+ # @example
125
+ #
126
+ # # Create a client using the default configuration
127
+ # client = ::Google::Shopping::Css::V1::CssProductsService::Rest::Client.new
128
+ #
129
+ # # Create a client using a custom configuration
130
+ # client = ::Google::Shopping::Css::V1::CssProductsService::Rest::Client.new do |config|
131
+ # config.timeout = 10.0
132
+ # end
133
+ #
134
+ # @yield [config] Configure the CssProductsService client.
135
+ # @yieldparam config [Client::Configuration]
136
+ #
137
+ def initialize
138
+ # Create the configuration object
139
+ @config = Configuration.new Client.configure
140
+
141
+ # Yield the configuration if needed
142
+ yield @config if block_given?
143
+
144
+ # Create credentials
145
+ credentials = @config.credentials
146
+ # Use self-signed JWT if the endpoint is unchanged from default,
147
+ # but only if the default endpoint does not have a region prefix.
148
+ enable_self_signed_jwt = @config.endpoint.nil? ||
149
+ (@config.endpoint == Configuration::DEFAULT_ENDPOINT &&
150
+ !@config.endpoint.split(".").first.include?("-"))
151
+ credentials ||= Credentials.default scope: @config.scope,
152
+ enable_self_signed_jwt: enable_self_signed_jwt
153
+ if credentials.is_a?(::String) || credentials.is_a?(::Hash)
154
+ credentials = Credentials.new credentials, scope: @config.scope
155
+ end
156
+
157
+ @quota_project_id = @config.quota_project
158
+ @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id
159
+
160
+ @css_products_service_stub = ::Google::Shopping::Css::V1::CssProductsService::Rest::ServiceStub.new(
161
+ endpoint: @config.endpoint,
162
+ endpoint_template: DEFAULT_ENDPOINT_TEMPLATE,
163
+ universe_domain: @config.universe_domain,
164
+ credentials: credentials
165
+ )
166
+ end
167
+
168
+ # Service calls
169
+
170
+ ##
171
+ # Retrieves the processed CSS Product from your CSS Center account. After
172
+ # inserting, updating, or deleting a product input, it may take several
173
+ # minutes before the updated final product can be retrieved.
174
+ #
175
+ # @overload get_css_product(request, options = nil)
176
+ # Pass arguments to `get_css_product` via a request object, either of type
177
+ # {::Google::Shopping::Css::V1::GetCssProductRequest} or an equivalent Hash.
178
+ #
179
+ # @param request [::Google::Shopping::Css::V1::GetCssProductRequest, ::Hash]
180
+ # A request object representing the call parameters. Required. To specify no
181
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
182
+ # @param options [::Gapic::CallOptions, ::Hash]
183
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
184
+ #
185
+ # @overload get_css_product(name: nil)
186
+ # Pass arguments to `get_css_product` via keyword arguments. Note that at
187
+ # least one keyword argument is required. To specify no parameters, or to keep all
188
+ # the default parameter values, pass an empty Hash as a request object (see above).
189
+ #
190
+ # @param name [::String]
191
+ # Required. The name of the CSS product to retrieve.
192
+ # @yield [result, operation] Access the result along with the TransportOperation object
193
+ # @yieldparam result [::Google::Shopping::Css::V1::CssProduct]
194
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
195
+ #
196
+ # @return [::Google::Shopping::Css::V1::CssProduct]
197
+ #
198
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
199
+ #
200
+ # @example Basic example
201
+ # require "google/shopping/css/v1"
202
+ #
203
+ # # Create a client object. The client can be reused for multiple calls.
204
+ # client = Google::Shopping::Css::V1::CssProductsService::Rest::Client.new
205
+ #
206
+ # # Create a request. To set request fields, pass in keyword arguments.
207
+ # request = Google::Shopping::Css::V1::GetCssProductRequest.new
208
+ #
209
+ # # Call the get_css_product method.
210
+ # result = client.get_css_product request
211
+ #
212
+ # # The returned object is of type Google::Shopping::Css::V1::CssProduct.
213
+ # p result
214
+ #
215
+ def get_css_product request, options = nil
216
+ raise ::ArgumentError, "request must be provided" if request.nil?
217
+
218
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Css::V1::GetCssProductRequest
219
+
220
+ # Converts hash and nil to an options object
221
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
222
+
223
+ # Customize the options with defaults
224
+ call_metadata = @config.rpcs.get_css_product.metadata.to_h
225
+
226
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
227
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
228
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
229
+ gapic_version: ::Google::Shopping::Css::V1::VERSION,
230
+ transports_version_send: [:rest]
231
+
232
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
233
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
234
+
235
+ options.apply_defaults timeout: @config.rpcs.get_css_product.timeout,
236
+ metadata: call_metadata,
237
+ retry_policy: @config.rpcs.get_css_product.retry_policy
238
+
239
+ options.apply_defaults timeout: @config.timeout,
240
+ metadata: @config.metadata,
241
+ retry_policy: @config.retry_policy
242
+
243
+ @css_products_service_stub.get_css_product request, options do |result, operation|
244
+ yield result, operation if block_given?
245
+ return result
246
+ end
247
+ rescue ::Gapic::Rest::Error => e
248
+ raise ::Google::Cloud::Error.from_error(e)
249
+ end
250
+
251
+ ##
252
+ # Lists the processed CSS Products in your CSS Center account. The response
253
+ # might contain fewer items than specified by pageSize. Rely on pageToken to
254
+ # determine if there are more items to be requested.
255
+ #
256
+ # After inserting, updating, or deleting a CSS product input, it may
257
+ # take several minutes before the updated processed CSS product can be
258
+ # retrieved.
259
+ #
260
+ # @overload list_css_products(request, options = nil)
261
+ # Pass arguments to `list_css_products` via a request object, either of type
262
+ # {::Google::Shopping::Css::V1::ListCssProductsRequest} or an equivalent Hash.
263
+ #
264
+ # @param request [::Google::Shopping::Css::V1::ListCssProductsRequest, ::Hash]
265
+ # A request object representing the call parameters. Required. To specify no
266
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
267
+ # @param options [::Gapic::CallOptions, ::Hash]
268
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
269
+ #
270
+ # @overload list_css_products(parent: nil, page_size: nil, page_token: nil)
271
+ # Pass arguments to `list_css_products` via keyword arguments. Note that at
272
+ # least one keyword argument is required. To specify no parameters, or to keep all
273
+ # the default parameter values, pass an empty Hash as a request object (see above).
274
+ #
275
+ # @param parent [::String]
276
+ # Required. The account/domain to list processed CSS Products for.
277
+ # Format: accounts/\\{account}
278
+ # @param page_size [::Integer]
279
+ # The maximum number of CSS Products to return. The service may return
280
+ # fewer than this value.
281
+ # The maximum value is 1000; values above 1000 will be coerced to 1000. If
282
+ # unspecified, the maximum number of CSS products will be returned.
283
+ # @param page_token [::String]
284
+ # A page token, received from a previous `ListCssProducts` call.
285
+ # Provide this to retrieve the subsequent page.
286
+ #
287
+ # When paginating, all other parameters provided to `ListCssProducts`
288
+ # must match the call that provided the page token.
289
+ # @yield [result, operation] Access the result along with the TransportOperation object
290
+ # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Shopping::Css::V1::CssProduct>]
291
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
292
+ #
293
+ # @return [::Gapic::Rest::PagedEnumerable<::Google::Shopping::Css::V1::CssProduct>]
294
+ #
295
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
296
+ #
297
+ # @example Basic example
298
+ # require "google/shopping/css/v1"
299
+ #
300
+ # # Create a client object. The client can be reused for multiple calls.
301
+ # client = Google::Shopping::Css::V1::CssProductsService::Rest::Client.new
302
+ #
303
+ # # Create a request. To set request fields, pass in keyword arguments.
304
+ # request = Google::Shopping::Css::V1::ListCssProductsRequest.new
305
+ #
306
+ # # Call the list_css_products method.
307
+ # result = client.list_css_products request
308
+ #
309
+ # # The returned object is of type Gapic::PagedEnumerable. You can iterate
310
+ # # over elements, and API calls will be issued to fetch pages as needed.
311
+ # result.each do |item|
312
+ # # Each element is of type ::Google::Shopping::Css::V1::CssProduct.
313
+ # p item
314
+ # end
315
+ #
316
+ def list_css_products request, options = nil
317
+ raise ::ArgumentError, "request must be provided" if request.nil?
318
+
319
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Css::V1::ListCssProductsRequest
320
+
321
+ # Converts hash and nil to an options object
322
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
323
+
324
+ # Customize the options with defaults
325
+ call_metadata = @config.rpcs.list_css_products.metadata.to_h
326
+
327
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
328
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
329
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
330
+ gapic_version: ::Google::Shopping::Css::V1::VERSION,
331
+ transports_version_send: [:rest]
332
+
333
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
334
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
335
+
336
+ options.apply_defaults timeout: @config.rpcs.list_css_products.timeout,
337
+ metadata: call_metadata,
338
+ retry_policy: @config.rpcs.list_css_products.retry_policy
339
+
340
+ options.apply_defaults timeout: @config.timeout,
341
+ metadata: @config.metadata,
342
+ retry_policy: @config.retry_policy
343
+
344
+ @css_products_service_stub.list_css_products request, options do |result, operation|
345
+ result = ::Gapic::Rest::PagedEnumerable.new @css_products_service_stub, :list_css_products, "css_products", request, result, options
346
+ yield result, operation if block_given?
347
+ return result
348
+ end
349
+ rescue ::Gapic::Rest::Error => e
350
+ raise ::Google::Cloud::Error.from_error(e)
351
+ end
352
+
353
+ ##
354
+ # Configuration class for the CssProductsService REST API.
355
+ #
356
+ # This class represents the configuration for CssProductsService REST,
357
+ # providing control over timeouts, retry behavior, logging, transport
358
+ # parameters, and other low-level controls. Certain parameters can also be
359
+ # applied individually to specific RPCs. See
360
+ # {::Google::Shopping::Css::V1::CssProductsService::Rest::Client::Configuration::Rpcs}
361
+ # for a list of RPCs that can be configured independently.
362
+ #
363
+ # Configuration can be applied globally to all clients, or to a single client
364
+ # on construction.
365
+ #
366
+ # @example
367
+ #
368
+ # # Modify the global config, setting the timeout for
369
+ # # get_css_product to 20 seconds,
370
+ # # and all remaining timeouts to 10 seconds.
371
+ # ::Google::Shopping::Css::V1::CssProductsService::Rest::Client.configure do |config|
372
+ # config.timeout = 10.0
373
+ # config.rpcs.get_css_product.timeout = 20.0
374
+ # end
375
+ #
376
+ # # Apply the above configuration only to a new client.
377
+ # client = ::Google::Shopping::Css::V1::CssProductsService::Rest::Client.new do |config|
378
+ # config.timeout = 10.0
379
+ # config.rpcs.get_css_product.timeout = 20.0
380
+ # end
381
+ #
382
+ # @!attribute [rw] endpoint
383
+ # A custom service endpoint, as a hostname or hostname:port. The default is
384
+ # nil, indicating to use the default endpoint in the current universe domain.
385
+ # @return [::String,nil]
386
+ # @!attribute [rw] credentials
387
+ # Credentials to send with calls. You may provide any of the following types:
388
+ # * (`String`) The path to a service account key file in JSON format
389
+ # * (`Hash`) A service account key as a Hash
390
+ # * (`Google::Auth::Credentials`) A googleauth credentials object
391
+ # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials))
392
+ # * (`Signet::OAuth2::Client`) A signet oauth2 client object
393
+ # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client))
394
+ # * (`nil`) indicating no credentials
395
+ # @return [::Object]
396
+ # @!attribute [rw] scope
397
+ # The OAuth scopes
398
+ # @return [::Array<::String>]
399
+ # @!attribute [rw] lib_name
400
+ # The library name as recorded in instrumentation and logging
401
+ # @return [::String]
402
+ # @!attribute [rw] lib_version
403
+ # The library version as recorded in instrumentation and logging
404
+ # @return [::String]
405
+ # @!attribute [rw] timeout
406
+ # The call timeout in seconds.
407
+ # @return [::Numeric]
408
+ # @!attribute [rw] metadata
409
+ # Additional headers to be sent with the call.
410
+ # @return [::Hash{::Symbol=>::String}]
411
+ # @!attribute [rw] retry_policy
412
+ # The retry policy. The value is a hash with the following keys:
413
+ # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds.
414
+ # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds.
415
+ # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier.
416
+ # * `:retry_codes` (*type:* `Array<String>`) - The error codes that should
417
+ # trigger a retry.
418
+ # @return [::Hash]
419
+ # @!attribute [rw] quota_project
420
+ # A separate project against which to charge quota.
421
+ # @return [::String]
422
+ # @!attribute [rw] universe_domain
423
+ # The universe domain within which to make requests. This determines the
424
+ # default endpoint URL. The default value of nil uses the environment
425
+ # universe (usually the default "googleapis.com" universe).
426
+ # @return [::String,nil]
427
+ #
428
+ class Configuration
429
+ extend ::Gapic::Config
430
+
431
+ # @private
432
+ # The endpoint specific to the default "googleapis.com" universe. Deprecated.
433
+ DEFAULT_ENDPOINT = "css.googleapis.com"
434
+
435
+ config_attr :endpoint, nil, ::String, nil
436
+ config_attr :credentials, nil do |value|
437
+ allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Signet::OAuth2::Client, nil]
438
+ allowed.any? { |klass| klass === value }
439
+ end
440
+ config_attr :scope, nil, ::String, ::Array, nil
441
+ config_attr :lib_name, nil, ::String, nil
442
+ config_attr :lib_version, nil, ::String, nil
443
+ config_attr :timeout, nil, ::Numeric, nil
444
+ config_attr :metadata, nil, ::Hash, nil
445
+ config_attr :retry_policy, nil, ::Hash, ::Proc, nil
446
+ config_attr :quota_project, nil, ::String, nil
447
+ config_attr :universe_domain, nil, ::String, nil
448
+
449
+ # @private
450
+ def initialize parent_config = nil
451
+ @parent_config = parent_config unless parent_config.nil?
452
+
453
+ yield self if block_given?
454
+ end
455
+
456
+ ##
457
+ # Configurations for individual RPCs
458
+ # @return [Rpcs]
459
+ #
460
+ def rpcs
461
+ @rpcs ||= begin
462
+ parent_rpcs = nil
463
+ parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs)
464
+ Rpcs.new parent_rpcs
465
+ end
466
+ end
467
+
468
+ ##
469
+ # Configuration RPC class for the CssProductsService API.
470
+ #
471
+ # Includes fields providing the configuration for each RPC in this service.
472
+ # Each configuration object is of type `Gapic::Config::Method` and includes
473
+ # the following configuration fields:
474
+ #
475
+ # * `timeout` (*type:* `Numeric`) - The call timeout in seconds
476
+ # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers
477
+ # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields
478
+ # include the following keys:
479
+ # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds.
480
+ # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds.
481
+ # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier.
482
+ # * `:retry_codes` (*type:* `Array<String>`) - The error codes that should
483
+ # trigger a retry.
484
+ #
485
+ class Rpcs
486
+ ##
487
+ # RPC-specific configuration for `get_css_product`
488
+ # @return [::Gapic::Config::Method]
489
+ #
490
+ attr_reader :get_css_product
491
+ ##
492
+ # RPC-specific configuration for `list_css_products`
493
+ # @return [::Gapic::Config::Method]
494
+ #
495
+ attr_reader :list_css_products
496
+
497
+ # @private
498
+ def initialize parent_rpcs = nil
499
+ get_css_product_config = parent_rpcs.get_css_product if parent_rpcs.respond_to? :get_css_product
500
+ @get_css_product = ::Gapic::Config::Method.new get_css_product_config
501
+ list_css_products_config = parent_rpcs.list_css_products if parent_rpcs.respond_to? :list_css_products
502
+ @list_css_products = ::Gapic::Config::Method.new list_css_products_config
503
+
504
+ yield self if block_given?
505
+ end
506
+ end
507
+ end
508
+ end
509
+ end
510
+ end
511
+ end
512
+ end
513
+ end
514
+ end