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