google-ads-data_manager-v1 0.2.0 → 0.3.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 (99) hide show
  1. checksums.yaml +4 -4
  2. data/lib/google/ads/data_manager/v1/marketing_data_insights_service/client.rb +494 -0
  3. data/lib/google/ads/data_manager/v1/marketing_data_insights_service/credentials.rb +47 -0
  4. data/lib/google/ads/data_manager/v1/marketing_data_insights_service/rest/client.rb +444 -0
  5. data/lib/google/ads/data_manager/v1/marketing_data_insights_service/rest/service_stub.rb +143 -0
  6. data/lib/google/ads/data_manager/v1/marketing_data_insights_service/rest.rb +53 -0
  7. data/lib/google/ads/data_manager/v1/marketing_data_insights_service.rb +56 -0
  8. data/lib/google/ads/data_manager/v1/partner_link_service/client.rb +739 -0
  9. data/lib/google/ads/data_manager/v1/partner_link_service/credentials.rb +47 -0
  10. data/lib/google/ads/data_manager/v1/partner_link_service/paths.rb +69 -0
  11. data/lib/google/ads/data_manager/v1/partner_link_service/rest/client.rb +675 -0
  12. data/lib/google/ads/data_manager/v1/partner_link_service/rest/service_stub.rb +265 -0
  13. data/lib/google/ads/data_manager/v1/partner_link_service/rest.rb +52 -0
  14. data/lib/google/ads/data_manager/v1/partner_link_service.rb +55 -0
  15. data/lib/google/ads/data_manager/v1/rest.rb +5 -0
  16. data/lib/google/ads/data_manager/v1/user_list_direct_license_service/client.rb +813 -0
  17. data/lib/google/ads/data_manager/v1/user_list_direct_license_service/credentials.rb +47 -0
  18. data/lib/google/ads/data_manager/v1/user_list_direct_license_service/paths.rb +69 -0
  19. data/lib/google/ads/data_manager/v1/user_list_direct_license_service/rest/client.rb +742 -0
  20. data/lib/google/ads/data_manager/v1/user_list_direct_license_service/rest/service_stub.rb +327 -0
  21. data/lib/google/ads/data_manager/v1/user_list_direct_license_service/rest.rb +56 -0
  22. data/lib/google/ads/data_manager/v1/user_list_direct_license_service.rb +59 -0
  23. data/lib/google/ads/data_manager/v1/user_list_global_license_service/client.rb +955 -0
  24. data/lib/google/ads/data_manager/v1/user_list_global_license_service/credentials.rb +47 -0
  25. data/lib/google/ads/data_manager/v1/user_list_global_license_service/paths.rb +69 -0
  26. data/lib/google/ads/data_manager/v1/user_list_global_license_service/rest/client.rb +877 -0
  27. data/lib/google/ads/data_manager/v1/user_list_global_license_service/rest/service_stub.rb +388 -0
  28. data/lib/google/ads/data_manager/v1/user_list_global_license_service/rest.rb +56 -0
  29. data/lib/google/ads/data_manager/v1/user_list_global_license_service.rb +59 -0
  30. data/lib/google/ads/data_manager/v1/user_list_service/client.rb +972 -0
  31. data/lib/google/ads/data_manager/v1/user_list_service/credentials.rb +47 -0
  32. data/lib/google/ads/data_manager/v1/user_list_service/paths.rb +69 -0
  33. data/lib/google/ads/data_manager/v1/user_list_service/rest/client.rb +894 -0
  34. data/lib/google/ads/data_manager/v1/user_list_service/rest/service_stub.rb +388 -0
  35. data/lib/google/ads/data_manager/v1/user_list_service/rest.rb +52 -0
  36. data/lib/google/ads/data_manager/v1/user_list_service.rb +55 -0
  37. data/lib/google/ads/data_manager/v1/version.rb +1 -1
  38. data/lib/google/ads/data_manager/v1.rb +5 -0
  39. data/lib/google/ads/datamanager/v1/age_range_pb.rb +21 -0
  40. data/lib/google/ads/datamanager/v1/audience_pb.rb +5 -26
  41. data/lib/google/ads/datamanager/v1/cart_data_pb.rb +3 -25
  42. data/lib/google/ads/datamanager/v1/consent_pb.rb +3 -24
  43. data/lib/google/ads/datamanager/v1/destination_pb.rb +4 -24
  44. data/lib/google/ads/datamanager/v1/device_info_pb.rb +3 -24
  45. data/lib/google/ads/datamanager/v1/encryption_info_pb.rb +3 -24
  46. data/lib/google/ads/datamanager/v1/error_pb.rb +3 -24
  47. data/lib/google/ads/datamanager/v1/event_pb.rb +3 -31
  48. data/lib/google/ads/datamanager/v1/experimental_field_pb.rb +3 -24
  49. data/lib/google/ads/datamanager/v1/gender_pb.rb +21 -0
  50. data/lib/google/ads/datamanager/v1/ingestion_service_pb.rb +3 -31
  51. data/lib/google/ads/datamanager/v1/insights_service_pb.rb +33 -0
  52. data/lib/google/ads/datamanager/v1/insights_service_services_pb.rb +62 -0
  53. data/lib/google/ads/datamanager/v1/item_parameter_pb.rb +3 -24
  54. data/lib/google/ads/datamanager/v1/match_rate_pb.rb +3 -24
  55. data/lib/google/ads/datamanager/v1/partner_link_service_pb.rb +32 -0
  56. data/lib/google/ads/datamanager/v1/partner_link_service_services_pb.rb +79 -0
  57. data/lib/google/ads/datamanager/v1/processing_errors_pb.rb +3 -24
  58. data/lib/google/ads/datamanager/v1/request_status_per_destination_pb.rb +7 -26
  59. data/lib/google/ads/datamanager/v1/terms_of_service_pb.rb +3 -24
  60. data/lib/google/ads/datamanager/v1/user_data_pb.rb +3 -24
  61. data/lib/google/ads/datamanager/v1/user_list_direct_license_pb.rb +28 -0
  62. data/lib/google/ads/datamanager/v1/user_list_direct_license_service_pb.rb +32 -0
  63. data/lib/google/ads/datamanager/v1/user_list_direct_license_service_services_pb.rb +63 -0
  64. data/lib/google/ads/datamanager/v1/user_list_global_license_pb.rb +30 -0
  65. data/lib/google/ads/datamanager/v1/user_list_global_license_service_pb.rb +34 -0
  66. data/lib/google/ads/datamanager/v1/user_list_global_license_service_services_pb.rb +67 -0
  67. data/lib/google/ads/datamanager/v1/user_list_global_license_type_pb.rb +21 -0
  68. data/lib/google/ads/datamanager/v1/user_list_license_client_account_type_pb.rb +21 -0
  69. data/lib/google/ads/datamanager/v1/user_list_license_metrics_pb.rb +23 -0
  70. data/lib/google/ads/datamanager/v1/user_list_license_pricing_pb.rb +26 -0
  71. data/lib/google/ads/datamanager/v1/user_list_license_status_pb.rb +21 -0
  72. data/lib/google/ads/datamanager/v1/user_list_pb.rb +43 -0
  73. data/lib/google/ads/datamanager/v1/user_list_service_pb.rb +34 -0
  74. data/lib/google/ads/datamanager/v1/user_list_service_services_pb.rb +118 -0
  75. data/lib/google/ads/datamanager/v1/user_properties_pb.rb +3 -24
  76. data/proto_docs/google/ads/datamanager/v1/age_range.rb +53 -0
  77. data/proto_docs/google/ads/datamanager/v1/audience.rb +42 -3
  78. data/proto_docs/google/ads/datamanager/v1/destination.rb +3 -0
  79. data/proto_docs/google/ads/datamanager/v1/encryption_info.rb +6 -3
  80. data/proto_docs/google/ads/datamanager/v1/error.rb +159 -1
  81. data/proto_docs/google/ads/datamanager/v1/gender.rb +41 -0
  82. data/proto_docs/google/ads/datamanager/v1/insights_service.rb +133 -0
  83. data/proto_docs/google/ads/datamanager/v1/partner_link_service.rb +141 -0
  84. data/proto_docs/google/ads/datamanager/v1/request_status_per_destination.rb +92 -6
  85. data/proto_docs/google/ads/datamanager/v1/user_list.rb +397 -0
  86. data/proto_docs/google/ads/datamanager/v1/user_list_direct_license.rb +75 -0
  87. data/proto_docs/google/ads/datamanager/v1/user_list_direct_license_service.rb +134 -0
  88. data/proto_docs/google/ads/datamanager/v1/user_list_global_license.rb +114 -0
  89. data/proto_docs/google/ads/datamanager/v1/user_list_global_license_service.rb +204 -0
  90. data/proto_docs/google/ads/datamanager/v1/user_list_global_license_type.rb +41 -0
  91. data/proto_docs/google/ads/datamanager/v1/user_list_license_client_account_type.rb +44 -0
  92. data/proto_docs/google/ads/datamanager/v1/user_list_license_metrics.rb +55 -0
  93. data/proto_docs/google/ads/datamanager/v1/user_list_license_pricing.rb +108 -0
  94. data/proto_docs/google/ads/datamanager/v1/user_list_license_status.rb +38 -0
  95. data/proto_docs/google/ads/datamanager/v1/user_list_service.rb +151 -0
  96. data/proto_docs/google/api/client.rb +149 -29
  97. data/proto_docs/google/protobuf/empty.rb +34 -0
  98. data/proto_docs/google/protobuf/field_mask.rb +229 -0
  99. metadata +73 -2
