google-ads-data_manager-v1 0.12.0 → 0.13.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 (32) hide show
  1. checksums.yaml +4 -4
  2. data/lib/google/ads/data_manager/v1/ingestion_service/client.rb +9 -0
  3. data/lib/google/ads/data_manager/v1/ingestion_service/rest/client.rb +9 -0
  4. data/lib/google/ads/data_manager/v1/reporting_service/client.rb +536 -0
  5. data/lib/google/ads/data_manager/v1/reporting_service/credentials.rb +47 -0
  6. data/lib/google/ads/data_manager/v1/reporting_service/rest/client.rb +486 -0
  7. data/lib/google/ads/data_manager/v1/reporting_service/rest/service_stub.rb +142 -0
  8. data/lib/google/ads/data_manager/v1/reporting_service/rest.rb +51 -0
  9. data/lib/google/ads/data_manager/v1/reporting_service.rb +54 -0
  10. data/lib/google/ads/data_manager/v1/rest.rb +1 -0
  11. data/lib/google/ads/data_manager/v1/version.rb +1 -1
  12. data/lib/google/ads/data_manager/v1.rb +1 -0
  13. data/lib/google/ads/datamanager/v1/call_info_pb.rb +24 -0
  14. data/lib/google/ads/datamanager/v1/error_pb.rb +1 -1
  15. data/lib/google/ads/datamanager/v1/event_pb.rb +2 -1
  16. data/lib/google/ads/datamanager/v1/ingestion_service_services_pb.rb +9 -0
  17. data/lib/google/ads/datamanager/v1/partner_match_report_entry_pb.rb +28 -0
  18. data/lib/google/ads/datamanager/v1/processing_errors_pb.rb +1 -1
  19. data/lib/google/ads/datamanager/v1/reporting_service_pb.rb +27 -0
  20. data/lib/google/ads/datamanager/v1/reporting_service_services_pb.rb +47 -0
  21. data/proto_docs/google/ads/datamanager/v1/call_info.rb +36 -0
  22. data/proto_docs/google/ads/datamanager/v1/cart_data.rb +1 -1
  23. data/proto_docs/google/ads/datamanager/v1/error.rb +37 -6
  24. data/proto_docs/google/ads/datamanager/v1/event.rb +8 -1
  25. data/proto_docs/google/ads/datamanager/v1/item_parameter.rb +1 -1
  26. data/proto_docs/google/ads/datamanager/v1/partner_match_report_entry.rb +119 -0
  27. data/proto_docs/google/ads/datamanager/v1/processing_errors.rb +38 -0
  28. data/proto_docs/google/ads/datamanager/v1/reporting_service.rb +108 -0
  29. data/proto_docs/google/ads/datamanager/v1/user_list.rb +5 -5
  30. data/proto_docs/google/ads/datamanager/v1/user_properties.rb +2 -2
  31. data/proto_docs/google/type/money.rb +43 -0
  32. metadata +15 -1
