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
|
@@ -467,6 +467,581 @@ module Google
|
|
|
467
467
|
raise ::Google::Cloud::Error.from_error(e)
|
|
468
468
|
end
|
|
469
469
|
|
|
470
|
+
##
|
|
471
|
+
# API to create an `AdUnit` object.
|
|
472
|
+
#
|
|
473
|
+
# @overload create_ad_unit(request, options = nil)
|
|
474
|
+
# Pass arguments to `create_ad_unit` via a request object, either of type
|
|
475
|
+
# {::Google::Ads::AdManager::V1::CreateAdUnitRequest} or an equivalent Hash.
|
|
476
|
+
#
|
|
477
|
+
# @param request [::Google::Ads::AdManager::V1::CreateAdUnitRequest, ::Hash]
|
|
478
|
+
# A request object representing the call parameters. Required. To specify no
|
|
479
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
|
480
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
|
481
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
|
482
|
+
#
|
|
483
|
+
# @overload create_ad_unit(parent: nil, ad_unit: nil)
|
|
484
|
+
# Pass arguments to `create_ad_unit` via keyword arguments. Note that at
|
|
485
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
|
486
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
|
487
|
+
#
|
|
488
|
+
# @param parent [::String]
|
|
489
|
+
# Required. The parent resource where this `AdUnit` will be created.
|
|
490
|
+
# Format: `networks/{network_code}`
|
|
491
|
+
# @param ad_unit [::Google::Ads::AdManager::V1::AdUnit, ::Hash]
|
|
492
|
+
# Required. The `AdUnit` to create.
|
|
493
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
|
494
|
+
# @yieldparam result [::Google::Ads::AdManager::V1::AdUnit]
|
|
495
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
|
496
|
+
#
|
|
497
|
+
# @return [::Google::Ads::AdManager::V1::AdUnit]
|
|
498
|
+
#
|
|
499
|
+
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
|
500
|
+
#
|
|
501
|
+
# @example Basic example
|
|
502
|
+
# require "google/ads/ad_manager/v1"
|
|
503
|
+
#
|
|
504
|
+
# # Create a client object. The client can be reused for multiple calls.
|
|
505
|
+
# client = Google::Ads::AdManager::V1::AdUnitService::Rest::Client.new
|
|
506
|
+
#
|
|
507
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
|
508
|
+
# request = Google::Ads::AdManager::V1::CreateAdUnitRequest.new
|
|
509
|
+
#
|
|
510
|
+
# # Call the create_ad_unit method.
|
|
511
|
+
# result = client.create_ad_unit request
|
|
512
|
+
#
|
|
513
|
+
# # The returned object is of type Google::Ads::AdManager::V1::AdUnit.
|
|
514
|
+
# p result
|
|
515
|
+
#
|
|
516
|
+
def create_ad_unit request, options = nil
|
|
517
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
|
518
|
+
|
|
519
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Ads::AdManager::V1::CreateAdUnitRequest
|
|
520
|
+
|
|
521
|
+
# Converts hash and nil to an options object
|
|
522
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
|
523
|
+
|
|
524
|
+
# Customize the options with defaults
|
|
525
|
+
call_metadata = @config.rpcs.create_ad_unit.metadata.to_h
|
|
526
|
+
|
|
527
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
|
528
|
+
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
|
529
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
|
530
|
+
gapic_version: ::Google::Ads::AdManager::V1::VERSION,
|
|
531
|
+
transports_version_send: [:rest]
|
|
532
|
+
|
|
533
|
+
call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
|
534
|
+
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
|
535
|
+
|
|
536
|
+
options.apply_defaults timeout: @config.rpcs.create_ad_unit.timeout,
|
|
537
|
+
metadata: call_metadata,
|
|
538
|
+
retry_policy: @config.rpcs.create_ad_unit.retry_policy
|
|
539
|
+
|
|
540
|
+
options.apply_defaults timeout: @config.timeout,
|
|
541
|
+
metadata: @config.metadata,
|
|
542
|
+
retry_policy: @config.retry_policy
|
|
543
|
+
|
|
544
|
+
@ad_unit_service_stub.create_ad_unit request, options do |result, operation|
|
|
545
|
+
yield result, operation if block_given?
|
|
546
|
+
end
|
|
547
|
+
rescue ::Gapic::Rest::Error => e
|
|
548
|
+
raise ::Google::Cloud::Error.from_error(e)
|
|
549
|
+
end
|
|
550
|
+
|
|
551
|
+
##
|
|
552
|
+
# API to update an `AdUnit` object.
|
|
553
|
+
#
|
|
554
|
+
# @overload update_ad_unit(request, options = nil)
|
|
555
|
+
# Pass arguments to `update_ad_unit` via a request object, either of type
|
|
556
|
+
# {::Google::Ads::AdManager::V1::UpdateAdUnitRequest} or an equivalent Hash.
|
|
557
|
+
#
|
|
558
|
+
# @param request [::Google::Ads::AdManager::V1::UpdateAdUnitRequest, ::Hash]
|
|
559
|
+
# A request object representing the call parameters. Required. To specify no
|
|
560
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
|
561
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
|
562
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
|
563
|
+
#
|
|
564
|
+
# @overload update_ad_unit(ad_unit: nil, update_mask: nil)
|
|
565
|
+
# Pass arguments to `update_ad_unit` via keyword arguments. Note that at
|
|
566
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
|
567
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
|
568
|
+
#
|
|
569
|
+
# @param ad_unit [::Google::Ads::AdManager::V1::AdUnit, ::Hash]
|
|
570
|
+
# Required. The `AdUnit` to update.
|
|
571
|
+
#
|
|
572
|
+
# The `AdUnit`'s name is used to identify the `AdUnit` to update. Format:
|
|
573
|
+
# `networks/{network_code}/adUnits/{ad_unit_id}`
|
|
574
|
+
# @param update_mask [::Google::Protobuf::FieldMask, ::Hash]
|
|
575
|
+
# Required. The list of fields to update.
|
|
576
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
|
577
|
+
# @yieldparam result [::Google::Ads::AdManager::V1::AdUnit]
|
|
578
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
|
579
|
+
#
|
|
580
|
+
# @return [::Google::Ads::AdManager::V1::AdUnit]
|
|
581
|
+
#
|
|
582
|
+
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
|
583
|
+
#
|
|
584
|
+
# @example Basic example
|
|
585
|
+
# require "google/ads/ad_manager/v1"
|
|
586
|
+
#
|
|
587
|
+
# # Create a client object. The client can be reused for multiple calls.
|
|
588
|
+
# client = Google::Ads::AdManager::V1::AdUnitService::Rest::Client.new
|
|
589
|
+
#
|
|
590
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
|
591
|
+
# request = Google::Ads::AdManager::V1::UpdateAdUnitRequest.new
|
|
592
|
+
#
|
|
593
|
+
# # Call the update_ad_unit method.
|
|
594
|
+
# result = client.update_ad_unit request
|
|
595
|
+
#
|
|
596
|
+
# # The returned object is of type Google::Ads::AdManager::V1::AdUnit.
|
|
597
|
+
# p result
|
|
598
|
+
#
|
|
599
|
+
def update_ad_unit request, options = nil
|
|
600
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
|
601
|
+
|
|
602
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Ads::AdManager::V1::UpdateAdUnitRequest
|
|
603
|
+
|
|
604
|
+
# Converts hash and nil to an options object
|
|
605
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
|
606
|
+
|
|
607
|
+
# Customize the options with defaults
|
|
608
|
+
call_metadata = @config.rpcs.update_ad_unit.metadata.to_h
|
|
609
|
+
|
|
610
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
|
611
|
+
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
|
612
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
|
613
|
+
gapic_version: ::Google::Ads::AdManager::V1::VERSION,
|
|
614
|
+
transports_version_send: [:rest]
|
|
615
|
+
|
|
616
|
+
call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
|
617
|
+
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
|
618
|
+
|
|
619
|
+
options.apply_defaults timeout: @config.rpcs.update_ad_unit.timeout,
|
|
620
|
+
metadata: call_metadata,
|
|
621
|
+
retry_policy: @config.rpcs.update_ad_unit.retry_policy
|
|
622
|
+
|
|
623
|
+
options.apply_defaults timeout: @config.timeout,
|
|
624
|
+
metadata: @config.metadata,
|
|
625
|
+
retry_policy: @config.retry_policy
|
|
626
|
+
|
|
627
|
+
@ad_unit_service_stub.update_ad_unit request, options do |result, operation|
|
|
628
|
+
yield result, operation if block_given?
|
|
629
|
+
end
|
|
630
|
+
rescue ::Gapic::Rest::Error => e
|
|
631
|
+
raise ::Google::Cloud::Error.from_error(e)
|
|
632
|
+
end
|
|
633
|
+
|
|
634
|
+
##
|
|
635
|
+
# API to batch create `AdUnit` objects.
|
|
636
|
+
#
|
|
637
|
+
# @overload batch_create_ad_units(request, options = nil)
|
|
638
|
+
# Pass arguments to `batch_create_ad_units` via a request object, either of type
|
|
639
|
+
# {::Google::Ads::AdManager::V1::BatchCreateAdUnitsRequest} or an equivalent Hash.
|
|
640
|
+
#
|
|
641
|
+
# @param request [::Google::Ads::AdManager::V1::BatchCreateAdUnitsRequest, ::Hash]
|
|
642
|
+
# A request object representing the call parameters. Required. To specify no
|
|
643
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
|
644
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
|
645
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
|
646
|
+
#
|
|
647
|
+
# @overload batch_create_ad_units(parent: nil, requests: nil)
|
|
648
|
+
# Pass arguments to `batch_create_ad_units` via keyword arguments. Note that at
|
|
649
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
|
650
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
|
651
|
+
#
|
|
652
|
+
# @param parent [::String]
|
|
653
|
+
# Required. The parent resource where `AdUnits` will be created.
|
|
654
|
+
# Format: `networks/{network_code}`
|
|
655
|
+
# The parent field in the CreateAdUnitRequest must match this
|
|
656
|
+
# field.
|
|
657
|
+
# @param requests [::Array<::Google::Ads::AdManager::V1::CreateAdUnitRequest, ::Hash>]
|
|
658
|
+
# Required. The `AdUnit` objects to create.
|
|
659
|
+
# A maximum of 100 objects can be created in a batch.
|
|
660
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
|
661
|
+
# @yieldparam result [::Google::Ads::AdManager::V1::BatchCreateAdUnitsResponse]
|
|
662
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
|
663
|
+
#
|
|
664
|
+
# @return [::Google::Ads::AdManager::V1::BatchCreateAdUnitsResponse]
|
|
665
|
+
#
|
|
666
|
+
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
|
667
|
+
#
|
|
668
|
+
# @example Basic example
|
|
669
|
+
# require "google/ads/ad_manager/v1"
|
|
670
|
+
#
|
|
671
|
+
# # Create a client object. The client can be reused for multiple calls.
|
|
672
|
+
# client = Google::Ads::AdManager::V1::AdUnitService::Rest::Client.new
|
|
673
|
+
#
|
|
674
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
|
675
|
+
# request = Google::Ads::AdManager::V1::BatchCreateAdUnitsRequest.new
|
|
676
|
+
#
|
|
677
|
+
# # Call the batch_create_ad_units method.
|
|
678
|
+
# result = client.batch_create_ad_units request
|
|
679
|
+
#
|
|
680
|
+
# # The returned object is of type Google::Ads::AdManager::V1::BatchCreateAdUnitsResponse.
|
|
681
|
+
# p result
|
|
682
|
+
#
|
|
683
|
+
def batch_create_ad_units request, options = nil
|
|
684
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
|
685
|
+
|
|
686
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Ads::AdManager::V1::BatchCreateAdUnitsRequest
|
|
687
|
+
|
|
688
|
+
# Converts hash and nil to an options object
|
|
689
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
|
690
|
+
|
|
691
|
+
# Customize the options with defaults
|
|
692
|
+
call_metadata = @config.rpcs.batch_create_ad_units.metadata.to_h
|
|
693
|
+
|
|
694
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
|
695
|
+
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
|
696
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
|
697
|
+
gapic_version: ::Google::Ads::AdManager::V1::VERSION,
|
|
698
|
+
transports_version_send: [:rest]
|
|
699
|
+
|
|
700
|
+
call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
|
701
|
+
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
|
702
|
+
|
|
703
|
+
options.apply_defaults timeout: @config.rpcs.batch_create_ad_units.timeout,
|
|
704
|
+
metadata: call_metadata,
|
|
705
|
+
retry_policy: @config.rpcs.batch_create_ad_units.retry_policy
|
|
706
|
+
|
|
707
|
+
options.apply_defaults timeout: @config.timeout,
|
|
708
|
+
metadata: @config.metadata,
|
|
709
|
+
retry_policy: @config.retry_policy
|
|
710
|
+
|
|
711
|
+
@ad_unit_service_stub.batch_create_ad_units request, options do |result, operation|
|
|
712
|
+
yield result, operation if block_given?
|
|
713
|
+
end
|
|
714
|
+
rescue ::Gapic::Rest::Error => e
|
|
715
|
+
raise ::Google::Cloud::Error.from_error(e)
|
|
716
|
+
end
|
|
717
|
+
|
|
718
|
+
##
|
|
719
|
+
# API to batch update `AdUnit` objects.
|
|
720
|
+
#
|
|
721
|
+
# @overload batch_update_ad_units(request, options = nil)
|
|
722
|
+
# Pass arguments to `batch_update_ad_units` via a request object, either of type
|
|
723
|
+
# {::Google::Ads::AdManager::V1::BatchUpdateAdUnitsRequest} or an equivalent Hash.
|
|
724
|
+
#
|
|
725
|
+
# @param request [::Google::Ads::AdManager::V1::BatchUpdateAdUnitsRequest, ::Hash]
|
|
726
|
+
# A request object representing the call parameters. Required. To specify no
|
|
727
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
|
728
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
|
729
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
|
730
|
+
#
|
|
731
|
+
# @overload batch_update_ad_units(parent: nil, requests: nil)
|
|
732
|
+
# Pass arguments to `batch_update_ad_units` via keyword arguments. Note that at
|
|
733
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
|
734
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
|
735
|
+
#
|
|
736
|
+
# @param parent [::String]
|
|
737
|
+
# Required. The parent resource where `AdUnits` will be updated.
|
|
738
|
+
# Format: `networks/{network_code}`
|
|
739
|
+
# The parent field in the UpdateAdUnitRequest must match this
|
|
740
|
+
# field.
|
|
741
|
+
# @param requests [::Array<::Google::Ads::AdManager::V1::UpdateAdUnitRequest, ::Hash>]
|
|
742
|
+
# Required. The `AdUnit` objects to update.
|
|
743
|
+
# A maximum of 100 objects can be updated in a batch.
|
|
744
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
|
745
|
+
# @yieldparam result [::Google::Ads::AdManager::V1::BatchUpdateAdUnitsResponse]
|
|
746
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
|
747
|
+
#
|
|
748
|
+
# @return [::Google::Ads::AdManager::V1::BatchUpdateAdUnitsResponse]
|
|
749
|
+
#
|
|
750
|
+
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
|
751
|
+
#
|
|
752
|
+
# @example Basic example
|
|
753
|
+
# require "google/ads/ad_manager/v1"
|
|
754
|
+
#
|
|
755
|
+
# # Create a client object. The client can be reused for multiple calls.
|
|
756
|
+
# client = Google::Ads::AdManager::V1::AdUnitService::Rest::Client.new
|
|
757
|
+
#
|
|
758
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
|
759
|
+
# request = Google::Ads::AdManager::V1::BatchUpdateAdUnitsRequest.new
|
|
760
|
+
#
|
|
761
|
+
# # Call the batch_update_ad_units method.
|
|
762
|
+
# result = client.batch_update_ad_units request
|
|
763
|
+
#
|
|
764
|
+
# # The returned object is of type Google::Ads::AdManager::V1::BatchUpdateAdUnitsResponse.
|
|
765
|
+
# p result
|
|
766
|
+
#
|
|
767
|
+
def batch_update_ad_units request, options = nil
|
|
768
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
|
769
|
+
|
|
770
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Ads::AdManager::V1::BatchUpdateAdUnitsRequest
|
|
771
|
+
|
|
772
|
+
# Converts hash and nil to an options object
|
|
773
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
|
774
|
+
|
|
775
|
+
# Customize the options with defaults
|
|
776
|
+
call_metadata = @config.rpcs.batch_update_ad_units.metadata.to_h
|
|
777
|
+
|
|
778
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
|
779
|
+
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
|
780
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
|
781
|
+
gapic_version: ::Google::Ads::AdManager::V1::VERSION,
|
|
782
|
+
transports_version_send: [:rest]
|
|
783
|
+
|
|
784
|
+
call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
|
785
|
+
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
|
786
|
+
|
|
787
|
+
options.apply_defaults timeout: @config.rpcs.batch_update_ad_units.timeout,
|
|
788
|
+
metadata: call_metadata,
|
|
789
|
+
retry_policy: @config.rpcs.batch_update_ad_units.retry_policy
|
|
790
|
+
|
|
791
|
+
options.apply_defaults timeout: @config.timeout,
|
|
792
|
+
metadata: @config.metadata,
|
|
793
|
+
retry_policy: @config.retry_policy
|
|
794
|
+
|
|
795
|
+
@ad_unit_service_stub.batch_update_ad_units request, options do |result, operation|
|
|
796
|
+
yield result, operation if block_given?
|
|
797
|
+
end
|
|
798
|
+
rescue ::Gapic::Rest::Error => e
|
|
799
|
+
raise ::Google::Cloud::Error.from_error(e)
|
|
800
|
+
end
|
|
801
|
+
|
|
802
|
+
##
|
|
803
|
+
# API to batch activate `AdUnit` objects.
|
|
804
|
+
#
|
|
805
|
+
# @overload batch_activate_ad_units(request, options = nil)
|
|
806
|
+
# Pass arguments to `batch_activate_ad_units` via a request object, either of type
|
|
807
|
+
# {::Google::Ads::AdManager::V1::BatchActivateAdUnitsRequest} or an equivalent Hash.
|
|
808
|
+
#
|
|
809
|
+
# @param request [::Google::Ads::AdManager::V1::BatchActivateAdUnitsRequest, ::Hash]
|
|
810
|
+
# A request object representing the call parameters. Required. To specify no
|
|
811
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
|
812
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
|
813
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
|
814
|
+
#
|
|
815
|
+
# @overload batch_activate_ad_units(parent: nil, names: nil)
|
|
816
|
+
# Pass arguments to `batch_activate_ad_units` via keyword arguments. Note that at
|
|
817
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
|
818
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
|
819
|
+
#
|
|
820
|
+
# @param parent [::String]
|
|
821
|
+
# Required. Format: `networks/{network_code}`
|
|
822
|
+
# @param names [::Array<::String>]
|
|
823
|
+
# Required. The resource names of the `AdUnit`s to activate.
|
|
824
|
+
# Format: `networks/{network_code}/adUnits/{ad_unit_id}`
|
|
825
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
|
826
|
+
# @yieldparam result [::Google::Ads::AdManager::V1::BatchActivateAdUnitsResponse]
|
|
827
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
|
828
|
+
#
|
|
829
|
+
# @return [::Google::Ads::AdManager::V1::BatchActivateAdUnitsResponse]
|
|
830
|
+
#
|
|
831
|
+
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
|
832
|
+
#
|
|
833
|
+
# @example Basic example
|
|
834
|
+
# require "google/ads/ad_manager/v1"
|
|
835
|
+
#
|
|
836
|
+
# # Create a client object. The client can be reused for multiple calls.
|
|
837
|
+
# client = Google::Ads::AdManager::V1::AdUnitService::Rest::Client.new
|
|
838
|
+
#
|
|
839
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
|
840
|
+
# request = Google::Ads::AdManager::V1::BatchActivateAdUnitsRequest.new
|
|
841
|
+
#
|
|
842
|
+
# # Call the batch_activate_ad_units method.
|
|
843
|
+
# result = client.batch_activate_ad_units request
|
|
844
|
+
#
|
|
845
|
+
# # The returned object is of type Google::Ads::AdManager::V1::BatchActivateAdUnitsResponse.
|
|
846
|
+
# p result
|
|
847
|
+
#
|
|
848
|
+
def batch_activate_ad_units request, options = nil
|
|
849
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
|
850
|
+
|
|
851
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Ads::AdManager::V1::BatchActivateAdUnitsRequest
|
|
852
|
+
|
|
853
|
+
# Converts hash and nil to an options object
|
|
854
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
|
855
|
+
|
|
856
|
+
# Customize the options with defaults
|
|
857
|
+
call_metadata = @config.rpcs.batch_activate_ad_units.metadata.to_h
|
|
858
|
+
|
|
859
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
|
860
|
+
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
|
861
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
|
862
|
+
gapic_version: ::Google::Ads::AdManager::V1::VERSION,
|
|
863
|
+
transports_version_send: [:rest]
|
|
864
|
+
|
|
865
|
+
call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
|
866
|
+
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
|
867
|
+
|
|
868
|
+
options.apply_defaults timeout: @config.rpcs.batch_activate_ad_units.timeout,
|
|
869
|
+
metadata: call_metadata,
|
|
870
|
+
retry_policy: @config.rpcs.batch_activate_ad_units.retry_policy
|
|
871
|
+
|
|
872
|
+
options.apply_defaults timeout: @config.timeout,
|
|
873
|
+
metadata: @config.metadata,
|
|
874
|
+
retry_policy: @config.retry_policy
|
|
875
|
+
|
|
876
|
+
@ad_unit_service_stub.batch_activate_ad_units request, options do |result, operation|
|
|
877
|
+
yield result, operation if block_given?
|
|
878
|
+
end
|
|
879
|
+
rescue ::Gapic::Rest::Error => e
|
|
880
|
+
raise ::Google::Cloud::Error.from_error(e)
|
|
881
|
+
end
|
|
882
|
+
|
|
883
|
+
##
|
|
884
|
+
# Deactivates a list of `AdUnit` objects.
|
|
885
|
+
#
|
|
886
|
+
# @overload batch_deactivate_ad_units(request, options = nil)
|
|
887
|
+
# Pass arguments to `batch_deactivate_ad_units` via a request object, either of type
|
|
888
|
+
# {::Google::Ads::AdManager::V1::BatchDeactivateAdUnitsRequest} or an equivalent Hash.
|
|
889
|
+
#
|
|
890
|
+
# @param request [::Google::Ads::AdManager::V1::BatchDeactivateAdUnitsRequest, ::Hash]
|
|
891
|
+
# A request object representing the call parameters. Required. To specify no
|
|
892
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
|
893
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
|
894
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
|
895
|
+
#
|
|
896
|
+
# @overload batch_deactivate_ad_units(parent: nil, names: nil)
|
|
897
|
+
# Pass arguments to `batch_deactivate_ad_units` via keyword arguments. Note that at
|
|
898
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
|
899
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
|
900
|
+
#
|
|
901
|
+
# @param parent [::String]
|
|
902
|
+
# Required. Format: `networks/{network_code}`
|
|
903
|
+
# @param names [::Array<::String>]
|
|
904
|
+
# Required. The resource names of the `AdUnit`s to deactivate.
|
|
905
|
+
# Format: `networks/{network_code}/adUnits/{ad_unit_id}`
|
|
906
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
|
907
|
+
# @yieldparam result [::Google::Ads::AdManager::V1::BatchDeactivateAdUnitsResponse]
|
|
908
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
|
909
|
+
#
|
|
910
|
+
# @return [::Google::Ads::AdManager::V1::BatchDeactivateAdUnitsResponse]
|
|
911
|
+
#
|
|
912
|
+
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
|
913
|
+
#
|
|
914
|
+
# @example Basic example
|
|
915
|
+
# require "google/ads/ad_manager/v1"
|
|
916
|
+
#
|
|
917
|
+
# # Create a client object. The client can be reused for multiple calls.
|
|
918
|
+
# client = Google::Ads::AdManager::V1::AdUnitService::Rest::Client.new
|
|
919
|
+
#
|
|
920
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
|
921
|
+
# request = Google::Ads::AdManager::V1::BatchDeactivateAdUnitsRequest.new
|
|
922
|
+
#
|
|
923
|
+
# # Call the batch_deactivate_ad_units method.
|
|
924
|
+
# result = client.batch_deactivate_ad_units request
|
|
925
|
+
#
|
|
926
|
+
# # The returned object is of type Google::Ads::AdManager::V1::BatchDeactivateAdUnitsResponse.
|
|
927
|
+
# p result
|
|
928
|
+
#
|
|
929
|
+
def batch_deactivate_ad_units request, options = nil
|
|
930
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
|
931
|
+
|
|
932
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Ads::AdManager::V1::BatchDeactivateAdUnitsRequest
|
|
933
|
+
|
|
934
|
+
# Converts hash and nil to an options object
|
|
935
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
|
936
|
+
|
|
937
|
+
# Customize the options with defaults
|
|
938
|
+
call_metadata = @config.rpcs.batch_deactivate_ad_units.metadata.to_h
|
|
939
|
+
|
|
940
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
|
941
|
+
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
|
942
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
|
943
|
+
gapic_version: ::Google::Ads::AdManager::V1::VERSION,
|
|
944
|
+
transports_version_send: [:rest]
|
|
945
|
+
|
|
946
|
+
call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
|
947
|
+
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
|
948
|
+
|
|
949
|
+
options.apply_defaults timeout: @config.rpcs.batch_deactivate_ad_units.timeout,
|
|
950
|
+
metadata: call_metadata,
|
|
951
|
+
retry_policy: @config.rpcs.batch_deactivate_ad_units.retry_policy
|
|
952
|
+
|
|
953
|
+
options.apply_defaults timeout: @config.timeout,
|
|
954
|
+
metadata: @config.metadata,
|
|
955
|
+
retry_policy: @config.retry_policy
|
|
956
|
+
|
|
957
|
+
@ad_unit_service_stub.batch_deactivate_ad_units request, options do |result, operation|
|
|
958
|
+
yield result, operation if block_given?
|
|
959
|
+
end
|
|
960
|
+
rescue ::Gapic::Rest::Error => e
|
|
961
|
+
raise ::Google::Cloud::Error.from_error(e)
|
|
962
|
+
end
|
|
963
|
+
|
|
964
|
+
##
|
|
965
|
+
# Archives a list of `AdUnit` objects.
|
|
966
|
+
#
|
|
967
|
+
# @overload batch_archive_ad_units(request, options = nil)
|
|
968
|
+
# Pass arguments to `batch_archive_ad_units` via a request object, either of type
|
|
969
|
+
# {::Google::Ads::AdManager::V1::BatchArchiveAdUnitsRequest} or an equivalent Hash.
|
|
970
|
+
#
|
|
971
|
+
# @param request [::Google::Ads::AdManager::V1::BatchArchiveAdUnitsRequest, ::Hash]
|
|
972
|
+
# A request object representing the call parameters. Required. To specify no
|
|
973
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
|
974
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
|
975
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
|
976
|
+
#
|
|
977
|
+
# @overload batch_archive_ad_units(parent: nil, names: nil)
|
|
978
|
+
# Pass arguments to `batch_archive_ad_units` via keyword arguments. Note that at
|
|
979
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
|
980
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
|
981
|
+
#
|
|
982
|
+
# @param parent [::String]
|
|
983
|
+
# Required. Format: `networks/{network_code}`
|
|
984
|
+
# @param names [::Array<::String>]
|
|
985
|
+
# Required. The resource names of the `AdUnit`s to archive.
|
|
986
|
+
# Format: `networks/{network_code}/adUnits/{ad_unit_id}`
|
|
987
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
|
988
|
+
# @yieldparam result [::Google::Ads::AdManager::V1::BatchArchiveAdUnitsResponse]
|
|
989
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
|
990
|
+
#
|
|
991
|
+
# @return [::Google::Ads::AdManager::V1::BatchArchiveAdUnitsResponse]
|
|
992
|
+
#
|
|
993
|
+
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
|
994
|
+
#
|
|
995
|
+
# @example Basic example
|
|
996
|
+
# require "google/ads/ad_manager/v1"
|
|
997
|
+
#
|
|
998
|
+
# # Create a client object. The client can be reused for multiple calls.
|
|
999
|
+
# client = Google::Ads::AdManager::V1::AdUnitService::Rest::Client.new
|
|
1000
|
+
#
|
|
1001
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
|
1002
|
+
# request = Google::Ads::AdManager::V1::BatchArchiveAdUnitsRequest.new
|
|
1003
|
+
#
|
|
1004
|
+
# # Call the batch_archive_ad_units method.
|
|
1005
|
+
# result = client.batch_archive_ad_units request
|
|
1006
|
+
#
|
|
1007
|
+
# # The returned object is of type Google::Ads::AdManager::V1::BatchArchiveAdUnitsResponse.
|
|
1008
|
+
# p result
|
|
1009
|
+
#
|
|
1010
|
+
def batch_archive_ad_units request, options = nil
|
|
1011
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
|
1012
|
+
|
|
1013
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Ads::AdManager::V1::BatchArchiveAdUnitsRequest
|
|
1014
|
+
|
|
1015
|
+
# Converts hash and nil to an options object
|
|
1016
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
|
1017
|
+
|
|
1018
|
+
# Customize the options with defaults
|
|
1019
|
+
call_metadata = @config.rpcs.batch_archive_ad_units.metadata.to_h
|
|
1020
|
+
|
|
1021
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
|
1022
|
+
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
|
1023
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
|
1024
|
+
gapic_version: ::Google::Ads::AdManager::V1::VERSION,
|
|
1025
|
+
transports_version_send: [:rest]
|
|
1026
|
+
|
|
1027
|
+
call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
|
1028
|
+
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
|
1029
|
+
|
|
1030
|
+
options.apply_defaults timeout: @config.rpcs.batch_archive_ad_units.timeout,
|
|
1031
|
+
metadata: call_metadata,
|
|
1032
|
+
retry_policy: @config.rpcs.batch_archive_ad_units.retry_policy
|
|
1033
|
+
|
|
1034
|
+
options.apply_defaults timeout: @config.timeout,
|
|
1035
|
+
metadata: @config.metadata,
|
|
1036
|
+
retry_policy: @config.retry_policy
|
|
1037
|
+
|
|
1038
|
+
@ad_unit_service_stub.batch_archive_ad_units request, options do |result, operation|
|
|
1039
|
+
yield result, operation if block_given?
|
|
1040
|
+
end
|
|
1041
|
+
rescue ::Gapic::Rest::Error => e
|
|
1042
|
+
raise ::Google::Cloud::Error.from_error(e)
|
|
1043
|
+
end
|
|
1044
|
+
|
|
470
1045
|
##
|
|
471
1046
|
# Configuration class for the AdUnitService REST API.
|
|
472
1047
|
#
|
|
@@ -628,6 +1203,41 @@ module Google
|
|
|
628
1203
|
# @return [::Gapic::Config::Method]
|
|
629
1204
|
#
|
|
630
1205
|
attr_reader :list_ad_unit_sizes
|
|
1206
|
+
##
|
|
1207
|
+
# RPC-specific configuration for `create_ad_unit`
|
|
1208
|
+
# @return [::Gapic::Config::Method]
|
|
1209
|
+
#
|
|
1210
|
+
attr_reader :create_ad_unit
|
|
1211
|
+
##
|
|
1212
|
+
# RPC-specific configuration for `update_ad_unit`
|
|
1213
|
+
# @return [::Gapic::Config::Method]
|
|
1214
|
+
#
|
|
1215
|
+
attr_reader :update_ad_unit
|
|
1216
|
+
##
|
|
1217
|
+
# RPC-specific configuration for `batch_create_ad_units`
|
|
1218
|
+
# @return [::Gapic::Config::Method]
|
|
1219
|
+
#
|
|
1220
|
+
attr_reader :batch_create_ad_units
|
|
1221
|
+
##
|
|
1222
|
+
# RPC-specific configuration for `batch_update_ad_units`
|
|
1223
|
+
# @return [::Gapic::Config::Method]
|
|
1224
|
+
#
|
|
1225
|
+
attr_reader :batch_update_ad_units
|
|
1226
|
+
##
|
|
1227
|
+
# RPC-specific configuration for `batch_activate_ad_units`
|
|
1228
|
+
# @return [::Gapic::Config::Method]
|
|
1229
|
+
#
|
|
1230
|
+
attr_reader :batch_activate_ad_units
|
|
1231
|
+
##
|
|
1232
|
+
# RPC-specific configuration for `batch_deactivate_ad_units`
|
|
1233
|
+
# @return [::Gapic::Config::Method]
|
|
1234
|
+
#
|
|
1235
|
+
attr_reader :batch_deactivate_ad_units
|
|
1236
|
+
##
|
|
1237
|
+
# RPC-specific configuration for `batch_archive_ad_units`
|
|
1238
|
+
# @return [::Gapic::Config::Method]
|
|
1239
|
+
#
|
|
1240
|
+
attr_reader :batch_archive_ad_units
|
|
631
1241
|
|
|
632
1242
|
# @private
|
|
633
1243
|
def initialize parent_rpcs = nil
|
|
@@ -637,6 +1247,20 @@ module Google
|
|
|
637
1247
|
@list_ad_units = ::Gapic::Config::Method.new list_ad_units_config
|
|
638
1248
|
list_ad_unit_sizes_config = parent_rpcs.list_ad_unit_sizes if parent_rpcs.respond_to? :list_ad_unit_sizes
|
|
639
1249
|
@list_ad_unit_sizes = ::Gapic::Config::Method.new list_ad_unit_sizes_config
|
|
1250
|
+
create_ad_unit_config = parent_rpcs.create_ad_unit if parent_rpcs.respond_to? :create_ad_unit
|
|
1251
|
+
@create_ad_unit = ::Gapic::Config::Method.new create_ad_unit_config
|
|
1252
|
+
update_ad_unit_config = parent_rpcs.update_ad_unit if parent_rpcs.respond_to? :update_ad_unit
|
|
1253
|
+
@update_ad_unit = ::Gapic::Config::Method.new update_ad_unit_config
|
|
1254
|
+
batch_create_ad_units_config = parent_rpcs.batch_create_ad_units if parent_rpcs.respond_to? :batch_create_ad_units
|
|
1255
|
+
@batch_create_ad_units = ::Gapic::Config::Method.new batch_create_ad_units_config
|
|
1256
|
+
batch_update_ad_units_config = parent_rpcs.batch_update_ad_units if parent_rpcs.respond_to? :batch_update_ad_units
|
|
1257
|
+
@batch_update_ad_units = ::Gapic::Config::Method.new batch_update_ad_units_config
|
|
1258
|
+
batch_activate_ad_units_config = parent_rpcs.batch_activate_ad_units if parent_rpcs.respond_to? :batch_activate_ad_units
|
|
1259
|
+
@batch_activate_ad_units = ::Gapic::Config::Method.new batch_activate_ad_units_config
|
|
1260
|
+
batch_deactivate_ad_units_config = parent_rpcs.batch_deactivate_ad_units if parent_rpcs.respond_to? :batch_deactivate_ad_units
|
|
1261
|
+
@batch_deactivate_ad_units = ::Gapic::Config::Method.new batch_deactivate_ad_units_config
|
|
1262
|
+
batch_archive_ad_units_config = parent_rpcs.batch_archive_ad_units if parent_rpcs.respond_to? :batch_archive_ad_units
|
|
1263
|
+
@batch_archive_ad_units = ::Gapic::Config::Method.new batch_archive_ad_units_config
|
|
640
1264
|
|
|
641
1265
|
yield self if block_given?
|
|
642
1266
|
end
|