@@ -0,0 +1,972 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Copyright 2026 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/ads/datamanager/v1/user_list_service_pb"
21
+
22
+ module Google
23
+ module Ads
24
+ module DataManager
25
+ module V1
26
+ module UserListService
27
+ ##
28
+ # Client for the UserListService service.
29
+ #
30
+ # Service for managing UserList resources.
31
+ #
32
+ class Client
33
+ # @private
34
+ API_VERSION = ""
35
+
36
+ # @private
37
+ DEFAULT_ENDPOINT_TEMPLATE = "datamanager.$UNIVERSE_DOMAIN$"
38
+
39
+ include Paths
40
+
41
+ # @private
42
+ attr_reader :user_list_service_stub
43
+
44
+ ##
45
+ # Configure the UserListService Client class.
46
+ #
47
+ # See {::Google::Ads::DataManager::V1::UserListService::Client::Configuration}
48
+ # for a description of the configuration fields.
49
+ #
50
+ # @example
51
+ #
52
+ # # Modify the configuration for all UserListService clients
53
+ # ::Google::Ads::DataManager::V1::UserListService::Client.configure do |config|
54
+ # config.timeout = 10.0
55
+ # end
56
+ #
57
+ # @yield [config] Configure the Client client.
58
+ # @yieldparam config [Client::Configuration]
59
+ #
60
+ # @return [Client::Configuration]
61
+ #
62
+ def self.configure
63
+ @configure ||= begin
64
+ namespace = ["Google", "Ads", "DataManager", "V1"]
65
+ parent_config = while namespace.any?
66
+ parent_name = namespace.join "::"
67
+ parent_const = const_get parent_name
68
+ break parent_const.configure if parent_const.respond_to? :configure
69
+ namespace.pop
70
+ end
71
+ default_config = Client::Configuration.new parent_config
72
+
73
+ default_config
74
+ end
75
+ yield @configure if block_given?
76
+ @configure
77
+ end
78
+
79
+ ##
80
+ # Configure the UserListService Client instance.
81
+ #
82
+ # The configuration is set to the derived mode, meaning that values can be changed,
83
+ # but structural changes (adding new fields, etc.) are not allowed. Structural changes
84
+ # should be made on {Client.configure}.
85
+ #
86
+ # See {::Google::Ads::DataManager::V1::UserListService::Client::Configuration}
87
+ # for a description of the configuration fields.
88
+ #
89
+ # @yield [config] Configure the Client client.
90
+ # @yieldparam config [Client::Configuration]
91
+ #
92
+ # @return [Client::Configuration]
93
+ #
94
+ def configure
95
+ yield @config if block_given?
96
+ @config
97
+ end
98
+
99
+ ##
100
+ # The effective universe domain
101
+ #
102
+ # @return [String]
103
+ #
104
+ def universe_domain
105
+ @user_list_service_stub.universe_domain
106
+ end
107
+
108
+ ##
109
+ # Create a new UserListService client object.
110
+ #
111
+ # @example
112
+ #
113
+ # # Create a client using the default configuration
114
+ # client = ::Google::Ads::DataManager::V1::UserListService::Client.new
115
+ #
116
+ # # Create a client using a custom configuration
117
+ # client = ::Google::Ads::DataManager::V1::UserListService::Client.new do |config|
118
+ # config.timeout = 10.0
119
+ # end
120
+ #
121
+ # @yield [config] Configure the UserListService client.
122
+ # @yieldparam config [Client::Configuration]
123
+ #
124
+ def initialize
125
+ # These require statements are intentionally placed here to initialize
126
+ # the gRPC module only when it's required.
127
+ # See https://github.com/googleapis/toolkit/issues/446
128
+ require "gapic/grpc"
129
+ require "google/ads/datamanager/v1/user_list_service_services_pb"
130
+
131
+ # Create the configuration object
132
+ @config = Configuration.new Client.configure
133
+
134
+ # Yield the configuration if needed
135
+ yield @config if block_given?
136
+
137
+ # Create credentials
138
+ credentials = @config.credentials
139
+ # Use self-signed JWT if the endpoint is unchanged from default,
140
+ # but only if the default endpoint does not have a region prefix.
141
+ enable_self_signed_jwt = @config.endpoint.nil? ||
142
+ (@config.endpoint == Configuration::DEFAULT_ENDPOINT &&
143
+ !@config.endpoint.split(".").first.include?("-"))
144
+ credentials ||= Credentials.default scope: @config.scope,
145
+ enable_self_signed_jwt: enable_self_signed_jwt
146
+ if credentials.is_a?(::String) || credentials.is_a?(::Hash)
147
+ credentials = Credentials.new credentials, scope: @config.scope
148
+ end
149
+ @quota_project_id = @config.quota_project
150
+ @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id
151
+
152
+ @user_list_service_stub = ::Gapic::ServiceStub.new(
153
+ ::Google::Ads::DataManager::V1::UserListService::Stub,
154
+ credentials: credentials,
155
+ endpoint: @config.endpoint,
156
+ endpoint_template: DEFAULT_ENDPOINT_TEMPLATE,
157
+ universe_domain: @config.universe_domain,
158
+ channel_args: @config.channel_args,
159
+ interceptors: @config.interceptors,
160
+ channel_pool_config: @config.channel_pool,
161
+ logger: @config.logger
162
+ )
163
+
164
+ @user_list_service_stub.stub_logger&.info do |entry|
165
+ entry.set_system_name
166
+ entry.set_service
167
+ entry.message = "Created client for #{entry.service}"
168
+ entry.set_credentials_fields credentials
169
+ entry.set "customEndpoint", @config.endpoint if @config.endpoint
170
+ entry.set "defaultTimeout", @config.timeout if @config.timeout
171
+ entry.set "quotaProject", @quota_project_id if @quota_project_id
172
+ end
173
+ end
174
+
175
+ ##
176
+ # The logger used for request/response debug logging.
177
+ #
178
+ # @return [Logger]
179
+ #
180
+ def logger
181
+ @user_list_service_stub.logger
182
+ end
183
+
184
+ # Service calls
185
+
186
+ ##
187
+ # Gets a UserList.
188
+ #
189
+ # Authorization Headers:
190
+ #
191
+ # This method supports the following optional headers to define how the API
192
+ # authorizes access for the request:
193
+ #
194
+ # * `login-account`: (Optional) The resource name of the account where the
195
+ # Google Account of the credentials is a user. If not set, defaults to the
196
+ # account of the request. Format:
197
+ # `accountTypes/{loginAccountType}/accounts/{loginAccountId}`
198
+ # * `linked-account`: (Optional) The resource name of the account with an
199
+ # established product link to the `login-account`. Format:
200
+ # `accountTypes/{linkedAccountType}/accounts/{linkedAccountId}`
201
+ #
202
+ # @overload get_user_list(request, options = nil)
203
+ # Pass arguments to `get_user_list` via a request object, either of type
204
+ # {::Google::Ads::DataManager::V1::GetUserListRequest} or an equivalent Hash.
205
+ #
206
+ # @param request [::Google::Ads::DataManager::V1::GetUserListRequest, ::Hash]
207
+ # A request object representing the call parameters. Required. To specify no
208
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
209
+ # @param options [::Gapic::CallOptions, ::Hash]
210
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
211
+ #
212
+ # @overload get_user_list(name: nil)
213
+ # Pass arguments to `get_user_list` via keyword arguments. Note that at
214
+ # least one keyword argument is required. To specify no parameters, or to keep all
215
+ # the default parameter values, pass an empty Hash as a request object (see above).
216
+ #
217
+ # @param name [::String]
218
+ # Required. The resource name of the UserList to retrieve.
219
+ # Format:
220
+ # accountTypes/\\{account_type}/accounts/\\{account}/userLists/\\{user_list}
221
+ #
222
+ # @yield [response, operation] Access the result along with the RPC operation
223
+ # @yieldparam response [::Google::Ads::DataManager::V1::UserList]
224
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
225
+ #
226
+ # @return [::Google::Ads::DataManager::V1::UserList]
227
+ #
228
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
229
+ #
230
+ # @example Basic example
231
+ # require "google/ads/data_manager/v1"
232
+ #
233
+ # # Create a client object. The client can be reused for multiple calls.
234
+ # client = Google::Ads::DataManager::V1::UserListService::Client.new
235
+ #
236
+ # # Create a request. To set request fields, pass in keyword arguments.
237
+ # request = Google::Ads::DataManager::V1::GetUserListRequest.new
238
+ #
239
+ # # Call the get_user_list method.
240
+ # result = client.get_user_list request
241
+ #
242
+ # # The returned object is of type Google::Ads::DataManager::V1::UserList.
243
+ # p result
244
+ #
245
+ def get_user_list request, options = nil
246
+ raise ::ArgumentError, "request must be provided" if request.nil?
247
+
248
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Ads::DataManager::V1::GetUserListRequest
249
+
250
+ # Converts hash and nil to an options object
251
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
252
+
253
+ # Customize the options with defaults
254
+ metadata = @config.rpcs.get_user_list.metadata.to_h
255
+
256
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
257
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
258
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
259
+ gapic_version: ::Google::Ads::DataManager::V1::VERSION
260
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
261
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
262
+
263
+ header_params = {}
264
+ if request.name
265
+ header_params["name"] = request.name
266
+ end
267
+
268
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
269
+ metadata[:"x-goog-request-params"] ||= request_params_header
270
+
271
+ options.apply_defaults timeout: @config.rpcs.get_user_list.timeout,
272
+ metadata: metadata,
273
+ retry_policy: @config.rpcs.get_user_list.retry_policy
274
+
275
+ options.apply_defaults timeout: @config.timeout,
276
+ metadata: @config.metadata,
277
+ retry_policy: @config.retry_policy
278
+
279
+ @user_list_service_stub.call_rpc :get_user_list, request, options: options do |response, operation|
280
+ yield response, operation if block_given?
281
+ end
282
+ rescue ::GRPC::BadStatus => e
283
+ raise ::Google::Cloud::Error.from_error(e)
284
+ end
285
+
286
+ ##
287
+ # Lists UserLists.
288
+ #
289
+ # Authorization Headers:
290
+ #
291
+ # This method supports the following optional headers to define how the API
292
+ # authorizes access for the request:
293
+ #
294
+ # * `login-account`: (Optional) The resource name of the account where the
295
+ # Google Account of the credentials is a user. If not set, defaults to the
296
+ # account of the request. Format:
297
+ # `accountTypes/{loginAccountType}/accounts/{loginAccountId}`
298
+ # * `linked-account`: (Optional) The resource name of the account with an
299
+ # established product link to the `login-account`. Format:
300
+ # `accountTypes/{linkedAccountType}/accounts/{linkedAccountId}`
301
+ #
302
+ # @overload list_user_lists(request, options = nil)
303
+ # Pass arguments to `list_user_lists` via a request object, either of type
304
+ # {::Google::Ads::DataManager::V1::ListUserListsRequest} or an equivalent Hash.
305
+ #
306
+ # @param request [::Google::Ads::DataManager::V1::ListUserListsRequest, ::Hash]
307
+ # A request object representing the call parameters. Required. To specify no
308
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
309
+ # @param options [::Gapic::CallOptions, ::Hash]
310
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
311
+ #
312
+ # @overload list_user_lists(parent: nil, page_size: nil, page_token: nil, filter: nil)
313
+ # Pass arguments to `list_user_lists` via keyword arguments. Note that at
314
+ # least one keyword argument is required. To specify no parameters, or to keep all
315
+ # the default parameter values, pass an empty Hash as a request object (see above).
316
+ #
317
+ # @param parent [::String]
318
+ # Required. The parent account which owns this collection of user lists.
319
+ # Format: accountTypes/\\{account_type}/accounts/\\{account}
320
+ # @param page_size [::Integer]
321
+ # Optional. The maximum number of user lists to return. The service may
322
+ # return fewer than this value. If unspecified, at most 50 user lists will be
323
+ # returned. The maximum value is 1000; values above 1000 will be coerced to
324
+ # 1000.
325
+ # @param page_token [::String]
326
+ # Optional. A page token, received from a previous `ListUserLists` call.
327
+ # Provide this to retrieve the subsequent page.
328
+ #
329
+ # When paginating, all other parameters provided to `ListUserLists` must
330
+ # match the call that provided the page token.
331
+ # @param filter [::String]
332
+ # Optional. A [filter string](https://google.aip.dev/160). All fields need to
333
+ # be on the left hand side of each condition (for example: `display_name =
334
+ # "list 1"`). Fields must be specified using either all [camel
335
+ # case](https://en.wikipedia.org/wiki/Camel_case) or all [snake
336
+ # case](https://en.wikipedia.org/wiki/Snake_case). Don't use a combination of
337
+ # camel case and snake case.
338
+ #
339
+ # Supported operations:
340
+ #
341
+ # - `AND`
342
+ # - `=`
343
+ # - `!=`
344
+ # - `>`
345
+ # - `>=`
346
+ # - `<`
347
+ # - `<=`
348
+ # - `:` (has)
349
+ #
350
+ # Supported fields:
351
+ #
352
+ # - `id`
353
+ # - `display_name`
354
+ # - `description`
355
+ # - `membership_status`
356
+ # - `integration_code`
357
+ # - `access_reason`
358
+ # - `ingested_user_list_info.upload_key_types`
359
+ #
360
+ # @yield [response, operation] Access the result along with the RPC operation
361
+ # @yieldparam response [::Gapic::PagedEnumerable<::Google::Ads::DataManager::V1::UserList>]
362
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
363
+ #
364
+ # @return [::Gapic::PagedEnumerable<::Google::Ads::DataManager::V1::UserList>]
365
+ #
366
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
367
+ #
368
+ # @example Basic example
369
+ # require "google/ads/data_manager/v1"
370
+ #
371
+ # # Create a client object. The client can be reused for multiple calls.
372
+ # client = Google::Ads::DataManager::V1::UserListService::Client.new
373
+ #
374
+ # # Create a request. To set request fields, pass in keyword arguments.
375
+ # request = Google::Ads::DataManager::V1::ListUserListsRequest.new
376
+ #
377
+ # # Call the list_user_lists method.
378
+ # result = client.list_user_lists request
379
+ #
380
+ # # The returned object is of type Gapic::PagedEnumerable. You can iterate
381
+ # # over elements, and API calls will be issued to fetch pages as needed.
382
+ # result.each do |item|
383
+ # # Each element is of type ::Google::Ads::DataManager::V1::UserList.
384
+ # p item
385
+ # end
386
+ #
387
+ def list_user_lists request, options = nil
388
+ raise ::ArgumentError, "request must be provided" if request.nil?
389
+
390
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Ads::DataManager::V1::ListUserListsRequest
391
+
392
+ # Converts hash and nil to an options object
393
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
394
+
395
+ # Customize the options with defaults
396
+ metadata = @config.rpcs.list_user_lists.metadata.to_h
397
+
398
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
399
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
400
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
401
+ gapic_version: ::Google::Ads::DataManager::V1::VERSION
402
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
403
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
404
+
405
+ header_params = {}
406
+ if request.parent
407
+ header_params["parent"] = request.parent
408
+ end
409
+
410
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
411
+ metadata[:"x-goog-request-params"] ||= request_params_header
412
+
413
+ options.apply_defaults timeout: @config.rpcs.list_user_lists.timeout,
414
+ metadata: metadata,
415
+ retry_policy: @config.rpcs.list_user_lists.retry_policy
416
+
417
+ options.apply_defaults timeout: @config.timeout,
418
+ metadata: @config.metadata,
419
+ retry_policy: @config.retry_policy
420
+
421
+ @user_list_service_stub.call_rpc :list_user_lists, request, options: options do |response, operation|
422
+ response = ::Gapic::PagedEnumerable.new @user_list_service_stub, :list_user_lists, request, response, operation, options
423
+ yield response, operation if block_given?
424
+ throw :response, response
425
+ end
426
+ rescue ::GRPC::BadStatus => e
427
+ raise ::Google::Cloud::Error.from_error(e)
428
+ end
429
+
430
+ ##
431
+ # Creates a UserList.
432
+ #
433
+ # Authorization Headers:
434
+ #
435
+ # This method supports the following optional headers to define how the API
436
+ # authorizes access for the request:
437
+ #
438
+ # * `login-account`: (Optional) The resource name of the account where the
439
+ # Google Account of the credentials is a user. If not set, defaults to the
440
+ # account of the request. Format:
441
+ # `accountTypes/{loginAccountType}/accounts/{loginAccountId}`
442
+ # * `linked-account`: (Optional) The resource name of the account with an
443
+ # established product link to the `login-account`. Format:
444
+ # `accountTypes/{linkedAccountType}/accounts/{linkedAccountId}`
445
+ #
446
+ # @overload create_user_list(request, options = nil)
447
+ # Pass arguments to `create_user_list` via a request object, either of type
448
+ # {::Google::Ads::DataManager::V1::CreateUserListRequest} or an equivalent Hash.
449
+ #
450
+ # @param request [::Google::Ads::DataManager::V1::CreateUserListRequest, ::Hash]
451
+ # A request object representing the call parameters. Required. To specify no
452
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
453
+ # @param options [::Gapic::CallOptions, ::Hash]
454
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
455
+ #
456
+ # @overload create_user_list(parent: nil, user_list: nil, validate_only: nil)
457
+ # Pass arguments to `create_user_list` via keyword arguments. Note that at
458
+ # least one keyword argument is required. To specify no parameters, or to keep all
459
+ # the default parameter values, pass an empty Hash as a request object (see above).
460
+ #
461
+ # @param parent [::String]
462
+ # Required. The parent account where this user list will be created.
463
+ # Format: accountTypes/\\{account_type}/accounts/\\{account}
464
+ # @param user_list [::Google::Ads::DataManager::V1::UserList, ::Hash]
465
+ # Required. The user list to create.
466
+ # @param validate_only [::Boolean]
467
+ # Optional. If true, the request is validated but not executed.
468
+ #
469
+ # @yield [response, operation] Access the result along with the RPC operation
470
+ # @yieldparam response [::Google::Ads::DataManager::V1::UserList]
471
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
472
+ #
473
+ # @return [::Google::Ads::DataManager::V1::UserList]
474
+ #
475
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
476
+ #
477
+ # @example Basic example
478
+ # require "google/ads/data_manager/v1"
479
+ #
480
+ # # Create a client object. The client can be reused for multiple calls.
481
+ # client = Google::Ads::DataManager::V1::UserListService::Client.new
482
+ #
483
+ # # Create a request. To set request fields, pass in keyword arguments.
484
+ # request = Google::Ads::DataManager::V1::CreateUserListRequest.new
485
+ #
486
+ # # Call the create_user_list method.
487
+ # result = client.create_user_list request
488
+ #
489
+ # # The returned object is of type Google::Ads::DataManager::V1::UserList.
490
+ # p result
491
+ #
492
+ def create_user_list request, options = nil
493
+ raise ::ArgumentError, "request must be provided" if request.nil?
494
+
495
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Ads::DataManager::V1::CreateUserListRequest
496
+
497
+ # Converts hash and nil to an options object
498
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
499
+
500
+ # Customize the options with defaults
501
+ metadata = @config.rpcs.create_user_list.metadata.to_h
502
+
503
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
504
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
505
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
506
+ gapic_version: ::Google::Ads::DataManager::V1::VERSION
507
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
508
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
509
+
510
+ header_params = {}
511
+ if request.parent
512
+ header_params["parent"] = request.parent
513
+ end
514
+
515
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
516
+ metadata[:"x-goog-request-params"] ||= request_params_header
517
+
518
+ options.apply_defaults timeout: @config.rpcs.create_user_list.timeout,
519
+ metadata: metadata,
520
+ retry_policy: @config.rpcs.create_user_list.retry_policy
521
+
522
+ options.apply_defaults timeout: @config.timeout,
523
+ metadata: @config.metadata,
524
+ retry_policy: @config.retry_policy
525
+
526
+ @user_list_service_stub.call_rpc :create_user_list, request, options: options do |response, operation|
527
+ yield response, operation if block_given?
528
+ end
529
+ rescue ::GRPC::BadStatus => e
530
+ raise ::Google::Cloud::Error.from_error(e)
531
+ end
532
+
533
+ ##
534
+ # Updates a UserList.
535
+ #
536
+ # Authorization Headers:
537
+ #
538
+ # This method supports the following optional headers to define how the API
539
+ # authorizes access for the request:
540
+ #
541
+ # * `login-account`: (Optional) The resource name of the account where the
542
+ # Google Account of the credentials is a user. If not set, defaults to the
543
+ # account of the request. Format:
544
+ # `accountTypes/{loginAccountType}/accounts/{loginAccountId}`
545
+ # * `linked-account`: (Optional) The resource name of the account with an
546
+ # established product link to the `login-account`. Format:
547
+ # `accountTypes/{linkedAccountType}/accounts/{linkedAccountId}`
548
+ #
549
+ # @overload update_user_list(request, options = nil)
550
+ # Pass arguments to `update_user_list` via a request object, either of type
551
+ # {::Google::Ads::DataManager::V1::UpdateUserListRequest} or an equivalent Hash.
552
+ #
553
+ # @param request [::Google::Ads::DataManager::V1::UpdateUserListRequest, ::Hash]
554
+ # A request object representing the call parameters. Required. To specify no
555
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
556
+ # @param options [::Gapic::CallOptions, ::Hash]
557
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
558
+ #
559
+ # @overload update_user_list(user_list: nil, update_mask: nil, validate_only: nil)
560
+ # Pass arguments to `update_user_list` via keyword arguments. Note that at
561
+ # least one keyword argument is required. To specify no parameters, or to keep all
562
+ # the default parameter values, pass an empty Hash as a request object (see above).
563
+ #
564
+ # @param user_list [::Google::Ads::DataManager::V1::UserList, ::Hash]
565
+ # Required. The user list to update.
566
+ #
567
+ # The user list's `name` field is used to identify the user list to update.
568
+ # Format:
569
+ # accountTypes/\\{account_type}/accounts/\\{account}/userLists/\\{user_list}
570
+ # @param update_mask [::Google::Protobuf::FieldMask, ::Hash]
571
+ # Optional. The list of fields to update.
572
+ # @param validate_only [::Boolean]
573
+ # Optional. If true, the request is validated but not executed.
574
+ #
575
+ # @yield [response, operation] Access the result along with the RPC operation
576
+ # @yieldparam response [::Google::Ads::DataManager::V1::UserList]
577
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
578
+ #
579
+ # @return [::Google::Ads::DataManager::V1::UserList]
580
+ #
581
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
582
+ #
583
+ # @example Basic example
584
+ # require "google/ads/data_manager/v1"
585
+ #
586
+ # # Create a client object. The client can be reused for multiple calls.
587
+ # client = Google::Ads::DataManager::V1::UserListService::Client.new
588
+ #
589
+ # # Create a request. To set request fields, pass in keyword arguments.
590
+ # request = Google::Ads::DataManager::V1::UpdateUserListRequest.new
591
+ #
592
+ # # Call the update_user_list method.
593
+ # result = client.update_user_list request
594
+ #
595
+ # # The returned object is of type Google::Ads::DataManager::V1::UserList.
596
+ # p result
597
+ #
598
+ def update_user_list request, options = nil
599
+ raise ::ArgumentError, "request must be provided" if request.nil?
600
+
601
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Ads::DataManager::V1::UpdateUserListRequest
602
+
603
+ # Converts hash and nil to an options object
604
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
605
+
606
+ # Customize the options with defaults
607
+ metadata = @config.rpcs.update_user_list.metadata.to_h
608
+
609
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
610
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
611
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
612
+ gapic_version: ::Google::Ads::DataManager::V1::VERSION
613
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
614
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
615
+
616
+ header_params = {}
617
+ if request.user_list&.name
618
+ header_params["user_list.name"] = request.user_list.name
619
+ end
620
+
621
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
622
+ metadata[:"x-goog-request-params"] ||= request_params_header
623
+
624
+ options.apply_defaults timeout: @config.rpcs.update_user_list.timeout,
625
+ metadata: metadata,
626
+ retry_policy: @config.rpcs.update_user_list.retry_policy
627
+
628
+ options.apply_defaults timeout: @config.timeout,
629
+ metadata: @config.metadata,
630
+ retry_policy: @config.retry_policy
631
+
632
+ @user_list_service_stub.call_rpc :update_user_list, request, options: options do |response, operation|
633
+ yield response, operation if block_given?
634
+ end
635
+ rescue ::GRPC::BadStatus => e
636
+ raise ::Google::Cloud::Error.from_error(e)
637
+ end
638
+
639
+ ##
640
+ # Deletes a UserList.
641
+ #
642
+ # Authorization Headers:
643
+ #
644
+ # This method supports the following optional headers to define how the API
645
+ # authorizes access for the request:
646
+ #
647
+ # * `login-account`: (Optional) The resource name of the account where the
648
+ # Google Account of the credentials is a user. If not set, defaults to the
649
+ # account of the request. Format:
650
+ # `accountTypes/{loginAccountType}/accounts/{loginAccountId}`
651
+ # * `linked-account`: (Optional) The resource name of the account with an
652
+ # established product link to the `login-account`. Format:
653
+ # `accountTypes/{linkedAccountType}/accounts/{linkedAccountId}`
654
+ #
655
+ # @overload delete_user_list(request, options = nil)
656
+ # Pass arguments to `delete_user_list` via a request object, either of type
657
+ # {::Google::Ads::DataManager::V1::DeleteUserListRequest} or an equivalent Hash.
658
+ #
659
+ # @param request [::Google::Ads::DataManager::V1::DeleteUserListRequest, ::Hash]
660
+ # A request object representing the call parameters. Required. To specify no
661
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
662
+ # @param options [::Gapic::CallOptions, ::Hash]
663
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
664
+ #
665
+ # @overload delete_user_list(name: nil, validate_only: nil)
666
+ # Pass arguments to `delete_user_list` via keyword arguments. Note that at
667
+ # least one keyword argument is required. To specify no parameters, or to keep all
668
+ # the default parameter values, pass an empty Hash as a request object (see above).
669
+ #
670
+ # @param name [::String]
671
+ # Required. The name of the user list to delete.
672
+ # Format:
673
+ # accountTypes/\\{account_type}/accounts/\\{account}/userLists/\\{user_list}
674
+ # @param validate_only [::Boolean]
675
+ # Optional. If true, the request is validated but not executed.
676
+ #
677
+ # @yield [response, operation] Access the result along with the RPC operation
678
+ # @yieldparam response [::Google::Protobuf::Empty]
679
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
680
+ #
681
+ # @return [::Google::Protobuf::Empty]
682
+ #
683
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
684
+ #
685
+ # @example Basic example
686
+ # require "google/ads/data_manager/v1"
687
+ #
688
+ # # Create a client object. The client can be reused for multiple calls.
689
+ # client = Google::Ads::DataManager::V1::UserListService::Client.new
690
+ #
691
+ # # Create a request. To set request fields, pass in keyword arguments.
692
+ # request = Google::Ads::DataManager::V1::DeleteUserListRequest.new
693
+ #
694
+ # # Call the delete_user_list method.
695
+ # result = client.delete_user_list request
696
+ #
697
+ # # The returned object is of type Google::Protobuf::Empty.
698
+ # p result
699
+ #
700
+ def delete_user_list request, options = nil
701
+ raise ::ArgumentError, "request must be provided" if request.nil?
702
+
703
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Ads::DataManager::V1::DeleteUserListRequest
704
+
705
+ # Converts hash and nil to an options object
706
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
707
+
708
+ # Customize the options with defaults
709
+ metadata = @config.rpcs.delete_user_list.metadata.to_h
710
+
711
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
712
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
713
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
714
+ gapic_version: ::Google::Ads::DataManager::V1::VERSION
715
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
716
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
717
+
718
+ header_params = {}
719
+ if request.name
720
+ header_params["name"] = request.name
721
+ end
722
+
723
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
724
+ metadata[:"x-goog-request-params"] ||= request_params_header
725
+
726
+ options.apply_defaults timeout: @config.rpcs.delete_user_list.timeout,
727
+ metadata: metadata,
728
+ retry_policy: @config.rpcs.delete_user_list.retry_policy
729
+
730
+ options.apply_defaults timeout: @config.timeout,
731
+ metadata: @config.metadata,
732
+ retry_policy: @config.retry_policy
733
+
734
+ @user_list_service_stub.call_rpc :delete_user_list, request, options: options do |response, operation|
735
+ yield response, operation if block_given?
736
+ end
737
+ rescue ::GRPC::BadStatus => e
738
+ raise ::Google::Cloud::Error.from_error(e)
739
+ end
740
+
741
+ ##
742
+ # Configuration class for the UserListService API.
743
+ #
744
+ # This class represents the configuration for UserListService,
745
+ # providing control over timeouts, retry behavior, logging, transport
746
+ # parameters, and other low-level controls. Certain parameters can also be
747
+ # applied individually to specific RPCs. See
748
+ # {::Google::Ads::DataManager::V1::UserListService::Client::Configuration::Rpcs}
749
+ # for a list of RPCs that can be configured independently.
750
+ #
751
+ # Configuration can be applied globally to all clients, or to a single client
752
+ # on construction.
753
+ #
754
+ # @example
755
+ #
756
+ # # Modify the global config, setting the timeout for
757
+ # # get_user_list to 20 seconds,
758
+ # # and all remaining timeouts to 10 seconds.
759
+ # ::Google::Ads::DataManager::V1::UserListService::Client.configure do |config|
760
+ # config.timeout = 10.0
761
+ # config.rpcs.get_user_list.timeout = 20.0
762
+ # end
763
+ #
764
+ # # Apply the above configuration only to a new client.
765
+ # client = ::Google::Ads::DataManager::V1::UserListService::Client.new do |config|
766
+ # config.timeout = 10.0
767
+ # config.rpcs.get_user_list.timeout = 20.0
768
+ # end
769
+ #
770
+ # @!attribute [rw] endpoint
771
+ # A custom service endpoint, as a hostname or hostname:port. The default is
772
+ # nil, indicating to use the default endpoint in the current universe domain.
773
+ # @return [::String,nil]
774
+ # @!attribute [rw] credentials
775
+ # Credentials to send with calls. You may provide any of the following types:
776
+ # * (`Google::Auth::Credentials`) A googleauth credentials object
777
+ # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials))
778
+ # * (`Signet::OAuth2::Client`) A signet oauth2 client object
779
+ # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client))
780
+ # * (`GRPC::Core::Channel`) a gRPC channel with included credentials
781
+ # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object
782
+ # * (`nil`) indicating no credentials
783
+ #
784
+ # @note Warning: Passing a `String` to a keyfile path or a `Hash` of credentials
785
+ # is deprecated. Providing an unvalidated credential configuration to
786
+ # Google APIs can compromise the security of your systems and data.
787
+ #
788
+ # @example
789
+ #
790
+ # # The recommended way to provide credentials is to use the `make_creds` method
791
+ # # on the appropriate credentials class for your environment.
792
+ #
793
+ # require "googleauth"
794
+ #
795
+ # credentials = ::Google::Auth::ServiceAccountCredentials.make_creds(
796
+ # json_key_io: ::File.open("/path/to/keyfile.json")
797
+ # )
798
+ #
799
+ # client = ::Google::Ads::DataManager::V1::UserListService::Client.new do |config|
800
+ # config.credentials = credentials
801
+ # end
802
+ #
803
+ # @note Warning: If you accept a credential configuration (JSON file or Hash) from an
804
+ # external source for authentication to Google Cloud, you must validate it before
805
+ # providing it to a Google API client library. Providing an unvalidated credential
806
+ # configuration to Google APIs can compromise the security of your systems and data.
807
+ # For more information, refer to [Validate credential configurations from external
808
+ # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials).
809
+ # @return [::Object]
810
+ # @!attribute [rw] scope
811
+ # The OAuth scopes
812
+ # @return [::Array<::String>]
813
+ # @!attribute [rw] lib_name
814
+ # The library name as recorded in instrumentation and logging
815
+ # @return [::String]
816
+ # @!attribute [rw] lib_version
817
+ # The library version as recorded in instrumentation and logging
818
+ # @return [::String]
819
+ # @!attribute [rw] channel_args
820
+ # Extra parameters passed to the gRPC channel. Note: this is ignored if a
821
+ # `GRPC::Core::Channel` object is provided as the credential.
822
+ # @return [::Hash]
823
+ # @!attribute [rw] interceptors
824
+ # An array of interceptors that are run before calls are executed.
825
+ # @return [::Array<::GRPC::ClientInterceptor>]
826
+ # @!attribute [rw] timeout
827
+ # The call timeout in seconds.
828
+ # @return [::Numeric]
829
+ # @!attribute [rw] metadata
830
+ # Additional gRPC headers to be sent with the call.
831
+ # @return [::Hash{::Symbol=>::String}]
832
+ # @!attribute [rw] retry_policy
833
+ # The retry policy. The value is a hash with the following keys:
834
+ # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds.
835
+ # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds.
836
+ # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier.
837
+ # * `:retry_codes` (*type:* `Array<String>`) - The error codes that should
838
+ # trigger a retry.
839
+ # @return [::Hash]
840
+ # @!attribute [rw] quota_project
841
+ # A separate project against which to charge quota.
842
+ # @return [::String]
843
+ # @!attribute [rw] universe_domain
844
+ # The universe domain within which to make requests. This determines the
845
+ # default endpoint URL. The default value of nil uses the environment
846
+ # universe (usually the default "googleapis.com" universe).
847
+ # @return [::String,nil]
848
+ # @!attribute [rw] logger
849
+ # A custom logger to use for request/response debug logging, or the value
850
+ # `:default` (the default) to construct a default logger, or `nil` to
851
+ # explicitly disable logging.
852
+ # @return [::Logger,:default,nil]
853
+ #
854
+ class Configuration
855
+ extend ::Gapic::Config
856
+
857
+ # @private
858
+ # The endpoint specific to the default "googleapis.com" universe. Deprecated.
859
+ DEFAULT_ENDPOINT = "datamanager.googleapis.com"
860
+
861
+ config_attr :endpoint, nil, ::String, nil
862
+ config_attr :credentials, nil do |value|
863
+ allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil]
864
+ allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC::Core::Channel
865
+ allowed.any? { |klass| klass === value }
866
+ end
867
+ config_attr :scope, nil, ::String, ::Array, nil
868
+ config_attr :lib_name, nil, ::String, nil
869
+ config_attr :lib_version, nil, ::String, nil
870
+ config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil)
871
+ config_attr :interceptors, nil, ::Array, nil
872
+ config_attr :timeout, nil, ::Numeric, nil
873
+ config_attr :metadata, nil, ::Hash, nil
874
+ config_attr :retry_policy, nil, ::Hash, ::Proc, nil
875
+ config_attr :quota_project, nil, ::String, nil
876
+ config_attr :universe_domain, nil, ::String, nil
877
+ config_attr :logger, :default, ::Logger, nil, :default
878
+
879
+ # @private
880
+ def initialize parent_config = nil
881
+ @parent_config = parent_config unless parent_config.nil?
882
+
883
+ yield self if block_given?
884
+ end
885
+
886
+ ##
887
+ # Configurations for individual RPCs
888
+ # @return [Rpcs]
889
+ #
890
+ def rpcs
891
+ @rpcs ||= begin
892
+ parent_rpcs = nil
893
+ parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs)
894
+ Rpcs.new parent_rpcs
895
+ end
896
+ end
897
+
898
+ ##
899
+ # Configuration for the channel pool
900
+ # @return [::Gapic::ServiceStub::ChannelPool::Configuration]
901
+ #
902
+ def channel_pool
903
+ @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new
904
+ end
905
+
906
+ ##
907
+ # Configuration RPC class for the UserListService API.
908
+ #
909
+ # Includes fields providing the configuration for each RPC in this service.
910
+ # Each configuration object is of type `Gapic::Config::Method` and includes
911
+ # the following configuration fields:
912
+ #
913
+ # * `timeout` (*type:* `Numeric`) - The call timeout in seconds
914
+ # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers
915
+ # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields
916
+ # include the following keys:
917
+ # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds.
918
+ # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds.
919
+ # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier.
920
+ # * `:retry_codes` (*type:* `Array<String>`) - The error codes that should
921
+ # trigger a retry.
922
+ #
923
+ class Rpcs
924
+ ##
925
+ # RPC-specific configuration for `get_user_list`
926
+ # @return [::Gapic::Config::Method]
927
+ #
928
+ attr_reader :get_user_list
929
+ ##
930
+ # RPC-specific configuration for `list_user_lists`
931
+ # @return [::Gapic::Config::Method]
932
+ #
933
+ attr_reader :list_user_lists
934
+ ##
935
+ # RPC-specific configuration for `create_user_list`
936
+ # @return [::Gapic::Config::Method]
937
+ #
938
+ attr_reader :create_user_list
939
+ ##
940
+ # RPC-specific configuration for `update_user_list`
941
+ # @return [::Gapic::Config::Method]
942
+ #
943
+ attr_reader :update_user_list
944
+ ##
945
+ # RPC-specific configuration for `delete_user_list`
946
+ # @return [::Gapic::Config::Method]
947
+ #
948
+ attr_reader :delete_user_list
949
+
950
+ # @private
951
+ def initialize parent_rpcs = nil
952
+ get_user_list_config = parent_rpcs.get_user_list if parent_rpcs.respond_to? :get_user_list
953
+ @get_user_list = ::Gapic::Config::Method.new get_user_list_config
954
+ list_user_lists_config = parent_rpcs.list_user_lists if parent_rpcs.respond_to? :list_user_lists
955
+ @list_user_lists = ::Gapic::Config::Method.new list_user_lists_config
956
+ create_user_list_config = parent_rpcs.create_user_list if parent_rpcs.respond_to? :create_user_list
957
+ @create_user_list = ::Gapic::Config::Method.new create_user_list_config
958
+ update_user_list_config = parent_rpcs.update_user_list if parent_rpcs.respond_to? :update_user_list
959
+ @update_user_list = ::Gapic::Config::Method.new update_user_list_config
960
+ delete_user_list_config = parent_rpcs.delete_user_list if parent_rpcs.respond_to? :delete_user_list
961
+ @delete_user_list = ::Gapic::Config::Method.new delete_user_list_config
962
+
963
+ yield self if block_given?
964
+ end
965
+ end
966
+ end
967
+ end
968
+ end
969
+ end
970
+ end
971
+ end
972
+ end