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