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,813 @@
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_direct_license_service_pb"
21
+
22
+ module Google
23
+ module Ads
24
+ module DataManager
25
+ module V1
26
+ module UserListDirectLicenseService
27
+ ##
28
+ # Client for the UserListDirectLicenseService service.
29
+ #
30
+ # Service for managing user list direct licenses. Delete is not a supported
31
+ # operation for UserListDirectLicenses. Callers should update the
32
+ # license status to DISABLED to instead to deactivate a license.
33
+ #
34
+ # This feature is only available to data partners.
35
+ #
36
+ class Client
37
+ # @private
38
+ API_VERSION = ""
39
+
40
+ # @private
41
+ DEFAULT_ENDPOINT_TEMPLATE = "datamanager.$UNIVERSE_DOMAIN$"
42
+
43
+ include Paths
44
+
45
+ # @private
46
+ attr_reader :user_list_direct_license_service_stub
47
+
48
+ ##
49
+ # Configure the UserListDirectLicenseService Client class.
50
+ #
51
+ # See {::Google::Ads::DataManager::V1::UserListDirectLicenseService::Client::Configuration}
52
+ # for a description of the configuration fields.
53
+ #
54
+ # @example
55
+ #
56
+ # # Modify the configuration for all UserListDirectLicenseService clients
57
+ # ::Google::Ads::DataManager::V1::UserListDirectLicenseService::Client.configure do |config|
58
+ # config.timeout = 10.0
59
+ # end
60
+ #
61
+ # @yield [config] Configure the Client client.
62
+ # @yieldparam config [Client::Configuration]
63
+ #
64
+ # @return [Client::Configuration]
65
+ #
66
+ def self.configure
67
+ @configure ||= begin
68
+ namespace = ["Google", "Ads", "DataManager", "V1"]
69
+ parent_config = while namespace.any?
70
+ parent_name = namespace.join "::"
71
+ parent_const = const_get parent_name
72
+ break parent_const.configure if parent_const.respond_to? :configure
73
+ namespace.pop
74
+ end
75
+ default_config = Client::Configuration.new parent_config
76
+
77
+ default_config
78
+ end
79
+ yield @configure if block_given?
80
+ @configure
81
+ end
82
+
83
+ ##
84
+ # Configure the UserListDirectLicenseService Client instance.
85
+ #
86
+ # The configuration is set to the derived mode, meaning that values can be changed,
87
+ # but structural changes (adding new fields, etc.) are not allowed. Structural changes
88
+ # should be made on {Client.configure}.
89
+ #
90
+ # See {::Google::Ads::DataManager::V1::UserListDirectLicenseService::Client::Configuration}
91
+ # for a description of the configuration fields.
92
+ #
93
+ # @yield [config] Configure the Client client.
94
+ # @yieldparam config [Client::Configuration]
95
+ #
96
+ # @return [Client::Configuration]
97
+ #
98
+ def configure
99
+ yield @config if block_given?
100
+ @config
101
+ end
102
+
103
+ ##
104
+ # The effective universe domain
105
+ #
106
+ # @return [String]
107
+ #
108
+ def universe_domain
109
+ @user_list_direct_license_service_stub.universe_domain
110
+ end
111
+
112
+ ##
113
+ # Create a new UserListDirectLicenseService client object.
114
+ #
115
+ # @example
116
+ #
117
+ # # Create a client using the default configuration
118
+ # client = ::Google::Ads::DataManager::V1::UserListDirectLicenseService::Client.new
119
+ #
120
+ # # Create a client using a custom configuration
121
+ # client = ::Google::Ads::DataManager::V1::UserListDirectLicenseService::Client.new do |config|
122
+ # config.timeout = 10.0
123
+ # end
124
+ #
125
+ # @yield [config] Configure the UserListDirectLicenseService client.
126
+ # @yieldparam config [Client::Configuration]
127
+ #
128
+ def initialize
129
+ # These require statements are intentionally placed here to initialize
130
+ # the gRPC module only when it's required.
131
+ # See https://github.com/googleapis/toolkit/issues/446
132
+ require "gapic/grpc"
133
+ require "google/ads/datamanager/v1/user_list_direct_license_service_services_pb"
134
+
135
+ # Create the configuration object
136
+ @config = Configuration.new Client.configure
137
+
138
+ # Yield the configuration if needed
139
+ yield @config if block_given?
140
+
141
+ # Create credentials
142
+ credentials = @config.credentials
143
+ # Use self-signed JWT if the endpoint is unchanged from default,
144
+ # but only if the default endpoint does not have a region prefix.
145
+ enable_self_signed_jwt = @config.endpoint.nil? ||
146
+ (@config.endpoint == Configuration::DEFAULT_ENDPOINT &&
147
+ !@config.endpoint.split(".").first.include?("-"))
148
+ credentials ||= Credentials.default scope: @config.scope,
149
+ enable_self_signed_jwt: enable_self_signed_jwt
150
+ if credentials.is_a?(::String) || credentials.is_a?(::Hash)
151
+ credentials = Credentials.new credentials, scope: @config.scope
152
+ end
153
+ @quota_project_id = @config.quota_project
154
+ @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id
155
+
156
+ @user_list_direct_license_service_stub = ::Gapic::ServiceStub.new(
157
+ ::Google::Ads::DataManager::V1::UserListDirectLicenseService::Stub,
158
+ credentials: credentials,
159
+ endpoint: @config.endpoint,
160
+ endpoint_template: DEFAULT_ENDPOINT_TEMPLATE,
161
+ universe_domain: @config.universe_domain,
162
+ channel_args: @config.channel_args,
163
+ interceptors: @config.interceptors,
164
+ channel_pool_config: @config.channel_pool,
165
+ logger: @config.logger
166
+ )
167
+
168
+ @user_list_direct_license_service_stub.stub_logger&.info do |entry|
169
+ entry.set_system_name
170
+ entry.set_service
171
+ entry.message = "Created client for #{entry.service}"
172
+ entry.set_credentials_fields credentials
173
+ entry.set "customEndpoint", @config.endpoint if @config.endpoint
174
+ entry.set "defaultTimeout", @config.timeout if @config.timeout
175
+ entry.set "quotaProject", @quota_project_id if @quota_project_id
176
+ end
177
+ end
178
+
179
+ ##
180
+ # The logger used for request/response debug logging.
181
+ #
182
+ # @return [Logger]
183
+ #
184
+ def logger
185
+ @user_list_direct_license_service_stub.logger
186
+ end
187
+
188
+ # Service calls
189
+
190
+ ##
191
+ # Creates a user list direct license.
192
+ #
193
+ # This feature is only available to data partners.
194
+ #
195
+ # @overload create_user_list_direct_license(request, options = nil)
196
+ # Pass arguments to `create_user_list_direct_license` via a request object, either of type
197
+ # {::Google::Ads::DataManager::V1::CreateUserListDirectLicenseRequest} or an equivalent Hash.
198
+ #
199
+ # @param request [::Google::Ads::DataManager::V1::CreateUserListDirectLicenseRequest, ::Hash]
200
+ # A request object representing the call parameters. Required. To specify no
201
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
202
+ # @param options [::Gapic::CallOptions, ::Hash]
203
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
204
+ #
205
+ # @overload create_user_list_direct_license(parent: nil, user_list_direct_license: nil)
206
+ # Pass arguments to `create_user_list_direct_license` via keyword arguments. Note that at
207
+ # least one keyword argument is required. To specify no parameters, or to keep all
208
+ # the default parameter values, pass an empty Hash as a request object (see above).
209
+ #
210
+ # @param parent [::String]
211
+ # Required. The account that owns the user list being licensed. Should be in
212
+ # the format accountTypes/\\{ACCOUNT_TYPE}/accounts/\\{ACCOUNT_ID}
213
+ # @param user_list_direct_license [::Google::Ads::DataManager::V1::UserListDirectLicense, ::Hash]
214
+ # Required. The user list direct license to create.
215
+ #
216
+ # @yield [response, operation] Access the result along with the RPC operation
217
+ # @yieldparam response [::Google::Ads::DataManager::V1::UserListDirectLicense]
218
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
219
+ #
220
+ # @return [::Google::Ads::DataManager::V1::UserListDirectLicense]
221
+ #
222
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
223
+ #
224
+ # @example Basic example
225
+ # require "google/ads/data_manager/v1"
226
+ #
227
+ # # Create a client object. The client can be reused for multiple calls.
228
+ # client = Google::Ads::DataManager::V1::UserListDirectLicenseService::Client.new
229
+ #
230
+ # # Create a request. To set request fields, pass in keyword arguments.
231
+ # request = Google::Ads::DataManager::V1::CreateUserListDirectLicenseRequest.new
232
+ #
233
+ # # Call the create_user_list_direct_license method.
234
+ # result = client.create_user_list_direct_license request
235
+ #
236
+ # # The returned object is of type Google::Ads::DataManager::V1::UserListDirectLicense.
237
+ # p result
238
+ #
239
+ def create_user_list_direct_license request, options = nil
240
+ raise ::ArgumentError, "request must be provided" if request.nil?
241
+
242
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Ads::DataManager::V1::CreateUserListDirectLicenseRequest
243
+
244
+ # Converts hash and nil to an options object
245
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
246
+
247
+ # Customize the options with defaults
248
+ metadata = @config.rpcs.create_user_list_direct_license.metadata.to_h
249
+
250
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
251
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
252
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
253
+ gapic_version: ::Google::Ads::DataManager::V1::VERSION
254
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
255
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
256
+
257
+ header_params = {}
258
+ if request.parent
259
+ header_params["parent"] = request.parent
260
+ end
261
+
262
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
263
+ metadata[:"x-goog-request-params"] ||= request_params_header
264
+
265
+ options.apply_defaults timeout: @config.rpcs.create_user_list_direct_license.timeout,
266
+ metadata: metadata,
267
+ retry_policy: @config.rpcs.create_user_list_direct_license.retry_policy
268
+
269
+ options.apply_defaults timeout: @config.timeout,
270
+ metadata: @config.metadata,
271
+ retry_policy: @config.retry_policy
272
+
273
+ @user_list_direct_license_service_stub.call_rpc :create_user_list_direct_license, request, options: options do |response, operation|
274
+ yield response, operation if block_given?
275
+ end
276
+ rescue ::GRPC::BadStatus => e
277
+ raise ::Google::Cloud::Error.from_error(e)
278
+ end
279
+
280
+ ##
281
+ # Retrieves a user list direct license.
282
+ #
283
+ # This feature is only available to data partners.
284
+ #
285
+ # @overload get_user_list_direct_license(request, options = nil)
286
+ # Pass arguments to `get_user_list_direct_license` via a request object, either of type
287
+ # {::Google::Ads::DataManager::V1::GetUserListDirectLicenseRequest} or an equivalent Hash.
288
+ #
289
+ # @param request [::Google::Ads::DataManager::V1::GetUserListDirectLicenseRequest, ::Hash]
290
+ # A request object representing the call parameters. Required. To specify no
291
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
292
+ # @param options [::Gapic::CallOptions, ::Hash]
293
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
294
+ #
295
+ # @overload get_user_list_direct_license(name: nil)
296
+ # Pass arguments to `get_user_list_direct_license` via keyword arguments. Note that at
297
+ # least one keyword argument is required. To specify no parameters, or to keep all
298
+ # the default parameter values, pass an empty Hash as a request object (see above).
299
+ #
300
+ # @param name [::String]
301
+ # Required. The resource name of the user list direct license.
302
+ #
303
+ # @yield [response, operation] Access the result along with the RPC operation
304
+ # @yieldparam response [::Google::Ads::DataManager::V1::UserListDirectLicense]
305
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
306
+ #
307
+ # @return [::Google::Ads::DataManager::V1::UserListDirectLicense]
308
+ #
309
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
310
+ #
311
+ # @example Basic example
312
+ # require "google/ads/data_manager/v1"
313
+ #
314
+ # # Create a client object. The client can be reused for multiple calls.
315
+ # client = Google::Ads::DataManager::V1::UserListDirectLicenseService::Client.new
316
+ #
317
+ # # Create a request. To set request fields, pass in keyword arguments.
318
+ # request = Google::Ads::DataManager::V1::GetUserListDirectLicenseRequest.new
319
+ #
320
+ # # Call the get_user_list_direct_license method.
321
+ # result = client.get_user_list_direct_license request
322
+ #
323
+ # # The returned object is of type Google::Ads::DataManager::V1::UserListDirectLicense.
324
+ # p result
325
+ #
326
+ def get_user_list_direct_license request, options = nil
327
+ raise ::ArgumentError, "request must be provided" if request.nil?
328
+
329
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Ads::DataManager::V1::GetUserListDirectLicenseRequest
330
+
331
+ # Converts hash and nil to an options object
332
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
333
+
334
+ # Customize the options with defaults
335
+ metadata = @config.rpcs.get_user_list_direct_license.metadata.to_h
336
+
337
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
338
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
339
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
340
+ gapic_version: ::Google::Ads::DataManager::V1::VERSION
341
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
342
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
343
+
344
+ header_params = {}
345
+ if request.name
346
+ header_params["name"] = request.name
347
+ end
348
+
349
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
350
+ metadata[:"x-goog-request-params"] ||= request_params_header
351
+
352
+ options.apply_defaults timeout: @config.rpcs.get_user_list_direct_license.timeout,
353
+ metadata: metadata,
354
+ retry_policy: @config.rpcs.get_user_list_direct_license.retry_policy
355
+
356
+ options.apply_defaults timeout: @config.timeout,
357
+ metadata: @config.metadata,
358
+ retry_policy: @config.retry_policy
359
+
360
+ @user_list_direct_license_service_stub.call_rpc :get_user_list_direct_license, request, options: options do |response, operation|
361
+ yield response, operation if block_given?
362
+ end
363
+ rescue ::GRPC::BadStatus => e
364
+ raise ::Google::Cloud::Error.from_error(e)
365
+ end
366
+
367
+ ##
368
+ # Updates a user list direct license.
369
+ #
370
+ # This feature is only available to data partners.
371
+ #
372
+ # @overload update_user_list_direct_license(request, options = nil)
373
+ # Pass arguments to `update_user_list_direct_license` via a request object, either of type
374
+ # {::Google::Ads::DataManager::V1::UpdateUserListDirectLicenseRequest} or an equivalent Hash.
375
+ #
376
+ # @param request [::Google::Ads::DataManager::V1::UpdateUserListDirectLicenseRequest, ::Hash]
377
+ # A request object representing the call parameters. Required. To specify no
378
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
379
+ # @param options [::Gapic::CallOptions, ::Hash]
380
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
381
+ #
382
+ # @overload update_user_list_direct_license(user_list_direct_license: nil, update_mask: nil)
383
+ # Pass arguments to `update_user_list_direct_license` via keyword arguments. Note that at
384
+ # least one keyword argument is required. To specify no parameters, or to keep all
385
+ # the default parameter values, pass an empty Hash as a request object (see above).
386
+ #
387
+ # @param user_list_direct_license [::Google::Ads::DataManager::V1::UserListDirectLicense, ::Hash]
388
+ # Required. The licenses' `name` field is used to identify the license to
389
+ # update.
390
+ # @param update_mask [::Google::Protobuf::FieldMask, ::Hash]
391
+ # Optional. The list of fields to update. The special character `*` is not
392
+ # supported and an `INVALID_UPDATE_MASK` error will be thrown if used.
393
+ #
394
+ # @yield [response, operation] Access the result along with the RPC operation
395
+ # @yieldparam response [::Google::Ads::DataManager::V1::UserListDirectLicense]
396
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
397
+ #
398
+ # @return [::Google::Ads::DataManager::V1::UserListDirectLicense]
399
+ #
400
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
401
+ #
402
+ # @example Basic example
403
+ # require "google/ads/data_manager/v1"
404
+ #
405
+ # # Create a client object. The client can be reused for multiple calls.
406
+ # client = Google::Ads::DataManager::V1::UserListDirectLicenseService::Client.new
407
+ #
408
+ # # Create a request. To set request fields, pass in keyword arguments.
409
+ # request = Google::Ads::DataManager::V1::UpdateUserListDirectLicenseRequest.new
410
+ #
411
+ # # Call the update_user_list_direct_license method.
412
+ # result = client.update_user_list_direct_license request
413
+ #
414
+ # # The returned object is of type Google::Ads::DataManager::V1::UserListDirectLicense.
415
+ # p result
416
+ #
417
+ def update_user_list_direct_license request, options = nil
418
+ raise ::ArgumentError, "request must be provided" if request.nil?
419
+
420
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Ads::DataManager::V1::UpdateUserListDirectLicenseRequest
421
+
422
+ # Converts hash and nil to an options object
423
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
424
+
425
+ # Customize the options with defaults
426
+ metadata = @config.rpcs.update_user_list_direct_license.metadata.to_h
427
+
428
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
429
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
430
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
431
+ gapic_version: ::Google::Ads::DataManager::V1::VERSION
432
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
433
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
434
+
435
+ header_params = {}
436
+ if request.user_list_direct_license&.name
437
+ header_params["user_list_direct_license.name"] = request.user_list_direct_license.name
438
+ end
439
+
440
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
441
+ metadata[:"x-goog-request-params"] ||= request_params_header
442
+
443
+ options.apply_defaults timeout: @config.rpcs.update_user_list_direct_license.timeout,
444
+ metadata: metadata,
445
+ retry_policy: @config.rpcs.update_user_list_direct_license.retry_policy
446
+
447
+ options.apply_defaults timeout: @config.timeout,
448
+ metadata: @config.metadata,
449
+ retry_policy: @config.retry_policy
450
+
451
+ @user_list_direct_license_service_stub.call_rpc :update_user_list_direct_license, request, options: options do |response, operation|
452
+ yield response, operation if block_given?
453
+ end
454
+ rescue ::GRPC::BadStatus => e
455
+ raise ::Google::Cloud::Error.from_error(e)
456
+ end
457
+
458
+ ##
459
+ # Lists all user list direct licenses owned by the parent account.
460
+ #
461
+ # This feature is only available to data partners.
462
+ #
463
+ # @overload list_user_list_direct_licenses(request, options = nil)
464
+ # Pass arguments to `list_user_list_direct_licenses` via a request object, either of type
465
+ # {::Google::Ads::DataManager::V1::ListUserListDirectLicensesRequest} or an equivalent Hash.
466
+ #
467
+ # @param request [::Google::Ads::DataManager::V1::ListUserListDirectLicensesRequest, ::Hash]
468
+ # A request object representing the call parameters. Required. To specify no
469
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
470
+ # @param options [::Gapic::CallOptions, ::Hash]
471
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
472
+ #
473
+ # @overload list_user_list_direct_licenses(parent: nil, filter: nil, page_size: nil, page_token: nil)
474
+ # Pass arguments to `list_user_list_direct_licenses` via keyword arguments. Note that at
475
+ # least one keyword argument is required. To specify no parameters, or to keep all
476
+ # the default parameter values, pass an empty Hash as a request object (see above).
477
+ #
478
+ # @param parent [::String]
479
+ # Required. The account whose licenses are being queried. Should be in the
480
+ # format accountTypes/\\{ACCOUNT_TYPE}/accounts/\\{ACCOUNT_ID}
481
+ # @param filter [::String]
482
+ # Optional. A [filter string](https://google.aip.dev/160) to apply to the
483
+ # list request. All fields need to be on the left hand side of each condition
484
+ # (for example: `user_list_id = 123`). Fields must be specified using either
485
+ # all [camel case](https://en.wikipedia.org/wiki/Camel_case) or all [snake
486
+ # case](https://en.wikipedia.org/wiki/Snake_case). Don't use a combination of
487
+ # camel case and snake case.
488
+ #
489
+ # **Supported Operations:**
490
+ #
491
+ # - `AND`
492
+ # - `=`
493
+ # - `!=`
494
+ # - `>`
495
+ # - `>=`
496
+ # - `<`
497
+ # - `<=`
498
+ #
499
+ # **Unsupported Fields:**
500
+ #
501
+ # - `name` (use get method instead)
502
+ # - `historical_pricings` and all its subfields
503
+ # - `pricing.start_time`
504
+ # - `pricing.end_time`
505
+ # @param page_size [::Integer]
506
+ # Optional. The maximum number of licenses to return per page. The service
507
+ # may return fewer than this value. If unspecified, at most 50 licenses will
508
+ # be returned. The maximum value is 1000; values above 1000 will be coerced
509
+ # to 1000.
510
+ # @param page_token [::String]
511
+ # Optional. A page token, received from a previous
512
+ # `ListUserListDirectLicense` call. Provide this to retrieve the subsequent
513
+ # page.
514
+ #
515
+ # When paginating, all other parameters provided to
516
+ # `ListUserListDirectLicense` must match the call that provided the page
517
+ # token.
518
+ #
519
+ # @yield [response, operation] Access the result along with the RPC operation
520
+ # @yieldparam response [::Gapic::PagedEnumerable<::Google::Ads::DataManager::V1::UserListDirectLicense>]
521
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
522
+ #
523
+ # @return [::Gapic::PagedEnumerable<::Google::Ads::DataManager::V1::UserListDirectLicense>]
524
+ #
525
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
526
+ #
527
+ # @example Basic example
528
+ # require "google/ads/data_manager/v1"
529
+ #
530
+ # # Create a client object. The client can be reused for multiple calls.
531
+ # client = Google::Ads::DataManager::V1::UserListDirectLicenseService::Client.new
532
+ #
533
+ # # Create a request. To set request fields, pass in keyword arguments.
534
+ # request = Google::Ads::DataManager::V1::ListUserListDirectLicensesRequest.new
535
+ #
536
+ # # Call the list_user_list_direct_licenses method.
537
+ # result = client.list_user_list_direct_licenses request
538
+ #
539
+ # # The returned object is of type Gapic::PagedEnumerable. You can iterate
540
+ # # over elements, and API calls will be issued to fetch pages as needed.
541
+ # result.each do |item|
542
+ # # Each element is of type ::Google::Ads::DataManager::V1::UserListDirectLicense.
543
+ # p item
544
+ # end
545
+ #
546
+ def list_user_list_direct_licenses request, options = nil
547
+ raise ::ArgumentError, "request must be provided" if request.nil?
548
+
549
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Ads::DataManager::V1::ListUserListDirectLicensesRequest
550
+
551
+ # Converts hash and nil to an options object
552
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
553
+
554
+ # Customize the options with defaults
555
+ metadata = @config.rpcs.list_user_list_direct_licenses.metadata.to_h
556
+
557
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
558
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
559
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
560
+ gapic_version: ::Google::Ads::DataManager::V1::VERSION
561
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
562
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
563
+
564
+ header_params = {}
565
+ if request.parent
566
+ header_params["parent"] = request.parent
567
+ end
568
+
569
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
570
+ metadata[:"x-goog-request-params"] ||= request_params_header
571
+
572
+ options.apply_defaults timeout: @config.rpcs.list_user_list_direct_licenses.timeout,
573
+ metadata: metadata,
574
+ retry_policy: @config.rpcs.list_user_list_direct_licenses.retry_policy
575
+
576
+ options.apply_defaults timeout: @config.timeout,
577
+ metadata: @config.metadata,
578
+ retry_policy: @config.retry_policy
579
+
580
+ @user_list_direct_license_service_stub.call_rpc :list_user_list_direct_licenses, request, options: options do |response, operation|
581
+ response = ::Gapic::PagedEnumerable.new @user_list_direct_license_service_stub, :list_user_list_direct_licenses, request, response, operation, options
582
+ yield response, operation if block_given?
583
+ throw :response, response
584
+ end
585
+ rescue ::GRPC::BadStatus => e
586
+ raise ::Google::Cloud::Error.from_error(e)
587
+ end
588
+
589
+ ##
590
+ # Configuration class for the UserListDirectLicenseService API.
591
+ #
592
+ # This class represents the configuration for UserListDirectLicenseService,
593
+ # providing control over timeouts, retry behavior, logging, transport
594
+ # parameters, and other low-level controls. Certain parameters can also be
595
+ # applied individually to specific RPCs. See
596
+ # {::Google::Ads::DataManager::V1::UserListDirectLicenseService::Client::Configuration::Rpcs}
597
+ # for a list of RPCs that can be configured independently.
598
+ #
599
+ # Configuration can be applied globally to all clients, or to a single client
600
+ # on construction.
601
+ #
602
+ # @example
603
+ #
604
+ # # Modify the global config, setting the timeout for
605
+ # # create_user_list_direct_license to 20 seconds,
606
+ # # and all remaining timeouts to 10 seconds.
607
+ # ::Google::Ads::DataManager::V1::UserListDirectLicenseService::Client.configure do |config|
608
+ # config.timeout = 10.0
609
+ # config.rpcs.create_user_list_direct_license.timeout = 20.0
610
+ # end
611
+ #
612
+ # # Apply the above configuration only to a new client.
613
+ # client = ::Google::Ads::DataManager::V1::UserListDirectLicenseService::Client.new do |config|
614
+ # config.timeout = 10.0
615
+ # config.rpcs.create_user_list_direct_license.timeout = 20.0
616
+ # end
617
+ #
618
+ # @!attribute [rw] endpoint
619
+ # A custom service endpoint, as a hostname or hostname:port. The default is
620
+ # nil, indicating to use the default endpoint in the current universe domain.
621
+ # @return [::String,nil]
622
+ # @!attribute [rw] credentials
623
+ # Credentials to send with calls. You may provide any of the following types:
624
+ # * (`Google::Auth::Credentials`) A googleauth credentials object
625
+ # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials))
626
+ # * (`Signet::OAuth2::Client`) A signet oauth2 client object
627
+ # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client))
628
+ # * (`GRPC::Core::Channel`) a gRPC channel with included credentials
629
+ # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object
630
+ # * (`nil`) indicating no credentials
631
+ #
632
+ # @note Warning: Passing a `String` to a keyfile path or a `Hash` of credentials
633
+ # is deprecated. Providing an unvalidated credential configuration to
634
+ # Google APIs can compromise the security of your systems and data.
635
+ #
636
+ # @example
637
+ #
638
+ # # The recommended way to provide credentials is to use the `make_creds` method
639
+ # # on the appropriate credentials class for your environment.
640
+ #
641
+ # require "googleauth"
642
+ #
643
+ # credentials = ::Google::Auth::ServiceAccountCredentials.make_creds(
644
+ # json_key_io: ::File.open("/path/to/keyfile.json")
645
+ # )
646
+ #
647
+ # client = ::Google::Ads::DataManager::V1::UserListDirectLicenseService::Client.new do |config|
648
+ # config.credentials = credentials
649
+ # end
650
+ #
651
+ # @note Warning: If you accept a credential configuration (JSON file or Hash) from an
652
+ # external source for authentication to Google Cloud, you must validate it before
653
+ # providing it to a Google API client library. Providing an unvalidated credential
654
+ # configuration to Google APIs can compromise the security of your systems and data.
655
+ # For more information, refer to [Validate credential configurations from external
656
+ # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials).
657
+ # @return [::Object]
658
+ # @!attribute [rw] scope
659
+ # The OAuth scopes
660
+ # @return [::Array<::String>]
661
+ # @!attribute [rw] lib_name
662
+ # The library name as recorded in instrumentation and logging
663
+ # @return [::String]
664
+ # @!attribute [rw] lib_version
665
+ # The library version as recorded in instrumentation and logging
666
+ # @return [::String]
667
+ # @!attribute [rw] channel_args
668
+ # Extra parameters passed to the gRPC channel. Note: this is ignored if a
669
+ # `GRPC::Core::Channel` object is provided as the credential.
670
+ # @return [::Hash]
671
+ # @!attribute [rw] interceptors
672
+ # An array of interceptors that are run before calls are executed.
673
+ # @return [::Array<::GRPC::ClientInterceptor>]
674
+ # @!attribute [rw] timeout
675
+ # The call timeout in seconds.
676
+ # @return [::Numeric]
677
+ # @!attribute [rw] metadata
678
+ # Additional gRPC headers to be sent with the call.
679
+ # @return [::Hash{::Symbol=>::String}]
680
+ # @!attribute [rw] retry_policy
681
+ # The retry policy. The value is a hash with the following keys:
682
+ # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds.
683
+ # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds.
684
+ # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier.
685
+ # * `:retry_codes` (*type:* `Array<String>`) - The error codes that should
686
+ # trigger a retry.
687
+ # @return [::Hash]
688
+ # @!attribute [rw] quota_project
689
+ # A separate project against which to charge quota.
690
+ # @return [::String]
691
+ # @!attribute [rw] universe_domain
692
+ # The universe domain within which to make requests. This determines the
693
+ # default endpoint URL. The default value of nil uses the environment
694
+ # universe (usually the default "googleapis.com" universe).
695
+ # @return [::String,nil]
696
+ # @!attribute [rw] logger
697
+ # A custom logger to use for request/response debug logging, or the value
698
+ # `:default` (the default) to construct a default logger, or `nil` to
699
+ # explicitly disable logging.
700
+ # @return [::Logger,:default,nil]
701
+ #
702
+ class Configuration
703
+ extend ::Gapic::Config
704
+
705
+ # @private
706
+ # The endpoint specific to the default "googleapis.com" universe. Deprecated.
707
+ DEFAULT_ENDPOINT = "datamanager.googleapis.com"
708
+
709
+ config_attr :endpoint, nil, ::String, nil
710
+ config_attr :credentials, nil do |value|
711
+ allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil]
712
+ allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC::Core::Channel
713
+ allowed.any? { |klass| klass === value }
714
+ end
715
+ config_attr :scope, nil, ::String, ::Array, nil
716
+ config_attr :lib_name, nil, ::String, nil
717
+ config_attr :lib_version, nil, ::String, nil
718
+ config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil)
719
+ config_attr :interceptors, nil, ::Array, nil
720
+ config_attr :timeout, nil, ::Numeric, nil
721
+ config_attr :metadata, nil, ::Hash, nil
722
+ config_attr :retry_policy, nil, ::Hash, ::Proc, nil
723
+ config_attr :quota_project, nil, ::String, nil
724
+ config_attr :universe_domain, nil, ::String, nil
725
+ config_attr :logger, :default, ::Logger, nil, :default
726
+
727
+ # @private
728
+ def initialize parent_config = nil
729
+ @parent_config = parent_config unless parent_config.nil?
730
+
731
+ yield self if block_given?
732
+ end
733
+
734
+ ##
735
+ # Configurations for individual RPCs
736
+ # @return [Rpcs]
737
+ #
738
+ def rpcs
739
+ @rpcs ||= begin
740
+ parent_rpcs = nil
741
+ parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs)
742
+ Rpcs.new parent_rpcs
743
+ end
744
+ end
745
+
746
+ ##
747
+ # Configuration for the channel pool
748
+ # @return [::Gapic::ServiceStub::ChannelPool::Configuration]
749
+ #
750
+ def channel_pool
751
+ @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new
752
+ end
753
+
754
+ ##
755
+ # Configuration RPC class for the UserListDirectLicenseService API.
756
+ #
757
+ # Includes fields providing the configuration for each RPC in this service.
758
+ # Each configuration object is of type `Gapic::Config::Method` and includes
759
+ # the following configuration fields:
760
+ #
761
+ # * `timeout` (*type:* `Numeric`) - The call timeout in seconds
762
+ # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers
763
+ # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields
764
+ # include the following keys:
765
+ # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds.
766
+ # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds.
767
+ # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier.
768
+ # * `:retry_codes` (*type:* `Array<String>`) - The error codes that should
769
+ # trigger a retry.
770
+ #
771
+ class Rpcs
772
+ ##
773
+ # RPC-specific configuration for `create_user_list_direct_license`
774
+ # @return [::Gapic::Config::Method]
775
+ #
776
+ attr_reader :create_user_list_direct_license
777
+ ##
778
+ # RPC-specific configuration for `get_user_list_direct_license`
779
+ # @return [::Gapic::Config::Method]
780
+ #
781
+ attr_reader :get_user_list_direct_license
782
+ ##
783
+ # RPC-specific configuration for `update_user_list_direct_license`
784
+ # @return [::Gapic::Config::Method]
785
+ #
786
+ attr_reader :update_user_list_direct_license
787
+ ##
788
+ # RPC-specific configuration for `list_user_list_direct_licenses`
789
+ # @return [::Gapic::Config::Method]
790
+ #
791
+ attr_reader :list_user_list_direct_licenses
792
+
793
+ # @private
794
+ def initialize parent_rpcs = nil
795
+ create_user_list_direct_license_config = parent_rpcs.create_user_list_direct_license if parent_rpcs.respond_to? :create_user_list_direct_license
796
+ @create_user_list_direct_license = ::Gapic::Config::Method.new create_user_list_direct_license_config
797
+ get_user_list_direct_license_config = parent_rpcs.get_user_list_direct_license if parent_rpcs.respond_to? :get_user_list_direct_license
798
+ @get_user_list_direct_license = ::Gapic::Config::Method.new get_user_list_direct_license_config
799
+ update_user_list_direct_license_config = parent_rpcs.update_user_list_direct_license if parent_rpcs.respond_to? :update_user_list_direct_license
800
+ @update_user_list_direct_license = ::Gapic::Config::Method.new update_user_list_direct_license_config
801
+ list_user_list_direct_licenses_config = parent_rpcs.list_user_list_direct_licenses if parent_rpcs.respond_to? :list_user_list_direct_licenses
802
+ @list_user_list_direct_licenses = ::Gapic::Config::Method.new list_user_list_direct_licenses_config
803
+
804
+ yield self if block_given?
805
+ end
806
+ end
807
+ end
808
+ end
809
+ end
810
+ end
811
+ end
812
+ end
813
+ end