google-ads-ad_manager-v1 2.3.0 → 3.0.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.
- checksums.yaml +4 -4
- data/lib/google/ads/ad_manager/v1/ad_review_center_ad_service/rest/client.rb +3 -2
- data/lib/google/ads/ad_manager/v1/ad_unit_service/paths.rb +34 -0
- data/lib/google/ads/ad_manager/v1/ad_unit_service/rest/client.rb +624 -0
- data/lib/google/ads/ad_manager/v1/ad_unit_service/rest/service_stub.rb +434 -0
- data/lib/google/ads/ad_manager/v1/cms_metadata_value_service/rest/client.rb +2 -2
- data/lib/google/ads/ad_manager/v1/custom_targeting_key_service/rest/client.rb +538 -0
- data/lib/google/ads/ad_manager/v1/custom_targeting_key_service/rest/service_stub.rb +372 -0
- data/lib/google/ads/ad_manager/v1/line_item_service/credentials.rb +47 -0
- data/lib/google/ads/ad_manager/v1/line_item_service/paths.rb +64 -0
- data/lib/google/ads/ad_manager/v1/line_item_service/rest/client.rb +538 -0
- data/lib/google/ads/ad_manager/v1/line_item_service/rest/service_stub.rb +203 -0
- data/lib/google/ads/ad_manager/v1/line_item_service/rest.rb +52 -0
- data/lib/google/ads/ad_manager/v1/line_item_service.rb +48 -0
- data/lib/google/ads/ad_manager/v1/network_service/rest/client.rb +29 -4
- data/lib/google/ads/ad_manager/v1/rest.rb +1 -0
- data/lib/google/ads/ad_manager/v1/version.rb +1 -1
- data/lib/google/ads/ad_manager/v1.rb +1 -0
- data/lib/google/ads/admanager/v1/ad_review_center_ad_service_pb.rb +1 -1
- data/lib/google/ads/admanager/v1/ad_unit_service_pb.rb +15 -1
- data/lib/google/ads/admanager/v1/ad_unit_service_services_pb.rb +14 -0
- data/lib/google/ads/admanager/v1/cms_metadata_value_service_services_pb.rb +1 -1
- data/lib/google/ads/admanager/v1/custom_targeting_key_service_pb.rb +13 -1
- data/lib/google/ads/admanager/v1/custom_targeting_key_service_services_pb.rb +12 -0
- data/lib/google/ads/admanager/v1/goal_enums_pb.rb +45 -0
- data/lib/google/ads/admanager/v1/goal_pb.rb +44 -0
- data/lib/google/ads/admanager/v1/line_item_enums_pb.rb +43 -0
- data/lib/google/ads/admanager/v1/line_item_messages_pb.rb +54 -0
- data/lib/google/ads/admanager/v1/line_item_service_pb.rb +51 -0
- data/lib/google/ads/admanager/v1/line_item_service_services_pb.rb +47 -0
- data/lib/google/ads/admanager/v1/network_messages_pb.rb +1 -1
- data/lib/google/ads/admanager/v1/network_service_pb.rb +1 -1
- data/lib/google/ads/admanager/v1/order_messages_pb.rb +1 -1
- data/lib/google/ads/admanager/v1/report_definition_pb.rb +1 -1
- data/lib/google/ads/admanager/v1/report_messages_pb.rb +1 -1
- data/proto_docs/google/ads/admanager/v1/ad_review_center_ad_service.rb +3 -2
- data/proto_docs/google/ads/admanager/v1/ad_unit_service.rb +135 -0
- data/proto_docs/google/ads/admanager/v1/cms_metadata_value_service.rb +1 -1
- data/proto_docs/google/ads/admanager/v1/custom_targeting_key_service.rb +118 -0
- data/proto_docs/google/ads/admanager/v1/goal.rb +59 -0
- data/proto_docs/google/ads/admanager/v1/goal_enums.rb +136 -0
- data/proto_docs/google/ads/admanager/v1/line_item_enums.rb +90 -0
- data/proto_docs/google/ads/admanager/v1/line_item_messages.rb +74 -0
- data/proto_docs/google/ads/admanager/v1/line_item_service.rb +99 -0
- data/proto_docs/google/ads/admanager/v1/network_service.rb +31 -0
- data/proto_docs/google/ads/admanager/v1/order_messages.rb +3 -2
- data/proto_docs/google/ads/admanager/v1/report_definition.rb +926 -57
- data/proto_docs/google/ads/admanager/v1/report_messages.rb +4 -1
- metadata +18 -1
|
@@ -362,6 +362,502 @@ module Google
|
|
|
362
362
|
raise ::Google::Cloud::Error.from_error(e)
|
|
363
363
|
end
|
|
364
364
|
|
|
365
|
+
##
|
|
366
|
+
# API to create a `CustomTargetingKey` object.
|
|
367
|
+
#
|
|
368
|
+
# @overload create_custom_targeting_key(request, options = nil)
|
|
369
|
+
# Pass arguments to `create_custom_targeting_key` via a request object, either of type
|
|
370
|
+
# {::Google::Ads::AdManager::V1::CreateCustomTargetingKeyRequest} or an equivalent Hash.
|
|
371
|
+
#
|
|
372
|
+
# @param request [::Google::Ads::AdManager::V1::CreateCustomTargetingKeyRequest, ::Hash]
|
|
373
|
+
# A request object representing the call parameters. Required. To specify no
|
|
374
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
|
375
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
|
376
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
|
377
|
+
#
|
|
378
|
+
# @overload create_custom_targeting_key(parent: nil, custom_targeting_key: nil)
|
|
379
|
+
# Pass arguments to `create_custom_targeting_key` via keyword arguments. Note that at
|
|
380
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
|
381
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
|
382
|
+
#
|
|
383
|
+
# @param parent [::String]
|
|
384
|
+
# Required. The parent resource where this `CustomTargetingKey` will be
|
|
385
|
+
# created. Format: `networks/{network_code}`
|
|
386
|
+
# @param custom_targeting_key [::Google::Ads::AdManager::V1::CustomTargetingKey, ::Hash]
|
|
387
|
+
# Required. The `CustomTargetingKey` to create.
|
|
388
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
|
389
|
+
# @yieldparam result [::Google::Ads::AdManager::V1::CustomTargetingKey]
|
|
390
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
|
391
|
+
#
|
|
392
|
+
# @return [::Google::Ads::AdManager::V1::CustomTargetingKey]
|
|
393
|
+
#
|
|
394
|
+
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
|
395
|
+
#
|
|
396
|
+
# @example Basic example
|
|
397
|
+
# require "google/ads/ad_manager/v1"
|
|
398
|
+
#
|
|
399
|
+
# # Create a client object. The client can be reused for multiple calls.
|
|
400
|
+
# client = Google::Ads::AdManager::V1::CustomTargetingKeyService::Rest::Client.new
|
|
401
|
+
#
|
|
402
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
|
403
|
+
# request = Google::Ads::AdManager::V1::CreateCustomTargetingKeyRequest.new
|
|
404
|
+
#
|
|
405
|
+
# # Call the create_custom_targeting_key method.
|
|
406
|
+
# result = client.create_custom_targeting_key request
|
|
407
|
+
#
|
|
408
|
+
# # The returned object is of type Google::Ads::AdManager::V1::CustomTargetingKey.
|
|
409
|
+
# p result
|
|
410
|
+
#
|
|
411
|
+
def create_custom_targeting_key request, options = nil
|
|
412
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
|
413
|
+
|
|
414
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Ads::AdManager::V1::CreateCustomTargetingKeyRequest
|
|
415
|
+
|
|
416
|
+
# Converts hash and nil to an options object
|
|
417
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
|
418
|
+
|
|
419
|
+
# Customize the options with defaults
|
|
420
|
+
call_metadata = @config.rpcs.create_custom_targeting_key.metadata.to_h
|
|
421
|
+
|
|
422
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
|
423
|
+
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
|
424
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
|
425
|
+
gapic_version: ::Google::Ads::AdManager::V1::VERSION,
|
|
426
|
+
transports_version_send: [:rest]
|
|
427
|
+
|
|
428
|
+
call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
|
429
|
+
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
|
430
|
+
|
|
431
|
+
options.apply_defaults timeout: @config.rpcs.create_custom_targeting_key.timeout,
|
|
432
|
+
metadata: call_metadata,
|
|
433
|
+
retry_policy: @config.rpcs.create_custom_targeting_key.retry_policy
|
|
434
|
+
|
|
435
|
+
options.apply_defaults timeout: @config.timeout,
|
|
436
|
+
metadata: @config.metadata,
|
|
437
|
+
retry_policy: @config.retry_policy
|
|
438
|
+
|
|
439
|
+
@custom_targeting_key_service_stub.create_custom_targeting_key request, options do |result, operation|
|
|
440
|
+
yield result, operation if block_given?
|
|
441
|
+
end
|
|
442
|
+
rescue ::Gapic::Rest::Error => e
|
|
443
|
+
raise ::Google::Cloud::Error.from_error(e)
|
|
444
|
+
end
|
|
445
|
+
|
|
446
|
+
##
|
|
447
|
+
# API to batch create `CustomTargetingKey` objects.
|
|
448
|
+
#
|
|
449
|
+
# @overload batch_create_custom_targeting_keys(request, options = nil)
|
|
450
|
+
# Pass arguments to `batch_create_custom_targeting_keys` via a request object, either of type
|
|
451
|
+
# {::Google::Ads::AdManager::V1::BatchCreateCustomTargetingKeysRequest} or an equivalent Hash.
|
|
452
|
+
#
|
|
453
|
+
# @param request [::Google::Ads::AdManager::V1::BatchCreateCustomTargetingKeysRequest, ::Hash]
|
|
454
|
+
# A request object representing the call parameters. Required. To specify no
|
|
455
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
|
456
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
|
457
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
|
458
|
+
#
|
|
459
|
+
# @overload batch_create_custom_targeting_keys(parent: nil, requests: nil)
|
|
460
|
+
# Pass arguments to `batch_create_custom_targeting_keys` via keyword arguments. Note that at
|
|
461
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
|
462
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
|
463
|
+
#
|
|
464
|
+
# @param parent [::String]
|
|
465
|
+
# Required. The parent resource where `CustomTargetingKeys` will be created.
|
|
466
|
+
# Format: `networks/{network_code}`
|
|
467
|
+
# The parent field in the CreateCustomTargetingKeyRequest must match this
|
|
468
|
+
# field.
|
|
469
|
+
# @param requests [::Array<::Google::Ads::AdManager::V1::CreateCustomTargetingKeyRequest, ::Hash>]
|
|
470
|
+
# Required. The `CustomTargetingKey` objects to create.
|
|
471
|
+
# A maximum of 100 objects can be created in a batch.
|
|
472
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
|
473
|
+
# @yieldparam result [::Google::Ads::AdManager::V1::BatchCreateCustomTargetingKeysResponse]
|
|
474
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
|
475
|
+
#
|
|
476
|
+
# @return [::Google::Ads::AdManager::V1::BatchCreateCustomTargetingKeysResponse]
|
|
477
|
+
#
|
|
478
|
+
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
|
479
|
+
#
|
|
480
|
+
# @example Basic example
|
|
481
|
+
# require "google/ads/ad_manager/v1"
|
|
482
|
+
#
|
|
483
|
+
# # Create a client object. The client can be reused for multiple calls.
|
|
484
|
+
# client = Google::Ads::AdManager::V1::CustomTargetingKeyService::Rest::Client.new
|
|
485
|
+
#
|
|
486
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
|
487
|
+
# request = Google::Ads::AdManager::V1::BatchCreateCustomTargetingKeysRequest.new
|
|
488
|
+
#
|
|
489
|
+
# # Call the batch_create_custom_targeting_keys method.
|
|
490
|
+
# result = client.batch_create_custom_targeting_keys request
|
|
491
|
+
#
|
|
492
|
+
# # The returned object is of type Google::Ads::AdManager::V1::BatchCreateCustomTargetingKeysResponse.
|
|
493
|
+
# p result
|
|
494
|
+
#
|
|
495
|
+
def batch_create_custom_targeting_keys request, options = nil
|
|
496
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
|
497
|
+
|
|
498
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Ads::AdManager::V1::BatchCreateCustomTargetingKeysRequest
|
|
499
|
+
|
|
500
|
+
# Converts hash and nil to an options object
|
|
501
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
|
502
|
+
|
|
503
|
+
# Customize the options with defaults
|
|
504
|
+
call_metadata = @config.rpcs.batch_create_custom_targeting_keys.metadata.to_h
|
|
505
|
+
|
|
506
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
|
507
|
+
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
|
508
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
|
509
|
+
gapic_version: ::Google::Ads::AdManager::V1::VERSION,
|
|
510
|
+
transports_version_send: [:rest]
|
|
511
|
+
|
|
512
|
+
call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
|
513
|
+
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
|
514
|
+
|
|
515
|
+
options.apply_defaults timeout: @config.rpcs.batch_create_custom_targeting_keys.timeout,
|
|
516
|
+
metadata: call_metadata,
|
|
517
|
+
retry_policy: @config.rpcs.batch_create_custom_targeting_keys.retry_policy
|
|
518
|
+
|
|
519
|
+
options.apply_defaults timeout: @config.timeout,
|
|
520
|
+
metadata: @config.metadata,
|
|
521
|
+
retry_policy: @config.retry_policy
|
|
522
|
+
|
|
523
|
+
@custom_targeting_key_service_stub.batch_create_custom_targeting_keys request, options do |result, operation|
|
|
524
|
+
yield result, operation if block_given?
|
|
525
|
+
end
|
|
526
|
+
rescue ::Gapic::Rest::Error => e
|
|
527
|
+
raise ::Google::Cloud::Error.from_error(e)
|
|
528
|
+
end
|
|
529
|
+
|
|
530
|
+
##
|
|
531
|
+
# API to update a `CustomTargetingKey` object.
|
|
532
|
+
#
|
|
533
|
+
# @overload update_custom_targeting_key(request, options = nil)
|
|
534
|
+
# Pass arguments to `update_custom_targeting_key` via a request object, either of type
|
|
535
|
+
# {::Google::Ads::AdManager::V1::UpdateCustomTargetingKeyRequest} or an equivalent Hash.
|
|
536
|
+
#
|
|
537
|
+
# @param request [::Google::Ads::AdManager::V1::UpdateCustomTargetingKeyRequest, ::Hash]
|
|
538
|
+
# A request object representing the call parameters. Required. To specify no
|
|
539
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
|
540
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
|
541
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
|
542
|
+
#
|
|
543
|
+
# @overload update_custom_targeting_key(custom_targeting_key: nil, update_mask: nil)
|
|
544
|
+
# Pass arguments to `update_custom_targeting_key` via keyword arguments. Note that at
|
|
545
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
|
546
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
|
547
|
+
#
|
|
548
|
+
# @param custom_targeting_key [::Google::Ads::AdManager::V1::CustomTargetingKey, ::Hash]
|
|
549
|
+
# Required. The `CustomTargetingKey` to update.
|
|
550
|
+
#
|
|
551
|
+
# The `CustomTargetingKey`'s `name` is used to identify the
|
|
552
|
+
# `CustomTargetingKey` to update.
|
|
553
|
+
# @param update_mask [::Google::Protobuf::FieldMask, ::Hash]
|
|
554
|
+
# Required. The list of fields to update.
|
|
555
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
|
556
|
+
# @yieldparam result [::Google::Ads::AdManager::V1::CustomTargetingKey]
|
|
557
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
|
558
|
+
#
|
|
559
|
+
# @return [::Google::Ads::AdManager::V1::CustomTargetingKey]
|
|
560
|
+
#
|
|
561
|
+
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
|
562
|
+
#
|
|
563
|
+
# @example Basic example
|
|
564
|
+
# require "google/ads/ad_manager/v1"
|
|
565
|
+
#
|
|
566
|
+
# # Create a client object. The client can be reused for multiple calls.
|
|
567
|
+
# client = Google::Ads::AdManager::V1::CustomTargetingKeyService::Rest::Client.new
|
|
568
|
+
#
|
|
569
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
|
570
|
+
# request = Google::Ads::AdManager::V1::UpdateCustomTargetingKeyRequest.new
|
|
571
|
+
#
|
|
572
|
+
# # Call the update_custom_targeting_key method.
|
|
573
|
+
# result = client.update_custom_targeting_key request
|
|
574
|
+
#
|
|
575
|
+
# # The returned object is of type Google::Ads::AdManager::V1::CustomTargetingKey.
|
|
576
|
+
# p result
|
|
577
|
+
#
|
|
578
|
+
def update_custom_targeting_key request, options = nil
|
|
579
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
|
580
|
+
|
|
581
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Ads::AdManager::V1::UpdateCustomTargetingKeyRequest
|
|
582
|
+
|
|
583
|
+
# Converts hash and nil to an options object
|
|
584
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
|
585
|
+
|
|
586
|
+
# Customize the options with defaults
|
|
587
|
+
call_metadata = @config.rpcs.update_custom_targeting_key.metadata.to_h
|
|
588
|
+
|
|
589
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
|
590
|
+
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
|
591
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
|
592
|
+
gapic_version: ::Google::Ads::AdManager::V1::VERSION,
|
|
593
|
+
transports_version_send: [:rest]
|
|
594
|
+
|
|
595
|
+
call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
|
596
|
+
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
|
597
|
+
|
|
598
|
+
options.apply_defaults timeout: @config.rpcs.update_custom_targeting_key.timeout,
|
|
599
|
+
metadata: call_metadata,
|
|
600
|
+
retry_policy: @config.rpcs.update_custom_targeting_key.retry_policy
|
|
601
|
+
|
|
602
|
+
options.apply_defaults timeout: @config.timeout,
|
|
603
|
+
metadata: @config.metadata,
|
|
604
|
+
retry_policy: @config.retry_policy
|
|
605
|
+
|
|
606
|
+
@custom_targeting_key_service_stub.update_custom_targeting_key request, options do |result, operation|
|
|
607
|
+
yield result, operation if block_given?
|
|
608
|
+
end
|
|
609
|
+
rescue ::Gapic::Rest::Error => e
|
|
610
|
+
raise ::Google::Cloud::Error.from_error(e)
|
|
611
|
+
end
|
|
612
|
+
|
|
613
|
+
##
|
|
614
|
+
# API to batch update `CustomTargetingKey` objects.
|
|
615
|
+
#
|
|
616
|
+
# @overload batch_update_custom_targeting_keys(request, options = nil)
|
|
617
|
+
# Pass arguments to `batch_update_custom_targeting_keys` via a request object, either of type
|
|
618
|
+
# {::Google::Ads::AdManager::V1::BatchUpdateCustomTargetingKeysRequest} or an equivalent Hash.
|
|
619
|
+
#
|
|
620
|
+
# @param request [::Google::Ads::AdManager::V1::BatchUpdateCustomTargetingKeysRequest, ::Hash]
|
|
621
|
+
# A request object representing the call parameters. Required. To specify no
|
|
622
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
|
623
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
|
624
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
|
625
|
+
#
|
|
626
|
+
# @overload batch_update_custom_targeting_keys(parent: nil, requests: nil)
|
|
627
|
+
# Pass arguments to `batch_update_custom_targeting_keys` via keyword arguments. Note that at
|
|
628
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
|
629
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
|
630
|
+
#
|
|
631
|
+
# @param parent [::String]
|
|
632
|
+
# Required. The parent resource where `CustomTargetingKeys` will be updated.
|
|
633
|
+
# Format: `networks/{network_code}`
|
|
634
|
+
# The parent field in the UpdateCustomTargetingKeyRequest must match this
|
|
635
|
+
# field.
|
|
636
|
+
# @param requests [::Array<::Google::Ads::AdManager::V1::UpdateCustomTargetingKeyRequest, ::Hash>]
|
|
637
|
+
# Required. The `CustomTargetingKey` objects to update.
|
|
638
|
+
# A maximum of 100 objects can be updated in a batch.
|
|
639
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
|
640
|
+
# @yieldparam result [::Google::Ads::AdManager::V1::BatchUpdateCustomTargetingKeysResponse]
|
|
641
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
|
642
|
+
#
|
|
643
|
+
# @return [::Google::Ads::AdManager::V1::BatchUpdateCustomTargetingKeysResponse]
|
|
644
|
+
#
|
|
645
|
+
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
|
646
|
+
#
|
|
647
|
+
# @example Basic example
|
|
648
|
+
# require "google/ads/ad_manager/v1"
|
|
649
|
+
#
|
|
650
|
+
# # Create a client object. The client can be reused for multiple calls.
|
|
651
|
+
# client = Google::Ads::AdManager::V1::CustomTargetingKeyService::Rest::Client.new
|
|
652
|
+
#
|
|
653
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
|
654
|
+
# request = Google::Ads::AdManager::V1::BatchUpdateCustomTargetingKeysRequest.new
|
|
655
|
+
#
|
|
656
|
+
# # Call the batch_update_custom_targeting_keys method.
|
|
657
|
+
# result = client.batch_update_custom_targeting_keys request
|
|
658
|
+
#
|
|
659
|
+
# # The returned object is of type Google::Ads::AdManager::V1::BatchUpdateCustomTargetingKeysResponse.
|
|
660
|
+
# p result
|
|
661
|
+
#
|
|
662
|
+
def batch_update_custom_targeting_keys request, options = nil
|
|
663
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
|
664
|
+
|
|
665
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Ads::AdManager::V1::BatchUpdateCustomTargetingKeysRequest
|
|
666
|
+
|
|
667
|
+
# Converts hash and nil to an options object
|
|
668
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
|
669
|
+
|
|
670
|
+
# Customize the options with defaults
|
|
671
|
+
call_metadata = @config.rpcs.batch_update_custom_targeting_keys.metadata.to_h
|
|
672
|
+
|
|
673
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
|
674
|
+
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
|
675
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
|
676
|
+
gapic_version: ::Google::Ads::AdManager::V1::VERSION,
|
|
677
|
+
transports_version_send: [:rest]
|
|
678
|
+
|
|
679
|
+
call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
|
680
|
+
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
|
681
|
+
|
|
682
|
+
options.apply_defaults timeout: @config.rpcs.batch_update_custom_targeting_keys.timeout,
|
|
683
|
+
metadata: call_metadata,
|
|
684
|
+
retry_policy: @config.rpcs.batch_update_custom_targeting_keys.retry_policy
|
|
685
|
+
|
|
686
|
+
options.apply_defaults timeout: @config.timeout,
|
|
687
|
+
metadata: @config.metadata,
|
|
688
|
+
retry_policy: @config.retry_policy
|
|
689
|
+
|
|
690
|
+
@custom_targeting_key_service_stub.batch_update_custom_targeting_keys request, options do |result, operation|
|
|
691
|
+
yield result, operation if block_given?
|
|
692
|
+
end
|
|
693
|
+
rescue ::Gapic::Rest::Error => e
|
|
694
|
+
raise ::Google::Cloud::Error.from_error(e)
|
|
695
|
+
end
|
|
696
|
+
|
|
697
|
+
##
|
|
698
|
+
# API to batch activate `CustomTargetingKey` objects.
|
|
699
|
+
#
|
|
700
|
+
# @overload batch_activate_custom_targeting_keys(request, options = nil)
|
|
701
|
+
# Pass arguments to `batch_activate_custom_targeting_keys` via a request object, either of type
|
|
702
|
+
# {::Google::Ads::AdManager::V1::BatchActivateCustomTargetingKeysRequest} or an equivalent Hash.
|
|
703
|
+
#
|
|
704
|
+
# @param request [::Google::Ads::AdManager::V1::BatchActivateCustomTargetingKeysRequest, ::Hash]
|
|
705
|
+
# A request object representing the call parameters. Required. To specify no
|
|
706
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
|
707
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
|
708
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
|
709
|
+
#
|
|
710
|
+
# @overload batch_activate_custom_targeting_keys(parent: nil, names: nil)
|
|
711
|
+
# Pass arguments to `batch_activate_custom_targeting_keys` via keyword arguments. Note that at
|
|
712
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
|
713
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
|
714
|
+
#
|
|
715
|
+
# @param parent [::String]
|
|
716
|
+
# Required. Format: `networks/{network_code}`
|
|
717
|
+
# @param names [::Array<::String>]
|
|
718
|
+
# Required. The resource names of the `CustomTargetingKey`s to activate.
|
|
719
|
+
# Format:
|
|
720
|
+
# `networks/{network_code}/customTargetingKeys/{custom_targeting_key_id}`
|
|
721
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
|
722
|
+
# @yieldparam result [::Google::Ads::AdManager::V1::BatchActivateCustomTargetingKeysResponse]
|
|
723
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
|
724
|
+
#
|
|
725
|
+
# @return [::Google::Ads::AdManager::V1::BatchActivateCustomTargetingKeysResponse]
|
|
726
|
+
#
|
|
727
|
+
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
|
728
|
+
#
|
|
729
|
+
# @example Basic example
|
|
730
|
+
# require "google/ads/ad_manager/v1"
|
|
731
|
+
#
|
|
732
|
+
# # Create a client object. The client can be reused for multiple calls.
|
|
733
|
+
# client = Google::Ads::AdManager::V1::CustomTargetingKeyService::Rest::Client.new
|
|
734
|
+
#
|
|
735
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
|
736
|
+
# request = Google::Ads::AdManager::V1::BatchActivateCustomTargetingKeysRequest.new
|
|
737
|
+
#
|
|
738
|
+
# # Call the batch_activate_custom_targeting_keys method.
|
|
739
|
+
# result = client.batch_activate_custom_targeting_keys request
|
|
740
|
+
#
|
|
741
|
+
# # The returned object is of type Google::Ads::AdManager::V1::BatchActivateCustomTargetingKeysResponse.
|
|
742
|
+
# p result
|
|
743
|
+
#
|
|
744
|
+
def batch_activate_custom_targeting_keys request, options = nil
|
|
745
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
|
746
|
+
|
|
747
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Ads::AdManager::V1::BatchActivateCustomTargetingKeysRequest
|
|
748
|
+
|
|
749
|
+
# Converts hash and nil to an options object
|
|
750
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
|
751
|
+
|
|
752
|
+
# Customize the options with defaults
|
|
753
|
+
call_metadata = @config.rpcs.batch_activate_custom_targeting_keys.metadata.to_h
|
|
754
|
+
|
|
755
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
|
756
|
+
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
|
757
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
|
758
|
+
gapic_version: ::Google::Ads::AdManager::V1::VERSION,
|
|
759
|
+
transports_version_send: [:rest]
|
|
760
|
+
|
|
761
|
+
call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
|
762
|
+
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
|
763
|
+
|
|
764
|
+
options.apply_defaults timeout: @config.rpcs.batch_activate_custom_targeting_keys.timeout,
|
|
765
|
+
metadata: call_metadata,
|
|
766
|
+
retry_policy: @config.rpcs.batch_activate_custom_targeting_keys.retry_policy
|
|
767
|
+
|
|
768
|
+
options.apply_defaults timeout: @config.timeout,
|
|
769
|
+
metadata: @config.metadata,
|
|
770
|
+
retry_policy: @config.retry_policy
|
|
771
|
+
|
|
772
|
+
@custom_targeting_key_service_stub.batch_activate_custom_targeting_keys request, options do |result, operation|
|
|
773
|
+
yield result, operation if block_given?
|
|
774
|
+
end
|
|
775
|
+
rescue ::Gapic::Rest::Error => e
|
|
776
|
+
raise ::Google::Cloud::Error.from_error(e)
|
|
777
|
+
end
|
|
778
|
+
|
|
779
|
+
##
|
|
780
|
+
# Deactivates a list of `CustomTargetingKey` objects.
|
|
781
|
+
#
|
|
782
|
+
# @overload batch_deactivate_custom_targeting_keys(request, options = nil)
|
|
783
|
+
# Pass arguments to `batch_deactivate_custom_targeting_keys` via a request object, either of type
|
|
784
|
+
# {::Google::Ads::AdManager::V1::BatchDeactivateCustomTargetingKeysRequest} or an equivalent Hash.
|
|
785
|
+
#
|
|
786
|
+
# @param request [::Google::Ads::AdManager::V1::BatchDeactivateCustomTargetingKeysRequest, ::Hash]
|
|
787
|
+
# A request object representing the call parameters. Required. To specify no
|
|
788
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
|
789
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
|
790
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
|
791
|
+
#
|
|
792
|
+
# @overload batch_deactivate_custom_targeting_keys(parent: nil, names: nil)
|
|
793
|
+
# Pass arguments to `batch_deactivate_custom_targeting_keys` via keyword arguments. Note that at
|
|
794
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
|
795
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
|
796
|
+
#
|
|
797
|
+
# @param parent [::String]
|
|
798
|
+
# Required. Format: `networks/{network_code}`
|
|
799
|
+
# @param names [::Array<::String>]
|
|
800
|
+
# Required. The resource names of the `CustomTargetingKey`s to deactivate.
|
|
801
|
+
# Format:
|
|
802
|
+
# `networks/{network_code}/customTargetingKeys/{custom_targeting_key_id}`
|
|
803
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
|
804
|
+
# @yieldparam result [::Google::Ads::AdManager::V1::BatchDeactivateCustomTargetingKeysResponse]
|
|
805
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
|
806
|
+
#
|
|
807
|
+
# @return [::Google::Ads::AdManager::V1::BatchDeactivateCustomTargetingKeysResponse]
|
|
808
|
+
#
|
|
809
|
+
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
|
810
|
+
#
|
|
811
|
+
# @example Basic example
|
|
812
|
+
# require "google/ads/ad_manager/v1"
|
|
813
|
+
#
|
|
814
|
+
# # Create a client object. The client can be reused for multiple calls.
|
|
815
|
+
# client = Google::Ads::AdManager::V1::CustomTargetingKeyService::Rest::Client.new
|
|
816
|
+
#
|
|
817
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
|
818
|
+
# request = Google::Ads::AdManager::V1::BatchDeactivateCustomTargetingKeysRequest.new
|
|
819
|
+
#
|
|
820
|
+
# # Call the batch_deactivate_custom_targeting_keys method.
|
|
821
|
+
# result = client.batch_deactivate_custom_targeting_keys request
|
|
822
|
+
#
|
|
823
|
+
# # The returned object is of type Google::Ads::AdManager::V1::BatchDeactivateCustomTargetingKeysResponse.
|
|
824
|
+
# p result
|
|
825
|
+
#
|
|
826
|
+
def batch_deactivate_custom_targeting_keys request, options = nil
|
|
827
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
|
828
|
+
|
|
829
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Ads::AdManager::V1::BatchDeactivateCustomTargetingKeysRequest
|
|
830
|
+
|
|
831
|
+
# Converts hash and nil to an options object
|
|
832
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
|
833
|
+
|
|
834
|
+
# Customize the options with defaults
|
|
835
|
+
call_metadata = @config.rpcs.batch_deactivate_custom_targeting_keys.metadata.to_h
|
|
836
|
+
|
|
837
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
|
838
|
+
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
|
839
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
|
840
|
+
gapic_version: ::Google::Ads::AdManager::V1::VERSION,
|
|
841
|
+
transports_version_send: [:rest]
|
|
842
|
+
|
|
843
|
+
call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
|
844
|
+
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
|
845
|
+
|
|
846
|
+
options.apply_defaults timeout: @config.rpcs.batch_deactivate_custom_targeting_keys.timeout,
|
|
847
|
+
metadata: call_metadata,
|
|
848
|
+
retry_policy: @config.rpcs.batch_deactivate_custom_targeting_keys.retry_policy
|
|
849
|
+
|
|
850
|
+
options.apply_defaults timeout: @config.timeout,
|
|
851
|
+
metadata: @config.metadata,
|
|
852
|
+
retry_policy: @config.retry_policy
|
|
853
|
+
|
|
854
|
+
@custom_targeting_key_service_stub.batch_deactivate_custom_targeting_keys request, options do |result, operation|
|
|
855
|
+
yield result, operation if block_given?
|
|
856
|
+
end
|
|
857
|
+
rescue ::Gapic::Rest::Error => e
|
|
858
|
+
raise ::Google::Cloud::Error.from_error(e)
|
|
859
|
+
end
|
|
860
|
+
|
|
365
861
|
##
|
|
366
862
|
# Configuration class for the CustomTargetingKeyService REST API.
|
|
367
863
|
#
|
|
@@ -518,6 +1014,36 @@ module Google
|
|
|
518
1014
|
# @return [::Gapic::Config::Method]
|
|
519
1015
|
#
|
|
520
1016
|
attr_reader :list_custom_targeting_keys
|
|
1017
|
+
##
|
|
1018
|
+
# RPC-specific configuration for `create_custom_targeting_key`
|
|
1019
|
+
# @return [::Gapic::Config::Method]
|
|
1020
|
+
#
|
|
1021
|
+
attr_reader :create_custom_targeting_key
|
|
1022
|
+
##
|
|
1023
|
+
# RPC-specific configuration for `batch_create_custom_targeting_keys`
|
|
1024
|
+
# @return [::Gapic::Config::Method]
|
|
1025
|
+
#
|
|
1026
|
+
attr_reader :batch_create_custom_targeting_keys
|
|
1027
|
+
##
|
|
1028
|
+
# RPC-specific configuration for `update_custom_targeting_key`
|
|
1029
|
+
# @return [::Gapic::Config::Method]
|
|
1030
|
+
#
|
|
1031
|
+
attr_reader :update_custom_targeting_key
|
|
1032
|
+
##
|
|
1033
|
+
# RPC-specific configuration for `batch_update_custom_targeting_keys`
|
|
1034
|
+
# @return [::Gapic::Config::Method]
|
|
1035
|
+
#
|
|
1036
|
+
attr_reader :batch_update_custom_targeting_keys
|
|
1037
|
+
##
|
|
1038
|
+
# RPC-specific configuration for `batch_activate_custom_targeting_keys`
|
|
1039
|
+
# @return [::Gapic::Config::Method]
|
|
1040
|
+
#
|
|
1041
|
+
attr_reader :batch_activate_custom_targeting_keys
|
|
1042
|
+
##
|
|
1043
|
+
# RPC-specific configuration for `batch_deactivate_custom_targeting_keys`
|
|
1044
|
+
# @return [::Gapic::Config::Method]
|
|
1045
|
+
#
|
|
1046
|
+
attr_reader :batch_deactivate_custom_targeting_keys
|
|
521
1047
|
|
|
522
1048
|
# @private
|
|
523
1049
|
def initialize parent_rpcs = nil
|
|
@@ -525,6 +1051,18 @@ module Google
|
|
|
525
1051
|
@get_custom_targeting_key = ::Gapic::Config::Method.new get_custom_targeting_key_config
|
|
526
1052
|
list_custom_targeting_keys_config = parent_rpcs.list_custom_targeting_keys if parent_rpcs.respond_to? :list_custom_targeting_keys
|
|
527
1053
|
@list_custom_targeting_keys = ::Gapic::Config::Method.new list_custom_targeting_keys_config
|
|
1054
|
+
create_custom_targeting_key_config = parent_rpcs.create_custom_targeting_key if parent_rpcs.respond_to? :create_custom_targeting_key
|
|
1055
|
+
@create_custom_targeting_key = ::Gapic::Config::Method.new create_custom_targeting_key_config
|
|
1056
|
+
batch_create_custom_targeting_keys_config = parent_rpcs.batch_create_custom_targeting_keys if parent_rpcs.respond_to? :batch_create_custom_targeting_keys
|
|
1057
|
+
@batch_create_custom_targeting_keys = ::Gapic::Config::Method.new batch_create_custom_targeting_keys_config
|
|
1058
|
+
update_custom_targeting_key_config = parent_rpcs.update_custom_targeting_key if parent_rpcs.respond_to? :update_custom_targeting_key
|
|
1059
|
+
@update_custom_targeting_key = ::Gapic::Config::Method.new update_custom_targeting_key_config
|
|
1060
|
+
batch_update_custom_targeting_keys_config = parent_rpcs.batch_update_custom_targeting_keys if parent_rpcs.respond_to? :batch_update_custom_targeting_keys
|
|
1061
|
+
@batch_update_custom_targeting_keys = ::Gapic::Config::Method.new batch_update_custom_targeting_keys_config
|
|
1062
|
+
batch_activate_custom_targeting_keys_config = parent_rpcs.batch_activate_custom_targeting_keys if parent_rpcs.respond_to? :batch_activate_custom_targeting_keys
|
|
1063
|
+
@batch_activate_custom_targeting_keys = ::Gapic::Config::Method.new batch_activate_custom_targeting_keys_config
|
|
1064
|
+
batch_deactivate_custom_targeting_keys_config = parent_rpcs.batch_deactivate_custom_targeting_keys if parent_rpcs.respond_to? :batch_deactivate_custom_targeting_keys
|
|
1065
|
+
@batch_deactivate_custom_targeting_keys = ::Gapic::Config::Method.new batch_deactivate_custom_targeting_keys_config
|
|
528
1066
|
|
|
529
1067
|
yield self if block_given?
|
|
530
1068
|
end
|