@@ -0,0 +1,486 @@
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/reporting_service_pb"
21
+ require "google/ads/data_manager/v1/reporting_service/rest/service_stub"
22
+
23
+ module Google
24
+ module Ads
25
+ module DataManager
26
+ module V1
27
+ module ReportingService
28
+ module Rest
29
+ ##
30
+ # REST client for the ReportingService service.
31
+ #
32
+ # Service for querying reports.
33
+ #
34
+ class Client
35
+ # @private
36
+ API_VERSION = ""
37
+
38
+ # @private
39
+ DEFAULT_ENDPOINT_TEMPLATE = "datamanager.$UNIVERSE_DOMAIN$"
40
+
41
+ # @private
42
+ attr_reader :reporting_service_stub
43
+
44
+ ##
45
+ # Configure the ReportingService Client class.
46
+ #
47
+ # See {::Google::Ads::DataManager::V1::ReportingService::Rest::Client::Configuration}
48
+ # for a description of the configuration fields.
49
+ #
50
+ # @example
51
+ #
52
+ # # Modify the configuration for all ReportingService clients
53
+ # ::Google::Ads::DataManager::V1::ReportingService::Rest::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 ReportingService 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::ReportingService::Rest::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
+ @reporting_service_stub.universe_domain
106
+ end
107
+
108
+ ##
109
+ # Create a new ReportingService REST client object.
110
+ #
111
+ # @example
112
+ #
113
+ # # Create a client using the default configuration
114
+ # client = ::Google::Ads::DataManager::V1::ReportingService::Rest::Client.new
115
+ #
116
+ # # Create a client using a custom configuration
117
+ # client = ::Google::Ads::DataManager::V1::ReportingService::Rest::Client.new do |config|
118
+ # config.timeout = 10.0
119
+ # end
120
+ #
121
+ # @yield [config] Configure the ReportingService client.
122
+ # @yieldparam config [Client::Configuration]
123
+ #
124
+ def initialize
125
+ # Create the configuration object
126
+ @config = Configuration.new Client.configure
127
+
128
+ # Yield the configuration if needed
129
+ yield @config if block_given?
130
+
131
+ # Create credentials
132
+ credentials = @config.credentials
133
+ # Use self-signed JWT if the endpoint is unchanged from default,
134
+ # but only if the default endpoint does not have a region prefix.
135
+ enable_self_signed_jwt = @config.endpoint.nil? ||
136
+ (@config.endpoint == Configuration::DEFAULT_ENDPOINT &&
137
+ !@config.endpoint.split(".").first.include?("-"))
138
+ credentials ||= Credentials.default scope: @config.scope,
139
+ enable_self_signed_jwt: enable_self_signed_jwt
140
+ if credentials.is_a?(::String) || credentials.is_a?(::Hash)
141
+ credentials = Credentials.new credentials, scope: @config.scope
142
+ end
143
+
144
+ @quota_project_id = @config.quota_project
145
+ @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id
146
+
147
+ @reporting_service_stub = ::Google::Ads::DataManager::V1::ReportingService::Rest::ServiceStub.new(
148
+ endpoint: @config.endpoint,
149
+ endpoint_template: DEFAULT_ENDPOINT_TEMPLATE,
150
+ universe_domain: @config.universe_domain,
151
+ credentials: credentials,
152
+ logger: @config.logger
153
+ )
154
+
155
+ @reporting_service_stub.logger(stub: true)&.info do |entry|
156
+ entry.set_system_name
157
+ entry.set_service
158
+ entry.message = "Created client for #{entry.service}"
159
+ entry.set_credentials_fields credentials
160
+ entry.set "customEndpoint", @config.endpoint if @config.endpoint
161
+ entry.set "defaultTimeout", @config.timeout if @config.timeout
162
+ entry.set "quotaProject", @quota_project_id if @quota_project_id
163
+ end
164
+ end
165
+
166
+ ##
167
+ # The logger used for request/response debug logging.
168
+ #
169
+ # @return [Logger]
170
+ #
171
+ def logger
172
+ @reporting_service_stub.logger
173
+ end
174
+
175
+ # Service calls
176
+
177
+ ##
178
+ # Retrieves a partner match report.
179
+ #
180
+ # This feature is only available to data partners.
181
+ #
182
+ # @overload retrieve_partner_match_report(request, options = nil)
183
+ # Pass arguments to `retrieve_partner_match_report` via a request object, either of type
184
+ # {::Google::Ads::DataManager::V1::RetrievePartnerMatchReportRequest} or an equivalent Hash.
185
+ #
186
+ # @param request [::Google::Ads::DataManager::V1::RetrievePartnerMatchReportRequest, ::Hash]
187
+ # A request object representing the call parameters. Required. To specify no
188
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
189
+ # @param options [::Gapic::CallOptions, ::Hash]
190
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
191
+ #
192
+ # @overload retrieve_partner_match_report(parent: nil, currency_code: nil, filter: nil, start_date: nil, end_date: nil, page_size: nil, page_token: nil)
193
+ # Pass arguments to `retrieve_partner_match_report` via keyword arguments. Note that at
194
+ # least one keyword argument is required. To specify no parameters, or to keep all
195
+ # the default parameter values, pass an empty Hash as a request object (see above).
196
+ #
197
+ # @param parent [::String]
198
+ # Required. The parent account that owns the user list.
199
+ # Format: `accountTypes/{account_type}/accounts/{account}`
200
+ # @param currency_code [::String]
201
+ # Optional. The currency to return the costs/fees in. If unspecified,
202
+ # defaults to the Data Partner's currency
203
+ # @param filter [::String]
204
+ # Optional. A [filter string](https://google.aip.dev/160) to apply to the
205
+ # list request. All fields need to be on the left hand side of each condition
206
+ # (for example: `user_list_id = 123`). Fields must be specified using either
207
+ # all [camel case](https://en.wikipedia.org/wiki/Camel_case) or all [snake
208
+ # case](https://en.wikipedia.org/wiki/Snake_case). Don't use a combination of
209
+ # camel case and snake case.
210
+ #
211
+ # **Supported Operations:**
212
+ #
213
+ # - `AND`
214
+ # - `=`
215
+ # - `!=`
216
+ # - `>`
217
+ # - `>=`
218
+ # - `<`
219
+ # - `<=`
220
+ #
221
+ # **Supported Functions:**
222
+ # - `IN(field, value1, value2, ...)`: returns true if the field matches any
223
+ # of the values. Example: `IN(user_list_id, 123, 456)`
224
+ #
225
+ # **Supported Fields:**
226
+ #
227
+ # - `advertiser_account.account_type`
228
+ # - `advertiser_account.account_id`
229
+ # - `campaign.campaign_id`
230
+ # - `ad_group.ad_group_id`
231
+ # - `user_list.user_list_id`
232
+ # @param start_date [::Integer]
233
+ # Required. The start date (inclusive) of the report data to retrieve. Only
234
+ # data from the last 2 years can be retrieved. If the start date is set to
235
+ # an older date, only data from the last 2 years will be returned. Should be
236
+ # in the format YYYYMMDD.
237
+ # @param end_date [::Integer]
238
+ # Optional. The end date (inclusive) of the report data to retrieve. Defaults
239
+ # to the current date if not populated. Should be in the format YYYYMMDD.
240
+ # @param page_size [::Integer]
241
+ # Optional. The maximum number of partner match report entries to return per
242
+ # page. The service may return fewer than this value. If unspecified, at most
243
+ # 50 reports will be returned. The maximum value is 1000; values above 1000
244
+ # will be coerced to 1000.
245
+ # @param page_token [::String]
246
+ # Optional. A page token, received from a previous
247
+ # `RetrievePartnerMatchReport` call. Provide this to retrieve the subsequent
248
+ # page.
249
+ #
250
+ # When paginating, all other parameters provided to
251
+ # `RetrievePartnerMatchReport` must match the call that provided the page
252
+ # token.
253
+ # @yield [result, operation] Access the result along with the TransportOperation object
254
+ # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Ads::DataManager::V1::PartnerMatchReportEntry>]
255
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
256
+ #
257
+ # @return [::Gapic::Rest::PagedEnumerable<::Google::Ads::DataManager::V1::PartnerMatchReportEntry>]
258
+ #
259
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
260
+ #
261
+ # @example Basic example
262
+ # require "google/ads/data_manager/v1"
263
+ #
264
+ # # Create a client object. The client can be reused for multiple calls.
265
+ # client = Google::Ads::DataManager::V1::ReportingService::Rest::Client.new
266
+ #
267
+ # # Create a request. To set request fields, pass in keyword arguments.
268
+ # request = Google::Ads::DataManager::V1::RetrievePartnerMatchReportRequest.new
269
+ #
270
+ # # Call the retrieve_partner_match_report method.
271
+ # result = client.retrieve_partner_match_report request
272
+ #
273
+ # # The returned object is of type Gapic::PagedEnumerable. You can iterate
274
+ # # over elements, and API calls will be issued to fetch pages as needed.
275
+ # result.each do |item|
276
+ # # Each element is of type ::Google::Ads::DataManager::V1::PartnerMatchReportEntry.
277
+ # p item
278
+ # end
279
+ #
280
+ def retrieve_partner_match_report request, options = nil
281
+ raise ::ArgumentError, "request must be provided" if request.nil?
282
+
283
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Ads::DataManager::V1::RetrievePartnerMatchReportRequest
284
+
285
+ # Converts hash and nil to an options object
286
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
287
+
288
+ # Customize the options with defaults
289
+ call_metadata = @config.rpcs.retrieve_partner_match_report.metadata.to_h
290
+
291
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
292
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
293
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
294
+ gapic_version: ::Google::Ads::DataManager::V1::VERSION,
295
+ transports_version_send: [:rest]
296
+
297
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
298
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
299
+
300
+ options.apply_defaults timeout: @config.rpcs.retrieve_partner_match_report.timeout,
301
+ metadata: call_metadata,
302
+ retry_policy: @config.rpcs.retrieve_partner_match_report.retry_policy
303
+
304
+ options.apply_defaults timeout: @config.timeout,
305
+ metadata: @config.metadata,
306
+ retry_policy: @config.retry_policy
307
+
308
+ @reporting_service_stub.retrieve_partner_match_report request, options do |result, operation|
309
+ result = ::Gapic::Rest::PagedEnumerable.new @reporting_service_stub, :retrieve_partner_match_report, "partner_match_report_entries", request, result, options
310
+ yield result, operation if block_given?
311
+ throw :response, result
312
+ end
313
+ rescue ::Gapic::Rest::Error => e
314
+ raise ::Google::Cloud::Error.from_error(e)
315
+ end
316
+
317
+ ##
318
+ # Configuration class for the ReportingService REST API.
319
+ #
320
+ # This class represents the configuration for ReportingService REST,
321
+ # providing control over timeouts, retry behavior, logging, transport
322
+ # parameters, and other low-level controls. Certain parameters can also be
323
+ # applied individually to specific RPCs. See
324
+ # {::Google::Ads::DataManager::V1::ReportingService::Rest::Client::Configuration::Rpcs}
325
+ # for a list of RPCs that can be configured independently.
326
+ #
327
+ # Configuration can be applied globally to all clients, or to a single client
328
+ # on construction.
329
+ #
330
+ # @example
331
+ #
332
+ # # Modify the global config, setting the timeout for
333
+ # # retrieve_partner_match_report to 20 seconds,
334
+ # # and all remaining timeouts to 10 seconds.
335
+ # ::Google::Ads::DataManager::V1::ReportingService::Rest::Client.configure do |config|
336
+ # config.timeout = 10.0
337
+ # config.rpcs.retrieve_partner_match_report.timeout = 20.0
338
+ # end
339
+ #
340
+ # # Apply the above configuration only to a new client.
341
+ # client = ::Google::Ads::DataManager::V1::ReportingService::Rest::Client.new do |config|
342
+ # config.timeout = 10.0
343
+ # config.rpcs.retrieve_partner_match_report.timeout = 20.0
344
+ # end
345
+ #
346
+ # @!attribute [rw] endpoint
347
+ # A custom service endpoint, as a hostname or hostname:port. The default is
348
+ # nil, indicating to use the default endpoint in the current universe domain.
349
+ # @return [::String,nil]
350
+ # @!attribute [rw] credentials
351
+ # Credentials to send with calls. You may provide any of the following types:
352
+ # * (`String`) The path to a service account key file in JSON format
353
+ # * (`Hash`) A service account key as a Hash
354
+ # * (`Google::Auth::Credentials`) A googleauth credentials object
355
+ # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials))
356
+ # * (`Signet::OAuth2::Client`) A signet oauth2 client object
357
+ # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client))
358
+ # * (`nil`) indicating no credentials
359
+ #
360
+ # Warning: If you accept a credential configuration (JSON file or Hash) from an
361
+ # external source for authentication to Google Cloud, you must validate it before
362
+ # providing it to a Google API client library. Providing an unvalidated credential
363
+ # configuration to Google APIs can compromise the security of your systems and data.
364
+ # For more information, refer to [Validate credential configurations from external
365
+ # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials).
366
+ # @return [::Object]
367
+ # @!attribute [rw] scope
368
+ # The OAuth scopes
369
+ # @return [::Array<::String>]
370
+ # @!attribute [rw] lib_name
371
+ # The library name as recorded in instrumentation and logging
372
+ # @return [::String]
373
+ # @!attribute [rw] lib_version
374
+ # The library version as recorded in instrumentation and logging
375
+ # @return [::String]
376
+ # @!attribute [rw] timeout
377
+ # The call timeout in seconds.
378
+ # @return [::Numeric]
379
+ # @!attribute [rw] metadata
380
+ # Additional headers to be sent with the call.
381
+ # @return [::Hash{::Symbol=>::String}]
382
+ # @!attribute [rw] retry_policy
383
+ # The retry policy. The value is a hash with the following keys:
384
+ # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds.
385
+ # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds.
386
+ # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier.
387
+ # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0.
388
+ # * `:retry_codes` (*type:* `Array<String>`) - The error codes that should
389
+ # trigger a retry.
390
+ # @return [::Hash]
391
+ # @!attribute [rw] quota_project
392
+ # A separate project against which to charge quota.
393
+ # @return [::String]
394
+ # @!attribute [rw] universe_domain
395
+ # The universe domain within which to make requests. This determines the
396
+ # default endpoint URL. The default value of nil uses the environment
397
+ # universe (usually the default "googleapis.com" universe).
398
+ # @return [::String,nil]
399
+ # @!attribute [rw] logger
400
+ # A custom logger to use for request/response debug logging, or the value
401
+ # `:default` (the default) to construct a default logger, or `nil` to
402
+ # explicitly disable logging.
403
+ # @return [::Logger,:default,nil]
404
+ #
405
+ class Configuration
406
+ extend ::Gapic::Config
407
+
408
+ # @private
409
+ # The endpoint specific to the default "googleapis.com" universe. Deprecated.
410
+ DEFAULT_ENDPOINT = "datamanager.googleapis.com"
411
+
412
+ config_attr :endpoint, nil, ::String, nil
413
+ config_attr :credentials, nil do |value|
414
+ allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil]
415
+ allowed.any? { |klass| klass === value }
416
+ end
417
+ config_attr :scope, nil, ::String, ::Array, nil
418
+ config_attr :lib_name, nil, ::String, nil
419
+ config_attr :lib_version, nil, ::String, nil
420
+ config_attr :timeout, nil, ::Numeric, nil
421
+ config_attr :metadata, nil, ::Hash, nil
422
+ config_attr :retry_policy, nil, ::Hash, ::Proc, nil
423
+ config_attr :quota_project, nil, ::String, nil
424
+ config_attr :universe_domain, nil, ::String, nil
425
+ config_attr :logger, :default, ::Logger, nil, :default
426
+
427
+ # @private
428
+ def initialize parent_config = nil
429
+ @parent_config = parent_config unless parent_config.nil?
430
+
431
+ yield self if block_given?
432
+ end
433
+
434
+ ##
435
+ # Configurations for individual RPCs
436
+ # @return [Rpcs]
437
+ #
438
+ def rpcs
439
+ @rpcs ||= begin
440
+ parent_rpcs = nil
441
+ parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs)
442
+ Rpcs.new parent_rpcs
443
+ end
444
+ end
445
+
446
+ ##
447
+ # Configuration RPC class for the ReportingService API.
448
+ #
449
+ # Includes fields providing the configuration for each RPC in this service.
450
+ # Each configuration object is of type `Gapic::Config::Method` and includes
451
+ # the following configuration fields:
452
+ #
453
+ # * `timeout` (*type:* `Numeric`) - The call timeout in seconds
454
+ # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers
455
+ # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields
456
+ # include the following keys:
457
+ # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds.
458
+ # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds.
459
+ # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier.
460
+ # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0.
461
+ # * `:retry_codes` (*type:* `Array<String>`) - The error codes that should
462
+ # trigger a retry.
463
+ #
464
+ class Rpcs
465
+ ##
466
+ # RPC-specific configuration for `retrieve_partner_match_report`
467
+ # @return [::Gapic::Config::Method]
468
+ #
469
+ attr_reader :retrieve_partner_match_report
470
+
471
+ # @private
472
+ def initialize parent_rpcs = nil
473
+ retrieve_partner_match_report_config = parent_rpcs.retrieve_partner_match_report if parent_rpcs.respond_to? :retrieve_partner_match_report
474
+ @retrieve_partner_match_report = ::Gapic::Config::Method.new retrieve_partner_match_report_config
475
+
476
+ yield self if block_given?
477
+ end
478
+ end
479
+ end
480
+ end
481
+ end
482
+ end
483
+ end
484
+ end
485
+ end
486
+ end
@@ -0,0 +1,142 @@
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/ads/datamanager/v1/reporting_service_pb"
20
+
21
+ module Google
22
+ module Ads
23
+ module DataManager
24
+ module V1
25
+ module ReportingService
26
+ module Rest
27
+ ##
28
+ # REST service stub for the ReportingService service.
29
+ # Service stub contains baseline method implementations
30
+ # including transcoding, making the REST call, and deserialing the response.
31
+ #
32
+ class ServiceStub
33
+ # @private
34
+ def initialize endpoint:, endpoint_template:, universe_domain:, credentials:, logger:
35
+ # These require statements are intentionally placed here to initialize
36
+ # the REST modules only when it's required.
37
+ require "gapic/rest"
38
+
39
+ @client_stub = ::Gapic::Rest::ClientStub.new endpoint: endpoint,
40
+ endpoint_template: endpoint_template,
41
+ universe_domain: universe_domain,
42
+ credentials: credentials,
43
+ numeric_enums: true,
44
+ service_name: self.class,
45
+ raise_faraday_errors: false,
46
+ logger: logger
47
+ end
48
+
49
+ ##
50
+ # The effective universe domain
51
+ #
52
+ # @return [String]
53
+ #
54
+ def universe_domain
55
+ @client_stub.universe_domain
56
+ end
57
+
58
+ ##
59
+ # The effective endpoint
60
+ #
61
+ # @return [String]
62
+ #
63
+ def endpoint
64
+ @client_stub.endpoint
65
+ end
66
+
67
+ ##
68
+ # The logger used for request/response debug logging.
69
+ #
70
+ # @return [Logger]
71
+ #
72
+ def logger stub: false
73
+ stub ? @client_stub.stub_logger : @client_stub.logger
74
+ end
75
+
76
+ ##
77
+ # Baseline implementation for the retrieve_partner_match_report REST call
78
+ #
79
+ # @param request_pb [::Google::Ads::DataManager::V1::RetrievePartnerMatchReportRequest]
80
+ # A request object representing the call parameters. Required.
81
+ # @param options [::Gapic::CallOptions]
82
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
83
+ #
84
+ # @yield [result, operation] Access the result along with the TransportOperation object
85
+ # @yieldparam result [::Google::Ads::DataManager::V1::RetrievePartnerMatchReportResponse]
86
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
87
+ #
88
+ # @return [::Google::Ads::DataManager::V1::RetrievePartnerMatchReportResponse]
89
+ # A result object deserialized from the server's reply
90
+ def retrieve_partner_match_report request_pb, options = nil
91
+ raise ::ArgumentError, "request must be provided" if request_pb.nil?
92
+
93
+ verb, uri, query_string_params, body = ServiceStub.transcode_retrieve_partner_match_report_request request_pb
94
+ query_string_params = if query_string_params.any?
95
+ query_string_params.to_h { |p| p.split "=", 2 }
96
+ else
97
+ {}
98
+ end
99
+
100
+ response = @client_stub.make_http_request(
101
+ verb,
102
+ uri: uri,
103
+ body: body || "",
104
+ params: query_string_params,
105
+ method_name: "retrieve_partner_match_report",
106
+ options: options
107
+ )
108
+ operation = ::Gapic::Rest::TransportOperation.new response
109
+ result = ::Google::Ads::DataManager::V1::RetrievePartnerMatchReportResponse.decode_json response.body, ignore_unknown_fields: true
110
+ catch :response do
111
+ yield result, operation if block_given?
112
+ result
113
+ end
114
+ end
115
+
116
+ ##
117
+ # @private
118
+ #
119
+ # GRPC transcoding helper method for the retrieve_partner_match_report REST call
120
+ #
121
+ # @param request_pb [::Google::Ads::DataManager::V1::RetrievePartnerMatchReportRequest]
122
+ # A request object representing the call parameters. Required.
123
+ # @return [Array(String, [String, nil], Hash{String => String})]
124
+ # Uri, Body, Query string parameters
125
+ def self.transcode_retrieve_partner_match_report_request request_pb
126
+ transcoder = Gapic::Rest::GrpcTranscoder.new
127
+ .with_bindings(
128
+ uri_method: :get,
129
+ uri_template: "/v1/{parent}/reports:retrievePartnerMatchReport",
130
+ matches: [
131
+ ["parent", %r{^accountTypes/[^/]+/accounts/[^/]+/?$}, false]
132
+ ]
133
+ )
134
+ transcoder.transcode request_pb
135
+ end
136
+ end
137
+ end
138
+ end
139
+ end
140
+ end
141
+ end
142
+ end
@@ -0,0 +1,51 @@
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 "gapic/rest"
20
+ require "gapic/config"
21
+ require "gapic/config/method"
22
+
23
+ require "google/ads/data_manager/v1/version"
24
+
25
+ require "google/ads/data_manager/v1/reporting_service/credentials"
26
+ require "google/ads/data_manager/v1/reporting_service/rest/client"
27
+
28
+ module Google
29
+ module Ads
30
+ module DataManager
31
+ module V1
32
+ ##
33
+ # Service for querying reports.
34
+ #
35
+ # To load this service and instantiate a REST client:
36
+ #
37
+ # require "google/ads/data_manager/v1/reporting_service/rest"
38
+ # client = ::Google::Ads::DataManager::V1::ReportingService::Rest::Client.new
39
+ #
40
+ module ReportingService
41
+ # Client for the REST transport
42
+ module Rest
43
+ end
44
+ end
45
+ end
46
+ end
47
+ end
48
+ end
49
+
50
+ helper_path = ::File.join __dir__, "rest", "helpers.rb"
51
+ require "google/ads/data_manager/v1/reporting_service/rest/helpers" if ::File.file? helper_path