lib/google/ads/google_ads/factories/v4/operations.rb in google-ads-googleads-9.0.0 vs lib/google/ads/google_ads/factories/v4/operations.rb in google-ads-googleads-10.0.0

- old
+ new

@@ -2,10 +2,24 @@ module Ads module GoogleAds module Factories module V4 module Operations + # Create a new FeedAttributeOperation + # + # @return [Google::Ads::GoogleAds::V4::Resources::FeedAttributeOperation] the operation + def self.feed_attribute + require "google/ads/google_ads/v4/resources/feed_pb" + if block_given? + op = Google::Ads::GoogleAds::V4::Resources::FeedAttributeOperation.new + yield op + op + else + Google::Ads::GoogleAds::V4::Resources::FeedAttributeOperation.new + end + end + # Create a new TargetRestrictionOperation # # @return [Google::Ads::GoogleAds::V4::Common::TargetRestrictionOperation] the operation def self.target_restriction require "google/ads/google_ads/v4/common/targeting_setting_pb" @@ -16,66 +30,108 @@ else Google::Ads::GoogleAds::V4::Common::TargetRestrictionOperation.new end end - # Create a new FeedAttributeOperation + # Create a new CustomerClientLinkOperation # - # @return [Google::Ads::GoogleAds::V4::Resources::FeedAttributeOperation] the operation - def self.feed_attribute - require "google/ads/google_ads/v4/resources/feed_pb" + # @return [Google::Ads::GoogleAds::V4::Services::CustomerClientLinkOperation] the operation + def self.customer_client_link + require "google/ads/google_ads/v4/services/customer_client_link_service_pb" if block_given? - op = Google::Ads::GoogleAds::V4::Resources::FeedAttributeOperation.new + op = Google::Ads::GoogleAds::V4::Services::CustomerClientLinkOperation.new yield op op else - Google::Ads::GoogleAds::V4::Resources::FeedAttributeOperation.new + Google::Ads::GoogleAds::V4::Services::CustomerClientLinkOperation.new end end - # Create a new CampaignBudgetOperation + # Create a new CustomInterestOperation # - # @return [Google::Ads::GoogleAds::V4::Services::CampaignBudgetOperation] the operation - def self.campaign_budget - require "google/ads/google_ads/v4/services/campaign_budget_service_pb" + # @return [Google::Ads::GoogleAds::V4::Services::CustomInterestOperation] the operation + def self.custom_interest + require "google/ads/google_ads/v4/services/custom_interest_service_pb" if block_given? - op = Google::Ads::GoogleAds::V4::Services::CampaignBudgetOperation.new + op = Google::Ads::GoogleAds::V4::Services::CustomInterestOperation.new yield op op else - Google::Ads::GoogleAds::V4::Services::CampaignBudgetOperation.new + Google::Ads::GoogleAds::V4::Services::CustomInterestOperation.new end end - # Create a new AdGroupAdLabelOperation + # Create a new CustomerNegativeCriterionOperation # - # @return [Google::Ads::GoogleAds::V4::Services::AdGroupAdLabelOperation] the operation - def self.ad_group_ad_label - require "google/ads/google_ads/v4/services/ad_group_ad_label_service_pb" + # @return [Google::Ads::GoogleAds::V4::Services::CustomerNegativeCriterionOperation] the operation + def self.customer_negative_criterion + require "google/ads/google_ads/v4/services/customer_negative_criterion_service_pb" if block_given? - op = Google::Ads::GoogleAds::V4::Services::AdGroupAdLabelOperation.new + op = Google::Ads::GoogleAds::V4::Services::CustomerNegativeCriterionOperation.new yield op op else - Google::Ads::GoogleAds::V4::Services::AdGroupAdLabelOperation.new + Google::Ads::GoogleAds::V4::Services::CustomerNegativeCriterionOperation.new end end - # Create a new CustomerOperation + # Create a new SharedCriterionOperation # - # @return [Google::Ads::GoogleAds::V4::Services::CustomerOperation] the operation - def self.customer - require "google/ads/google_ads/v4/services/customer_service_pb" + # @return [Google::Ads::GoogleAds::V4::Services::SharedCriterionOperation] the operation + def self.shared_criterion + require "google/ads/google_ads/v4/services/shared_criterion_service_pb" if block_given? - op = Google::Ads::GoogleAds::V4::Services::CustomerOperation.new + op = Google::Ads::GoogleAds::V4::Services::SharedCriterionOperation.new yield op op else - Google::Ads::GoogleAds::V4::Services::CustomerOperation.new + Google::Ads::GoogleAds::V4::Services::SharedCriterionOperation.new end end + # Create a new KeywordPlanAdGroupKeywordOperation + # + # @return [Google::Ads::GoogleAds::V4::Services::KeywordPlanAdGroupKeywordOperation] the operation + def self.keyword_plan_ad_group_keyword + require "google/ads/google_ads/v4/services/keyword_plan_ad_group_keyword_service_pb" + if block_given? + op = Google::Ads::GoogleAds::V4::Services::KeywordPlanAdGroupKeywordOperation.new + yield op + op + else + Google::Ads::GoogleAds::V4::Services::KeywordPlanAdGroupKeywordOperation.new + end + end + + # Create a new FeedMappingOperation + # + # @return [Google::Ads::GoogleAds::V4::Services::FeedMappingOperation] the operation + def self.feed_mapping + require "google/ads/google_ads/v4/services/feed_mapping_service_pb" + if block_given? + op = Google::Ads::GoogleAds::V4::Services::FeedMappingOperation.new + yield op + op + else + Google::Ads::GoogleAds::V4::Services::FeedMappingOperation.new + end + end + + # Create a new AdGroupOperation + # + # @return [Google::Ads::GoogleAds::V4::Services::AdGroupOperation] the operation + def self.ad_group + require "google/ads/google_ads/v4/services/ad_group_service_pb" + if block_given? + op = Google::Ads::GoogleAds::V4::Services::AdGroupOperation.new + yield op + op + else + Google::Ads::GoogleAds::V4::Services::AdGroupOperation.new + end + end + # Create a new CampaignBidModifierOperation # # @return [Google::Ads::GoogleAds::V4::Services::CampaignBidModifierOperation] the operation def self.campaign_bid_modifier require "google/ads/google_ads/v4/services/campaign_bid_modifier_service_pb" @@ -86,77 +142,77 @@ else Google::Ads::GoogleAds::V4::Services::CampaignBidModifierOperation.new end end - # Create a new CampaignOperation + # Create a new CustomerManagerLinkOperation # - # @return [Google::Ads::GoogleAds::V4::Services::CampaignOperation] the operation - def self.campaign - require "google/ads/google_ads/v4/services/campaign_service_pb" + # @return [Google::Ads::GoogleAds::V4::Services::CustomerManagerLinkOperation] the operation + def self.customer_manager_link + require "google/ads/google_ads/v4/services/customer_manager_link_service_pb" if block_given? - op = Google::Ads::GoogleAds::V4::Services::CampaignOperation.new + op = Google::Ads::GoogleAds::V4::Services::CustomerManagerLinkOperation.new yield op op else - Google::Ads::GoogleAds::V4::Services::CampaignOperation.new + Google::Ads::GoogleAds::V4::Services::CustomerManagerLinkOperation.new end end - # Create a new BiddingStrategyOperation + # Create a new CampaignDraftOperation # - # @return [Google::Ads::GoogleAds::V4::Services::BiddingStrategyOperation] the operation - def self.bidding_strategy - require "google/ads/google_ads/v4/services/bidding_strategy_service_pb" + # @return [Google::Ads::GoogleAds::V4::Services::CampaignDraftOperation] the operation + def self.campaign_draft + require "google/ads/google_ads/v4/services/campaign_draft_service_pb" if block_given? - op = Google::Ads::GoogleAds::V4::Services::BiddingStrategyOperation.new + op = Google::Ads::GoogleAds::V4::Services::CampaignDraftOperation.new yield op op else - Google::Ads::GoogleAds::V4::Services::BiddingStrategyOperation.new + Google::Ads::GoogleAds::V4::Services::CampaignDraftOperation.new end end - # Create a new AdGroupOperation + # Create a new UserListOperation # - # @return [Google::Ads::GoogleAds::V4::Services::AdGroupOperation] the operation - def self.ad_group - require "google/ads/google_ads/v4/services/ad_group_service_pb" + # @return [Google::Ads::GoogleAds::V4::Services::UserListOperation] the operation + def self.user_list + require "google/ads/google_ads/v4/services/user_list_service_pb" if block_given? - op = Google::Ads::GoogleAds::V4::Services::AdGroupOperation.new + op = Google::Ads::GoogleAds::V4::Services::UserListOperation.new yield op op else - Google::Ads::GoogleAds::V4::Services::AdGroupOperation.new + Google::Ads::GoogleAds::V4::Services::UserListOperation.new end end - # Create a new AdGroupAdOperation + # Create a new CustomerOperation # - # @return [Google::Ads::GoogleAds::V4::Services::AdGroupAdOperation] the operation - def self.ad_group_ad - require "google/ads/google_ads/v4/services/ad_group_ad_service_pb" + # @return [Google::Ads::GoogleAds::V4::Services::CustomerOperation] the operation + def self.customer + require "google/ads/google_ads/v4/services/customer_service_pb" if block_given? - op = Google::Ads::GoogleAds::V4::Services::AdGroupAdOperation.new + op = Google::Ads::GoogleAds::V4::Services::CustomerOperation.new yield op op else - Google::Ads::GoogleAds::V4::Services::AdGroupAdOperation.new + Google::Ads::GoogleAds::V4::Services::CustomerOperation.new end end - # Create a new AdGroupBidModifierOperation + # Create a new SharedSetOperation # - # @return [Google::Ads::GoogleAds::V4::Services::AdGroupBidModifierOperation] the operation - def self.ad_group_bid_modifier - require "google/ads/google_ads/v4/services/ad_group_bid_modifier_service_pb" + # @return [Google::Ads::GoogleAds::V4::Services::SharedSetOperation] the operation + def self.shared_set + require "google/ads/google_ads/v4/services/shared_set_service_pb" if block_given? - op = Google::Ads::GoogleAds::V4::Services::AdGroupBidModifierOperation.new + op = Google::Ads::GoogleAds::V4::Services::SharedSetOperation.new yield op op else - Google::Ads::GoogleAds::V4::Services::AdGroupBidModifierOperation.new + Google::Ads::GoogleAds::V4::Services::SharedSetOperation.new end end # Create a new AdGroupCriterionLabelOperation # @@ -170,10 +226,66 @@ else Google::Ads::GoogleAds::V4::Services::AdGroupCriterionLabelOperation.new end end + # Create a new LabelOperation + # + # @return [Google::Ads::GoogleAds::V4::Services::LabelOperation] the operation + def self.label + require "google/ads/google_ads/v4/services/label_service_pb" + if block_given? + op = Google::Ads::GoogleAds::V4::Services::LabelOperation.new + yield op + op + else + Google::Ads::GoogleAds::V4::Services::LabelOperation.new + end + end + + # Create a new AdGroupAdLabelOperation + # + # @return [Google::Ads::GoogleAds::V4::Services::AdGroupAdLabelOperation] the operation + def self.ad_group_ad_label + require "google/ads/google_ads/v4/services/ad_group_ad_label_service_pb" + if block_given? + op = Google::Ads::GoogleAds::V4::Services::AdGroupAdLabelOperation.new + yield op + op + else + Google::Ads::GoogleAds::V4::Services::AdGroupAdLabelOperation.new + end + end + + # Create a new AdGroupAdOperation + # + # @return [Google::Ads::GoogleAds::V4::Services::AdGroupAdOperation] the operation + def self.ad_group_ad + require "google/ads/google_ads/v4/services/ad_group_ad_service_pb" + if block_given? + op = Google::Ads::GoogleAds::V4::Services::AdGroupAdOperation.new + yield op + op + else + Google::Ads::GoogleAds::V4::Services::AdGroupAdOperation.new + end + end + + # Create a new AdGroupBidModifierOperation + # + # @return [Google::Ads::GoogleAds::V4::Services::AdGroupBidModifierOperation] the operation + def self.ad_group_bid_modifier + require "google/ads/google_ads/v4/services/ad_group_bid_modifier_service_pb" + if block_given? + op = Google::Ads::GoogleAds::V4::Services::AdGroupBidModifierOperation.new + yield op + op + else + Google::Ads::GoogleAds::V4::Services::AdGroupBidModifierOperation.new + end + end + # Create a new AdGroupCriterionOperation # # @return [Google::Ads::GoogleAds::V4::Services::AdGroupCriterionOperation] the operation def self.ad_group_criterion require "google/ads/google_ads/v4/services/ad_group_criterion_service_pb" @@ -268,38 +380,52 @@ else Google::Ads::GoogleAds::V4::Services::AssetOperation.new end end - # Create a new CampaignCriterionOperation + # Create a new BiddingStrategyOperation # - # @return [Google::Ads::GoogleAds::V4::Services::CampaignCriterionOperation] the operation - def self.campaign_criterion - require "google/ads/google_ads/v4/services/campaign_criterion_service_pb" + # @return [Google::Ads::GoogleAds::V4::Services::BiddingStrategyOperation] the operation + def self.bidding_strategy + require "google/ads/google_ads/v4/services/bidding_strategy_service_pb" if block_given? - op = Google::Ads::GoogleAds::V4::Services::CampaignCriterionOperation.new + op = Google::Ads::GoogleAds::V4::Services::BiddingStrategyOperation.new yield op op else - Google::Ads::GoogleAds::V4::Services::CampaignCriterionOperation.new + Google::Ads::GoogleAds::V4::Services::BiddingStrategyOperation.new end end - # Create a new CampaignDraftOperation + # Create a new CampaignBudgetOperation # - # @return [Google::Ads::GoogleAds::V4::Services::CampaignDraftOperation] the operation - def self.campaign_draft - require "google/ads/google_ads/v4/services/campaign_draft_service_pb" + # @return [Google::Ads::GoogleAds::V4::Services::CampaignBudgetOperation] the operation + def self.campaign_budget + require "google/ads/google_ads/v4/services/campaign_budget_service_pb" if block_given? - op = Google::Ads::GoogleAds::V4::Services::CampaignDraftOperation.new + op = Google::Ads::GoogleAds::V4::Services::CampaignBudgetOperation.new yield op op else - Google::Ads::GoogleAds::V4::Services::CampaignDraftOperation.new + Google::Ads::GoogleAds::V4::Services::CampaignBudgetOperation.new end end + # Create a new CampaignCriterionOperation + # + # @return [Google::Ads::GoogleAds::V4::Services::CampaignCriterionOperation] the operation + def self.campaign_criterion + require "google/ads/google_ads/v4/services/campaign_criterion_service_pb" + if block_given? + op = Google::Ads::GoogleAds::V4::Services::CampaignCriterionOperation.new + yield op + op + else + Google::Ads::GoogleAds::V4::Services::CampaignCriterionOperation.new + end + end + # Create a new CampaignExperimentOperation # # @return [Google::Ads::GoogleAds::V4::Services::CampaignExperimentOperation] the operation def self.campaign_experiment require "google/ads/google_ads/v4/services/campaign_experiment_service_pb" @@ -352,10 +478,24 @@ else Google::Ads::GoogleAds::V4::Services::CampaignLabelOperation.new end end + # Create a new CampaignOperation + # + # @return [Google::Ads::GoogleAds::V4::Services::CampaignOperation] the operation + def self.campaign + require "google/ads/google_ads/v4/services/campaign_service_pb" + if block_given? + op = Google::Ads::GoogleAds::V4::Services::CampaignOperation.new + yield op + op + else + Google::Ads::GoogleAds::V4::Services::CampaignOperation.new + end + end + # Create a new CampaignSharedSetOperation # # @return [Google::Ads::GoogleAds::V4::Services::CampaignSharedSetOperation] the operation def self.campaign_shared_set require "google/ads/google_ads/v4/services/campaign_shared_set_service_pb" @@ -422,24 +562,10 @@ else Google::Ads::GoogleAds::V4::Services::CustomerLabelOperation.new end end - # Create a new CustomerNegativeCriterionOperation - # - # @return [Google::Ads::GoogleAds::V4::Services::CustomerNegativeCriterionOperation] the operation - def self.customer_negative_criterion - require "google/ads/google_ads/v4/services/customer_negative_criterion_service_pb" - if block_given? - op = Google::Ads::GoogleAds::V4::Services::CustomerNegativeCriterionOperation.new - yield op - op - else - Google::Ads::GoogleAds::V4::Services::CustomerNegativeCriterionOperation.new - end - end - # Create a new ExtensionFeedItemOperation # # @return [Google::Ads::GoogleAds::V4::Services::ExtensionFeedItemOperation] the operation def self.extension_feed_item require "google/ads/google_ads/v4/services/extension_feed_item_service_pb" @@ -478,24 +604,10 @@ else Google::Ads::GoogleAds::V4::Services::FeedItemTargetOperation.new end end - # Create a new FeedMappingOperation - # - # @return [Google::Ads::GoogleAds::V4::Services::FeedMappingOperation] the operation - def self.feed_mapping - require "google/ads/google_ads/v4/services/feed_mapping_service_pb" - if block_given? - op = Google::Ads::GoogleAds::V4::Services::FeedMappingOperation.new - yield op - op - else - Google::Ads::GoogleAds::V4::Services::FeedMappingOperation.new - end - end - # Create a new FeedOperation # # @return [Google::Ads::GoogleAds::V4::Services::FeedOperation] the operation def self.feed require "google/ads/google_ads/v4/services/feed_service_pb" @@ -506,24 +618,10 @@ else Google::Ads::GoogleAds::V4::Services::FeedOperation.new end end - # Create a new KeywordPlanAdGroupKeywordOperation - # - # @return [Google::Ads::GoogleAds::V4::Services::KeywordPlanAdGroupKeywordOperation] the operation - def self.keyword_plan_ad_group_keyword - require "google/ads/google_ads/v4/services/keyword_plan_ad_group_keyword_service_pb" - if block_given? - op = Google::Ads::GoogleAds::V4::Services::KeywordPlanAdGroupKeywordOperation.new - yield op - op - else - Google::Ads::GoogleAds::V4::Services::KeywordPlanAdGroupKeywordOperation.new - end - end - # Create a new KeywordPlanAdGroupOperation # # @return [Google::Ads::GoogleAds::V4::Services::KeywordPlanAdGroupOperation] the operation def self.keyword_plan_ad_group require "google/ads/google_ads/v4/services/keyword_plan_ad_group_service_pb" @@ -576,24 +674,10 @@ else Google::Ads::GoogleAds::V4::Services::KeywordPlanOperation.new end end - # Create a new LabelOperation - # - # @return [Google::Ads::GoogleAds::V4::Services::LabelOperation] the operation - def self.label - require "google/ads/google_ads/v4/services/label_service_pb" - if block_given? - op = Google::Ads::GoogleAds::V4::Services::LabelOperation.new - yield op - op - else - Google::Ads::GoogleAds::V4::Services::LabelOperation.new - end - end - # Create a new MediaFileOperation # # @return [Google::Ads::GoogleAds::V4::Services::MediaFileOperation] the operation def self.media_file require "google/ads/google_ads/v4/services/media_file_service_pb" @@ -618,52 +702,10 @@ else Google::Ads::GoogleAds::V4::Services::RemarketingActionOperation.new end end - # Create a new SharedCriterionOperation - # - # @return [Google::Ads::GoogleAds::V4::Services::SharedCriterionOperation] the operation - def self.shared_criterion - require "google/ads/google_ads/v4/services/shared_criterion_service_pb" - if block_given? - op = Google::Ads::GoogleAds::V4::Services::SharedCriterionOperation.new - yield op - op - else - Google::Ads::GoogleAds::V4::Services::SharedCriterionOperation.new - end - end - - # Create a new SharedSetOperation - # - # @return [Google::Ads::GoogleAds::V4::Services::SharedSetOperation] the operation - def self.shared_set - require "google/ads/google_ads/v4/services/shared_set_service_pb" - if block_given? - op = Google::Ads::GoogleAds::V4::Services::SharedSetOperation.new - yield op - op - else - Google::Ads::GoogleAds::V4::Services::SharedSetOperation.new - end - end - - # Create a new UserListOperation - # - # @return [Google::Ads::GoogleAds::V4::Services::UserListOperation] the operation - def self.user_list - require "google/ads/google_ads/v4/services/user_list_service_pb" - if block_given? - op = Google::Ads::GoogleAds::V4::Services::UserListOperation.new - yield op - op - else - Google::Ads::GoogleAds::V4::Services::UserListOperation.new - end - end - # Create a new MutateOperation # # @return [Google::Ads::GoogleAds::V4::Services::MutateOperation] the operation def self.mutate require "google/ads/google_ads/v4/services/google_ads_service_pb" @@ -702,52 +744,10 @@ else Google::Ads::GoogleAds::V4::Services::OfflineUserDataJobOperation.new end end - # Create a new CustomInterestOperation - # - # @return [Google::Ads::GoogleAds::V4::Services::CustomInterestOperation] the operation - def self.custom_interest - require "google/ads/google_ads/v4/services/custom_interest_service_pb" - if block_given? - op = Google::Ads::GoogleAds::V4::Services::CustomInterestOperation.new - yield op - op - else - Google::Ads::GoogleAds::V4::Services::CustomInterestOperation.new - end - end - - # Create a new MerchantCenterLinkOperation - # - # @return [Google::Ads::GoogleAds::V4::Services::MerchantCenterLinkOperation] the operation - def self.merchant_center_link - require "google/ads/google_ads/v4/services/merchant_center_link_service_pb" - if block_given? - op = Google::Ads::GoogleAds::V4::Services::MerchantCenterLinkOperation.new - yield op - op - else - Google::Ads::GoogleAds::V4::Services::MerchantCenterLinkOperation.new - end - end - - # Create a new CustomerClientLinkOperation - # - # @return [Google::Ads::GoogleAds::V4::Services::CustomerClientLinkOperation] the operation - def self.customer_client_link - require "google/ads/google_ads/v4/services/customer_client_link_service_pb" - if block_given? - op = Google::Ads::GoogleAds::V4::Services::CustomerClientLinkOperation.new - yield op - op - else - Google::Ads::GoogleAds::V4::Services::CustomerClientLinkOperation.new - end - end - # Create a new UserDataOperation # # @return [Google::Ads::GoogleAds::V4::Services::UserDataOperation] the operation def self.user_data require "google/ads/google_ads/v4/services/user_data_service_pb" @@ -758,21 +758,21 @@ else Google::Ads::GoogleAds::V4::Services::UserDataOperation.new end end - # Create a new CustomerManagerLinkOperation + # Create a new AccountBudgetProposalOperation # - # @return [Google::Ads::GoogleAds::V4::Services::CustomerManagerLinkOperation] the operation - def self.customer_manager_link - require "google/ads/google_ads/v4/services/customer_manager_link_service_pb" + # @return [Google::Ads::GoogleAds::V4::Services::AccountBudgetProposalOperation] the operation + def self.account_budget_proposal + require "google/ads/google_ads/v4/services/account_budget_proposal_service_pb" if block_given? - op = Google::Ads::GoogleAds::V4::Services::CustomerManagerLinkOperation.new + op = Google::Ads::GoogleAds::V4::Services::AccountBudgetProposalOperation.new yield op op else - Google::Ads::GoogleAds::V4::Services::CustomerManagerLinkOperation.new + Google::Ads::GoogleAds::V4::Services::AccountBudgetProposalOperation.new end end # Create a new ApplyRecommendationOperation # @@ -800,49 +800,49 @@ else Google::Ads::GoogleAds::V4::Services::DismissRecommendationRequest::DismissRecommendationOperation.new end end - # Create a new BillingSetupOperation + # Create a new AccountLinkOperation # - # @return [Google::Ads::GoogleAds::V4::Services::BillingSetupOperation] the operation - def self.billing_setup - require "google/ads/google_ads/v4/services/billing_setup_service_pb" + # @return [Google::Ads::GoogleAds::V4::Services::AccountLinkOperation] the operation + def self.account_link + require "google/ads/google_ads/v4/services/account_link_service_pb" if block_given? - op = Google::Ads::GoogleAds::V4::Services::BillingSetupOperation.new + op = Google::Ads::GoogleAds::V4::Services::AccountLinkOperation.new yield op op else - Google::Ads::GoogleAds::V4::Services::BillingSetupOperation.new + Google::Ads::GoogleAds::V4::Services::AccountLinkOperation.new end end - # Create a new AccountLinkOperation + # Create a new MerchantCenterLinkOperation # - # @return [Google::Ads::GoogleAds::V4::Services::AccountLinkOperation] the operation - def self.account_link - require "google/ads/google_ads/v4/services/account_link_service_pb" + # @return [Google::Ads::GoogleAds::V4::Services::MerchantCenterLinkOperation] the operation + def self.merchant_center_link + require "google/ads/google_ads/v4/services/merchant_center_link_service_pb" if block_given? - op = Google::Ads::GoogleAds::V4::Services::AccountLinkOperation.new + op = Google::Ads::GoogleAds::V4::Services::MerchantCenterLinkOperation.new yield op op else - Google::Ads::GoogleAds::V4::Services::AccountLinkOperation.new + Google::Ads::GoogleAds::V4::Services::MerchantCenterLinkOperation.new end end - # Create a new AccountBudgetProposalOperation + # Create a new BillingSetupOperation # - # @return [Google::Ads::GoogleAds::V4::Services::AccountBudgetProposalOperation] the operation - def self.account_budget_proposal - require "google/ads/google_ads/v4/services/account_budget_proposal_service_pb" + # @return [Google::Ads::GoogleAds::V4::Services::BillingSetupOperation] the operation + def self.billing_setup + require "google/ads/google_ads/v4/services/billing_setup_service_pb" if block_given? - op = Google::Ads::GoogleAds::V4::Services::AccountBudgetProposalOperation.new + op = Google::Ads::GoogleAds::V4::Services::BillingSetupOperation.new yield op op else - Google::Ads::GoogleAds::V4::Services::AccountBudgetProposalOperation.new + Google::Ads::GoogleAds::V4::Services::BillingSetupOperation.new end end # Get a reference module containing convenience methods for creating # resources @@ -867,145 +867,172 @@ def self.remove_resource RemoveResource end module CreateResource - # A convenience method for creating an CampaignBudgetOperation instance with - # its "create" field prepopulated with an CampaignBudget instance. + # A convenience method for creating an CustomerClientLinkOperation instance with + # its "create" field prepopulated with an CustomerClientLink instance. # - # @overload campaign_budget - # creates an operation instance, yielding a newly fabricated CampaignBudget + # @overload customer_client_link + # creates an operation instance, yielding a newly fabricated CustomerClientLink # which can be used for setting attributes on the newly created resource - # @overload campaign_budget(res) + # @overload customer_client_link(res) # creates an operation instance, with the resource to be created # set to the passed value (res) - # @param res [Google::Ads::GoogleAds::V4::Resources::CampaignBudget] + # @param res [Google::Ads::GoogleAds::V4::Resources::CustomerClientLink] # a resource instance to be used for creation in this operation. # - # @return [Google::Ads::GoogleAds::V4::Services::CampaignBudgetOperation] instance that will create the resource - def self.campaign_budget(res = nil, &blk) - require "google/ads/google_ads/v4/services/campaign_budget_service_pb" - op = Google::Ads::GoogleAds::V4::Services::CampaignBudgetOperation.new + # @return [Google::Ads::GoogleAds::V4::Services::CustomerClientLinkOperation] instance that will create the resource + def self.customer_client_link(res = nil, &blk) + require "google/ads/google_ads/v4/services/customer_client_link_service_pb" + op = Google::Ads::GoogleAds::V4::Services::CustomerClientLinkOperation.new op["create"] = if !res.nil? res elsif !blk.nil? - Factories::V4::Resources.campaign_budget(&blk) + Factories::V4::Resources.customer_client_link(&blk) else - Factories::V4::Resources.campaign_budget + Factories::V4::Resources.customer_client_link end op end - # A convenience method for creating an AdGroupAdLabelOperation instance with - # its "create" field prepopulated with an AdGroupAdLabel instance. + # A convenience method for creating an CustomInterestOperation instance with + # its "create" field prepopulated with an CustomInterest instance. # - # @overload ad_group_ad_label - # creates an operation instance, yielding a newly fabricated AdGroupAdLabel + # @overload custom_interest + # creates an operation instance, yielding a newly fabricated CustomInterest # which can be used for setting attributes on the newly created resource - # @overload ad_group_ad_label(res) + # @overload custom_interest(res) # creates an operation instance, with the resource to be created # set to the passed value (res) - # @param res [Google::Ads::GoogleAds::V4::Resources::AdGroupAdLabel] + # @param res [Google::Ads::GoogleAds::V4::Resources::CustomInterest] # a resource instance to be used for creation in this operation. # - # @return [Google::Ads::GoogleAds::V4::Services::AdGroupAdLabelOperation] instance that will create the resource - def self.ad_group_ad_label(res = nil, &blk) - require "google/ads/google_ads/v4/services/ad_group_ad_label_service_pb" - op = Google::Ads::GoogleAds::V4::Services::AdGroupAdLabelOperation.new + # @return [Google::Ads::GoogleAds::V4::Services::CustomInterestOperation] instance that will create the resource + def self.custom_interest(res = nil, &blk) + require "google/ads/google_ads/v4/services/custom_interest_service_pb" + op = Google::Ads::GoogleAds::V4::Services::CustomInterestOperation.new op["create"] = if !res.nil? res elsif !blk.nil? - Factories::V4::Resources.ad_group_ad_label(&blk) + Factories::V4::Resources.custom_interest(&blk) else - Factories::V4::Resources.ad_group_ad_label + Factories::V4::Resources.custom_interest end op end - # A convenience method for creating an CampaignBidModifierOperation instance with - # its "create" field prepopulated with an CampaignBidModifier instance. + # A convenience method for creating an CustomerNegativeCriterionOperation instance with + # its "create" field prepopulated with an CustomerNegativeCriterion instance. # - # @overload campaign_bid_modifier - # creates an operation instance, yielding a newly fabricated CampaignBidModifier + # @overload customer_negative_criterion + # creates an operation instance, yielding a newly fabricated CustomerNegativeCriterion # which can be used for setting attributes on the newly created resource - # @overload campaign_bid_modifier(res) + # @overload customer_negative_criterion(res) # creates an operation instance, with the resource to be created # set to the passed value (res) - # @param res [Google::Ads::GoogleAds::V4::Resources::CampaignBidModifier] + # @param res [Google::Ads::GoogleAds::V4::Resources::CustomerNegativeCriterion] # a resource instance to be used for creation in this operation. # - # @return [Google::Ads::GoogleAds::V4::Services::CampaignBidModifierOperation] instance that will create the resource - def self.campaign_bid_modifier(res = nil, &blk) - require "google/ads/google_ads/v4/services/campaign_bid_modifier_service_pb" - op = Google::Ads::GoogleAds::V4::Services::CampaignBidModifierOperation.new + # @return [Google::Ads::GoogleAds::V4::Services::CustomerNegativeCriterionOperation] instance that will create the resource + def self.customer_negative_criterion(res = nil, &blk) + require "google/ads/google_ads/v4/services/customer_negative_criterion_service_pb" + op = Google::Ads::GoogleAds::V4::Services::CustomerNegativeCriterionOperation.new op["create"] = if !res.nil? res elsif !blk.nil? - Factories::V4::Resources.campaign_bid_modifier(&blk) + Factories::V4::Resources.customer_negative_criterion(&blk) else - Factories::V4::Resources.campaign_bid_modifier + Factories::V4::Resources.customer_negative_criterion end op end - # A convenience method for creating an CampaignOperation instance with - # its "create" field prepopulated with an Campaign instance. + # A convenience method for creating an SharedCriterionOperation instance with + # its "create" field prepopulated with an SharedCriterion instance. # - # @overload campaign - # creates an operation instance, yielding a newly fabricated Campaign + # @overload shared_criterion + # creates an operation instance, yielding a newly fabricated SharedCriterion # which can be used for setting attributes on the newly created resource - # @overload campaign(res) + # @overload shared_criterion(res) # creates an operation instance, with the resource to be created # set to the passed value (res) - # @param res [Google::Ads::GoogleAds::V4::Resources::Campaign] + # @param res [Google::Ads::GoogleAds::V4::Resources::SharedCriterion] # a resource instance to be used for creation in this operation. # - # @return [Google::Ads::GoogleAds::V4::Services::CampaignOperation] instance that will create the resource - def self.campaign(res = nil, &blk) - require "google/ads/google_ads/v4/services/campaign_service_pb" - op = Google::Ads::GoogleAds::V4::Services::CampaignOperation.new + # @return [Google::Ads::GoogleAds::V4::Services::SharedCriterionOperation] instance that will create the resource + def self.shared_criterion(res = nil, &blk) + require "google/ads/google_ads/v4/services/shared_criterion_service_pb" + op = Google::Ads::GoogleAds::V4::Services::SharedCriterionOperation.new op["create"] = if !res.nil? res elsif !blk.nil? - Factories::V4::Resources.campaign(&blk) + Factories::V4::Resources.shared_criterion(&blk) else - Factories::V4::Resources.campaign + Factories::V4::Resources.shared_criterion end op end - # A convenience method for creating an BiddingStrategyOperation instance with - # its "create" field prepopulated with an BiddingStrategy instance. + # A convenience method for creating an KeywordPlanAdGroupKeywordOperation instance with + # its "create" field prepopulated with an KeywordPlanAdGroupKeyword instance. # - # @overload bidding_strategy - # creates an operation instance, yielding a newly fabricated BiddingStrategy + # @overload keyword_plan_ad_group_keyword + # creates an operation instance, yielding a newly fabricated KeywordPlanAdGroupKeyword # which can be used for setting attributes on the newly created resource - # @overload bidding_strategy(res) + # @overload keyword_plan_ad_group_keyword(res) # creates an operation instance, with the resource to be created # set to the passed value (res) - # @param res [Google::Ads::GoogleAds::V4::Resources::BiddingStrategy] + # @param res [Google::Ads::GoogleAds::V4::Resources::KeywordPlanAdGroupKeyword] # a resource instance to be used for creation in this operation. # - # @return [Google::Ads::GoogleAds::V4::Services::BiddingStrategyOperation] instance that will create the resource - def self.bidding_strategy(res = nil, &blk) - require "google/ads/google_ads/v4/services/bidding_strategy_service_pb" - op = Google::Ads::GoogleAds::V4::Services::BiddingStrategyOperation.new + # @return [Google::Ads::GoogleAds::V4::Services::KeywordPlanAdGroupKeywordOperation] instance that will create the resource + def self.keyword_plan_ad_group_keyword(res = nil, &blk) + require "google/ads/google_ads/v4/services/keyword_plan_ad_group_keyword_service_pb" + op = Google::Ads::GoogleAds::V4::Services::KeywordPlanAdGroupKeywordOperation.new op["create"] = if !res.nil? res elsif !blk.nil? - Factories::V4::Resources.bidding_strategy(&blk) + Factories::V4::Resources.keyword_plan_ad_group_keyword(&blk) else - Factories::V4::Resources.bidding_strategy + Factories::V4::Resources.keyword_plan_ad_group_keyword end op end + # A convenience method for creating an FeedMappingOperation instance with + # its "create" field prepopulated with an FeedMapping instance. + # + # @overload feed_mapping + # creates an operation instance, yielding a newly fabricated FeedMapping + # which can be used for setting attributes on the newly created resource + # @overload feed_mapping(res) + # creates an operation instance, with the resource to be created + # set to the passed value (res) + # @param res [Google::Ads::GoogleAds::V4::Resources::FeedMapping] + # a resource instance to be used for creation in this operation. + # + # @return [Google::Ads::GoogleAds::V4::Services::FeedMappingOperation] instance that will create the resource + def self.feed_mapping(res = nil, &blk) + require "google/ads/google_ads/v4/services/feed_mapping_service_pb" + op = Google::Ads::GoogleAds::V4::Services::FeedMappingOperation.new + op["create"] = if !res.nil? + res + elsif !blk.nil? + Factories::V4::Resources.feed_mapping(&blk) + else + Factories::V4::Resources.feed_mapping + end + + op + end + # A convenience method for creating an AdGroupOperation instance with # its "create" field prepopulated with an AdGroup instance. # # @overload ad_group # creates an operation instance, yielding a newly fabricated AdGroup @@ -1029,64 +1056,118 @@ end op end - # A convenience method for creating an AdGroupAdOperation instance with - # its "create" field prepopulated with an AdGroupAd instance. + # A convenience method for creating an CampaignBidModifierOperation instance with + # its "create" field prepopulated with an CampaignBidModifier instance. # - # @overload ad_group_ad - # creates an operation instance, yielding a newly fabricated AdGroupAd + # @overload campaign_bid_modifier + # creates an operation instance, yielding a newly fabricated CampaignBidModifier # which can be used for setting attributes on the newly created resource - # @overload ad_group_ad(res) + # @overload campaign_bid_modifier(res) # creates an operation instance, with the resource to be created # set to the passed value (res) - # @param res [Google::Ads::GoogleAds::V4::Resources::AdGroupAd] + # @param res [Google::Ads::GoogleAds::V4::Resources::CampaignBidModifier] # a resource instance to be used for creation in this operation. # - # @return [Google::Ads::GoogleAds::V4::Services::AdGroupAdOperation] instance that will create the resource - def self.ad_group_ad(res = nil, &blk) - require "google/ads/google_ads/v4/services/ad_group_ad_service_pb" - op = Google::Ads::GoogleAds::V4::Services::AdGroupAdOperation.new + # @return [Google::Ads::GoogleAds::V4::Services::CampaignBidModifierOperation] instance that will create the resource + def self.campaign_bid_modifier(res = nil, &blk) + require "google/ads/google_ads/v4/services/campaign_bid_modifier_service_pb" + op = Google::Ads::GoogleAds::V4::Services::CampaignBidModifierOperation.new op["create"] = if !res.nil? res elsif !blk.nil? - Factories::V4::Resources.ad_group_ad(&blk) + Factories::V4::Resources.campaign_bid_modifier(&blk) else - Factories::V4::Resources.ad_group_ad + Factories::V4::Resources.campaign_bid_modifier end op end - # A convenience method for creating an AdGroupBidModifierOperation instance with - # its "create" field prepopulated with an AdGroupBidModifier instance. + # A convenience method for creating an CampaignDraftOperation instance with + # its "create" field prepopulated with an CampaignDraft instance. # - # @overload ad_group_bid_modifier - # creates an operation instance, yielding a newly fabricated AdGroupBidModifier + # @overload campaign_draft + # creates an operation instance, yielding a newly fabricated CampaignDraft # which can be used for setting attributes on the newly created resource - # @overload ad_group_bid_modifier(res) + # @overload campaign_draft(res) # creates an operation instance, with the resource to be created # set to the passed value (res) - # @param res [Google::Ads::GoogleAds::V4::Resources::AdGroupBidModifier] + # @param res [Google::Ads::GoogleAds::V4::Resources::CampaignDraft] # a resource instance to be used for creation in this operation. # - # @return [Google::Ads::GoogleAds::V4::Services::AdGroupBidModifierOperation] instance that will create the resource - def self.ad_group_bid_modifier(res = nil, &blk) - require "google/ads/google_ads/v4/services/ad_group_bid_modifier_service_pb" - op = Google::Ads::GoogleAds::V4::Services::AdGroupBidModifierOperation.new + # @return [Google::Ads::GoogleAds::V4::Services::CampaignDraftOperation] instance that will create the resource + def self.campaign_draft(res = nil, &blk) + require "google/ads/google_ads/v4/services/campaign_draft_service_pb" + op = Google::Ads::GoogleAds::V4::Services::CampaignDraftOperation.new op["create"] = if !res.nil? res elsif !blk.nil? - Factories::V4::Resources.ad_group_bid_modifier(&blk) + Factories::V4::Resources.campaign_draft(&blk) else - Factories::V4::Resources.ad_group_bid_modifier + Factories::V4::Resources.campaign_draft end op end + # A convenience method for creating an UserListOperation instance with + # its "create" field prepopulated with an UserList instance. + # + # @overload user_list + # creates an operation instance, yielding a newly fabricated UserList + # which can be used for setting attributes on the newly created resource + # @overload user_list(res) + # creates an operation instance, with the resource to be created + # set to the passed value (res) + # @param res [Google::Ads::GoogleAds::V4::Resources::UserList] + # a resource instance to be used for creation in this operation. + # + # @return [Google::Ads::GoogleAds::V4::Services::UserListOperation] instance that will create the resource + def self.user_list(res = nil, &blk) + require "google/ads/google_ads/v4/services/user_list_service_pb" + op = Google::Ads::GoogleAds::V4::Services::UserListOperation.new + op["create"] = if !res.nil? + res + elsif !blk.nil? + Factories::V4::Resources.user_list(&blk) + else + Factories::V4::Resources.user_list + end + + op + end + + # A convenience method for creating an SharedSetOperation instance with + # its "create" field prepopulated with an SharedSet instance. + # + # @overload shared_set + # creates an operation instance, yielding a newly fabricated SharedSet + # which can be used for setting attributes on the newly created resource + # @overload shared_set(res) + # creates an operation instance, with the resource to be created + # set to the passed value (res) + # @param res [Google::Ads::GoogleAds::V4::Resources::SharedSet] + # a resource instance to be used for creation in this operation. + # + # @return [Google::Ads::GoogleAds::V4::Services::SharedSetOperation] instance that will create the resource + def self.shared_set(res = nil, &blk) + require "google/ads/google_ads/v4/services/shared_set_service_pb" + op = Google::Ads::GoogleAds::V4::Services::SharedSetOperation.new + op["create"] = if !res.nil? + res + elsif !blk.nil? + Factories::V4::Resources.shared_set(&blk) + else + Factories::V4::Resources.shared_set + end + + op + end + # A convenience method for creating an AdGroupCriterionLabelOperation instance with # its "create" field prepopulated with an AdGroupCriterionLabel instance. # # @overload ad_group_criterion_label # creates an operation instance, yielding a newly fabricated AdGroupCriterionLabel @@ -1110,10 +1191,118 @@ end op end + # A convenience method for creating an LabelOperation instance with + # its "create" field prepopulated with an Label instance. + # + # @overload label + # creates an operation instance, yielding a newly fabricated Label + # which can be used for setting attributes on the newly created resource + # @overload label(res) + # creates an operation instance, with the resource to be created + # set to the passed value (res) + # @param res [Google::Ads::GoogleAds::V4::Resources::Label] + # a resource instance to be used for creation in this operation. + # + # @return [Google::Ads::GoogleAds::V4::Services::LabelOperation] instance that will create the resource + def self.label(res = nil, &blk) + require "google/ads/google_ads/v4/services/label_service_pb" + op = Google::Ads::GoogleAds::V4::Services::LabelOperation.new + op["create"] = if !res.nil? + res + elsif !blk.nil? + Factories::V4::Resources.label(&blk) + else + Factories::V4::Resources.label + end + + op + end + + # A convenience method for creating an AdGroupAdLabelOperation instance with + # its "create" field prepopulated with an AdGroupAdLabel instance. + # + # @overload ad_group_ad_label + # creates an operation instance, yielding a newly fabricated AdGroupAdLabel + # which can be used for setting attributes on the newly created resource + # @overload ad_group_ad_label(res) + # creates an operation instance, with the resource to be created + # set to the passed value (res) + # @param res [Google::Ads::GoogleAds::V4::Resources::AdGroupAdLabel] + # a resource instance to be used for creation in this operation. + # + # @return [Google::Ads::GoogleAds::V4::Services::AdGroupAdLabelOperation] instance that will create the resource + def self.ad_group_ad_label(res = nil, &blk) + require "google/ads/google_ads/v4/services/ad_group_ad_label_service_pb" + op = Google::Ads::GoogleAds::V4::Services::AdGroupAdLabelOperation.new + op["create"] = if !res.nil? + res + elsif !blk.nil? + Factories::V4::Resources.ad_group_ad_label(&blk) + else + Factories::V4::Resources.ad_group_ad_label + end + + op + end + + # A convenience method for creating an AdGroupAdOperation instance with + # its "create" field prepopulated with an AdGroupAd instance. + # + # @overload ad_group_ad + # creates an operation instance, yielding a newly fabricated AdGroupAd + # which can be used for setting attributes on the newly created resource + # @overload ad_group_ad(res) + # creates an operation instance, with the resource to be created + # set to the passed value (res) + # @param res [Google::Ads::GoogleAds::V4::Resources::AdGroupAd] + # a resource instance to be used for creation in this operation. + # + # @return [Google::Ads::GoogleAds::V4::Services::AdGroupAdOperation] instance that will create the resource + def self.ad_group_ad(res = nil, &blk) + require "google/ads/google_ads/v4/services/ad_group_ad_service_pb" + op = Google::Ads::GoogleAds::V4::Services::AdGroupAdOperation.new + op["create"] = if !res.nil? + res + elsif !blk.nil? + Factories::V4::Resources.ad_group_ad(&blk) + else + Factories::V4::Resources.ad_group_ad + end + + op + end + + # A convenience method for creating an AdGroupBidModifierOperation instance with + # its "create" field prepopulated with an AdGroupBidModifier instance. + # + # @overload ad_group_bid_modifier + # creates an operation instance, yielding a newly fabricated AdGroupBidModifier + # which can be used for setting attributes on the newly created resource + # @overload ad_group_bid_modifier(res) + # creates an operation instance, with the resource to be created + # set to the passed value (res) + # @param res [Google::Ads::GoogleAds::V4::Resources::AdGroupBidModifier] + # a resource instance to be used for creation in this operation. + # + # @return [Google::Ads::GoogleAds::V4::Services::AdGroupBidModifierOperation] instance that will create the resource + def self.ad_group_bid_modifier(res = nil, &blk) + require "google/ads/google_ads/v4/services/ad_group_bid_modifier_service_pb" + op = Google::Ads::GoogleAds::V4::Services::AdGroupBidModifierOperation.new + op["create"] = if !res.nil? + res + elsif !blk.nil? + Factories::V4::Resources.ad_group_bid_modifier(&blk) + else + Factories::V4::Resources.ad_group_bid_modifier + end + + op + end + # A convenience method for creating an AdGroupCriterionOperation instance with # its "create" field prepopulated with an AdGroupCriterion instance. # # @overload ad_group_criterion # creates an operation instance, yielding a newly fabricated AdGroupCriterion @@ -1272,64 +1461,91 @@ end op end - # A convenience method for creating an CampaignCriterionOperation instance with - # its "create" field prepopulated with an CampaignCriterion instance. + # A convenience method for creating an BiddingStrategyOperation instance with + # its "create" field prepopulated with an BiddingStrategy instance. # - # @overload campaign_criterion - # creates an operation instance, yielding a newly fabricated CampaignCriterion + # @overload bidding_strategy + # creates an operation instance, yielding a newly fabricated BiddingStrategy # which can be used for setting attributes on the newly created resource - # @overload campaign_criterion(res) + # @overload bidding_strategy(res) # creates an operation instance, with the resource to be created # set to the passed value (res) - # @param res [Google::Ads::GoogleAds::V4::Resources::CampaignCriterion] + # @param res [Google::Ads::GoogleAds::V4::Resources::BiddingStrategy] # a resource instance to be used for creation in this operation. # - # @return [Google::Ads::GoogleAds::V4::Services::CampaignCriterionOperation] instance that will create the resource - def self.campaign_criterion(res = nil, &blk) - require "google/ads/google_ads/v4/services/campaign_criterion_service_pb" - op = Google::Ads::GoogleAds::V4::Services::CampaignCriterionOperation.new + # @return [Google::Ads::GoogleAds::V4::Services::BiddingStrategyOperation] instance that will create the resource + def self.bidding_strategy(res = nil, &blk) + require "google/ads/google_ads/v4/services/bidding_strategy_service_pb" + op = Google::Ads::GoogleAds::V4::Services::BiddingStrategyOperation.new op["create"] = if !res.nil? res elsif !blk.nil? - Factories::V4::Resources.campaign_criterion(&blk) + Factories::V4::Resources.bidding_strategy(&blk) else - Factories::V4::Resources.campaign_criterion + Factories::V4::Resources.bidding_strategy end op end - # A convenience method for creating an CampaignDraftOperation instance with - # its "create" field prepopulated with an CampaignDraft instance. + # A convenience method for creating an CampaignBudgetOperation instance with + # its "create" field prepopulated with an CampaignBudget instance. # - # @overload campaign_draft - # creates an operation instance, yielding a newly fabricated CampaignDraft + # @overload campaign_budget + # creates an operation instance, yielding a newly fabricated CampaignBudget # which can be used for setting attributes on the newly created resource - # @overload campaign_draft(res) + # @overload campaign_budget(res) # creates an operation instance, with the resource to be created # set to the passed value (res) - # @param res [Google::Ads::GoogleAds::V4::Resources::CampaignDraft] + # @param res [Google::Ads::GoogleAds::V4::Resources::CampaignBudget] # a resource instance to be used for creation in this operation. # - # @return [Google::Ads::GoogleAds::V4::Services::CampaignDraftOperation] instance that will create the resource - def self.campaign_draft(res = nil, &blk) - require "google/ads/google_ads/v4/services/campaign_draft_service_pb" - op = Google::Ads::GoogleAds::V4::Services::CampaignDraftOperation.new + # @return [Google::Ads::GoogleAds::V4::Services::CampaignBudgetOperation] instance that will create the resource + def self.campaign_budget(res = nil, &blk) + require "google/ads/google_ads/v4/services/campaign_budget_service_pb" + op = Google::Ads::GoogleAds::V4::Services::CampaignBudgetOperation.new op["create"] = if !res.nil? res elsif !blk.nil? - Factories::V4::Resources.campaign_draft(&blk) + Factories::V4::Resources.campaign_budget(&blk) else - Factories::V4::Resources.campaign_draft + Factories::V4::Resources.campaign_budget end op end + # A convenience method for creating an CampaignCriterionOperation instance with + # its "create" field prepopulated with an CampaignCriterion instance. + # + # @overload campaign_criterion + # creates an operation instance, yielding a newly fabricated CampaignCriterion + # which can be used for setting attributes on the newly created resource + # @overload campaign_criterion(res) + # creates an operation instance, with the resource to be created + # set to the passed value (res) + # @param res [Google::Ads::GoogleAds::V4::Resources::CampaignCriterion] + # a resource instance to be used for creation in this operation. + # + # @return [Google::Ads::GoogleAds::V4::Services::CampaignCriterionOperation] instance that will create the resource + def self.campaign_criterion(res = nil, &blk) + require "google/ads/google_ads/v4/services/campaign_criterion_service_pb" + op = Google::Ads::GoogleAds::V4::Services::CampaignCriterionOperation.new + op["create"] = if !res.nil? + res + elsif !blk.nil? + Factories::V4::Resources.campaign_criterion(&blk) + else + Factories::V4::Resources.campaign_criterion + end + + op + end + # A convenience method for creating an CampaignExtensionSettingOperation instance with # its "create" field prepopulated with an CampaignExtensionSetting instance. # # @overload campaign_extension_setting # creates an operation instance, yielding a newly fabricated CampaignExtensionSetting @@ -1407,10 +1623,37 @@ end op end + # A convenience method for creating an CampaignOperation instance with + # its "create" field prepopulated with an Campaign instance. + # + # @overload campaign + # creates an operation instance, yielding a newly fabricated Campaign + # which can be used for setting attributes on the newly created resource + # @overload campaign(res) + # creates an operation instance, with the resource to be created + # set to the passed value (res) + # @param res [Google::Ads::GoogleAds::V4::Resources::Campaign] + # a resource instance to be used for creation in this operation. + # + # @return [Google::Ads::GoogleAds::V4::Services::CampaignOperation] instance that will create the resource + def self.campaign(res = nil, &blk) + require "google/ads/google_ads/v4/services/campaign_service_pb" + op = Google::Ads::GoogleAds::V4::Services::CampaignOperation.new + op["create"] = if !res.nil? + res + elsif !blk.nil? + Factories::V4::Resources.campaign(&blk) + else + Factories::V4::Resources.campaign + end + + op + end + # A convenience method for creating an CampaignSharedSetOperation instance with # its "create" field prepopulated with an CampaignSharedSet instance. # # @overload campaign_shared_set # creates an operation instance, yielding a newly fabricated CampaignSharedSet @@ -1542,37 +1785,10 @@ end op end - # A convenience method for creating an CustomerNegativeCriterionOperation instance with - # its "create" field prepopulated with an CustomerNegativeCriterion instance. - # - # @overload customer_negative_criterion - # creates an operation instance, yielding a newly fabricated CustomerNegativeCriterion - # which can be used for setting attributes on the newly created resource - # @overload customer_negative_criterion(res) - # creates an operation instance, with the resource to be created - # set to the passed value (res) - # @param res [Google::Ads::GoogleAds::V4::Resources::CustomerNegativeCriterion] - # a resource instance to be used for creation in this operation. - # - # @return [Google::Ads::GoogleAds::V4::Services::CustomerNegativeCriterionOperation] instance that will create the resource - def self.customer_negative_criterion(res = nil, &blk) - require "google/ads/google_ads/v4/services/customer_negative_criterion_service_pb" - op = Google::Ads::GoogleAds::V4::Services::CustomerNegativeCriterionOperation.new - op["create"] = if !res.nil? - res - elsif !blk.nil? - Factories::V4::Resources.customer_negative_criterion(&blk) - else - Factories::V4::Resources.customer_negative_criterion - end - - op - end - # A convenience method for creating an ExtensionFeedItemOperation instance with # its "create" field prepopulated with an ExtensionFeedItem instance. # # @overload extension_feed_item # creates an operation instance, yielding a newly fabricated ExtensionFeedItem @@ -1650,37 +1866,10 @@ end op end - # A convenience method for creating an FeedMappingOperation instance with - # its "create" field prepopulated with an FeedMapping instance. - # - # @overload feed_mapping - # creates an operation instance, yielding a newly fabricated FeedMapping - # which can be used for setting attributes on the newly created resource - # @overload feed_mapping(res) - # creates an operation instance, with the resource to be created - # set to the passed value (res) - # @param res [Google::Ads::GoogleAds::V4::Resources::FeedMapping] - # a resource instance to be used for creation in this operation. - # - # @return [Google::Ads::GoogleAds::V4::Services::FeedMappingOperation] instance that will create the resource - def self.feed_mapping(res = nil, &blk) - require "google/ads/google_ads/v4/services/feed_mapping_service_pb" - op = Google::Ads::GoogleAds::V4::Services::FeedMappingOperation.new - op["create"] = if !res.nil? - res - elsif !blk.nil? - Factories::V4::Resources.feed_mapping(&blk) - else - Factories::V4::Resources.feed_mapping - end - - op - end - # A convenience method for creating an FeedOperation instance with # its "create" field prepopulated with an Feed instance. # # @overload feed # creates an operation instance, yielding a newly fabricated Feed @@ -1704,37 +1893,10 @@ end op end - # A convenience method for creating an KeywordPlanAdGroupKeywordOperation instance with - # its "create" field prepopulated with an KeywordPlanAdGroupKeyword instance. - # - # @overload keyword_plan_ad_group_keyword - # creates an operation instance, yielding a newly fabricated KeywordPlanAdGroupKeyword - # which can be used for setting attributes on the newly created resource - # @overload keyword_plan_ad_group_keyword(res) - # creates an operation instance, with the resource to be created - # set to the passed value (res) - # @param res [Google::Ads::GoogleAds::V4::Resources::KeywordPlanAdGroupKeyword] - # a resource instance to be used for creation in this operation. - # - # @return [Google::Ads::GoogleAds::V4::Services::KeywordPlanAdGroupKeywordOperation] instance that will create the resource - def self.keyword_plan_ad_group_keyword(res = nil, &blk) - require "google/ads/google_ads/v4/services/keyword_plan_ad_group_keyword_service_pb" - op = Google::Ads::GoogleAds::V4::Services::KeywordPlanAdGroupKeywordOperation.new - op["create"] = if !res.nil? - res - elsif !blk.nil? - Factories::V4::Resources.keyword_plan_ad_group_keyword(&blk) - else - Factories::V4::Resources.keyword_plan_ad_group_keyword - end - - op - end - # A convenience method for creating an KeywordPlanAdGroupOperation instance with # its "create" field prepopulated with an KeywordPlanAdGroup instance. # # @overload keyword_plan_ad_group # creates an operation instance, yielding a newly fabricated KeywordPlanAdGroup @@ -1839,37 +2001,10 @@ end op end - # A convenience method for creating an LabelOperation instance with - # its "create" field prepopulated with an Label instance. - # - # @overload label - # creates an operation instance, yielding a newly fabricated Label - # which can be used for setting attributes on the newly created resource - # @overload label(res) - # creates an operation instance, with the resource to be created - # set to the passed value (res) - # @param res [Google::Ads::GoogleAds::V4::Resources::Label] - # a resource instance to be used for creation in this operation. - # - # @return [Google::Ads::GoogleAds::V4::Services::LabelOperation] instance that will create the resource - def self.label(res = nil, &blk) - require "google/ads/google_ads/v4/services/label_service_pb" - op = Google::Ads::GoogleAds::V4::Services::LabelOperation.new - op["create"] = if !res.nil? - res - elsif !blk.nil? - Factories::V4::Resources.label(&blk) - else - Factories::V4::Resources.label - end - - op - end - # A convenience method for creating an MediaFileOperation instance with # its "create" field prepopulated with an MediaFile instance. # # @overload media_file # creates an operation instance, yielding a newly fabricated MediaFile @@ -1920,91 +2055,10 @@ end op end - # A convenience method for creating an SharedCriterionOperation instance with - # its "create" field prepopulated with an SharedCriterion instance. - # - # @overload shared_criterion - # creates an operation instance, yielding a newly fabricated SharedCriterion - # which can be used for setting attributes on the newly created resource - # @overload shared_criterion(res) - # creates an operation instance, with the resource to be created - # set to the passed value (res) - # @param res [Google::Ads::GoogleAds::V4::Resources::SharedCriterion] - # a resource instance to be used for creation in this operation. - # - # @return [Google::Ads::GoogleAds::V4::Services::SharedCriterionOperation] instance that will create the resource - def self.shared_criterion(res = nil, &blk) - require "google/ads/google_ads/v4/services/shared_criterion_service_pb" - op = Google::Ads::GoogleAds::V4::Services::SharedCriterionOperation.new - op["create"] = if !res.nil? - res - elsif !blk.nil? - Factories::V4::Resources.shared_criterion(&blk) - else - Factories::V4::Resources.shared_criterion - end - - op - end - - # A convenience method for creating an SharedSetOperation instance with - # its "create" field prepopulated with an SharedSet instance. - # - # @overload shared_set - # creates an operation instance, yielding a newly fabricated SharedSet - # which can be used for setting attributes on the newly created resource - # @overload shared_set(res) - # creates an operation instance, with the resource to be created - # set to the passed value (res) - # @param res [Google::Ads::GoogleAds::V4::Resources::SharedSet] - # a resource instance to be used for creation in this operation. - # - # @return [Google::Ads::GoogleAds::V4::Services::SharedSetOperation] instance that will create the resource - def self.shared_set(res = nil, &blk) - require "google/ads/google_ads/v4/services/shared_set_service_pb" - op = Google::Ads::GoogleAds::V4::Services::SharedSetOperation.new - op["create"] = if !res.nil? - res - elsif !blk.nil? - Factories::V4::Resources.shared_set(&blk) - else - Factories::V4::Resources.shared_set - end - - op - end - - # A convenience method for creating an UserListOperation instance with - # its "create" field prepopulated with an UserList instance. - # - # @overload user_list - # creates an operation instance, yielding a newly fabricated UserList - # which can be used for setting attributes on the newly created resource - # @overload user_list(res) - # creates an operation instance, with the resource to be created - # set to the passed value (res) - # @param res [Google::Ads::GoogleAds::V4::Resources::UserList] - # a resource instance to be used for creation in this operation. - # - # @return [Google::Ads::GoogleAds::V4::Services::UserListOperation] instance that will create the resource - def self.user_list(res = nil, &blk) - require "google/ads/google_ads/v4/services/user_list_service_pb" - op = Google::Ads::GoogleAds::V4::Services::UserListOperation.new - op["create"] = if !res.nil? - res - elsif !blk.nil? - Factories::V4::Resources.user_list(&blk) - else - Factories::V4::Resources.user_list - end - - op - end - # A convenience method for creating an BatchJobOperation instance with # its "create" field prepopulated with an BatchJob instance. # # @overload batch_job # creates an operation instance, yielding a newly fabricated BatchJob @@ -2055,86 +2109,86 @@ end op end - # A convenience method for creating an CustomInterestOperation instance with - # its "create" field prepopulated with an CustomInterest instance. + # A convenience method for creating an UserDataOperation instance with + # its "create" field prepopulated with an UserData instance. # - # @overload custom_interest - # creates an operation instance, yielding a newly fabricated CustomInterest + # @overload user_data + # creates an operation instance, yielding a newly fabricated UserData # which can be used for setting attributes on the newly created resource - # @overload custom_interest(res) + # @overload user_data(res) # creates an operation instance, with the resource to be created # set to the passed value (res) - # @param res [Google::Ads::GoogleAds::V4::Resources::CustomInterest] + # @param res [Google::Ads::GoogleAds::V4::Common::UserData] # a resource instance to be used for creation in this operation. # - # @return [Google::Ads::GoogleAds::V4::Services::CustomInterestOperation] instance that will create the resource - def self.custom_interest(res = nil, &blk) - require "google/ads/google_ads/v4/services/custom_interest_service_pb" - op = Google::Ads::GoogleAds::V4::Services::CustomInterestOperation.new + # @return [Google::Ads::GoogleAds::V4::Services::UserDataOperation] instance that will create the resource + def self.user_data(res = nil, &blk) + require "google/ads/google_ads/v4/services/user_data_service_pb" + op = Google::Ads::GoogleAds::V4::Services::UserDataOperation.new op["create"] = if !res.nil? res elsif !blk.nil? - Factories::V4::Resources.custom_interest(&blk) + Factories::V4::Resources.user_data(&blk) else - Factories::V4::Resources.custom_interest + Factories::V4::Resources.user_data end op end - # A convenience method for creating an CustomerClientLinkOperation instance with - # its "create" field prepopulated with an CustomerClientLink instance. + # A convenience method for creating an AccountBudgetProposalOperation instance with + # its "create" field prepopulated with an AccountBudgetProposal instance. # - # @overload customer_client_link - # creates an operation instance, yielding a newly fabricated CustomerClientLink + # @overload account_budget_proposal + # creates an operation instance, yielding a newly fabricated AccountBudgetProposal # which can be used for setting attributes on the newly created resource - # @overload customer_client_link(res) + # @overload account_budget_proposal(res) # creates an operation instance, with the resource to be created # set to the passed value (res) - # @param res [Google::Ads::GoogleAds::V4::Resources::CustomerClientLink] + # @param res [Google::Ads::GoogleAds::V4::Resources::AccountBudgetProposal] # a resource instance to be used for creation in this operation. # - # @return [Google::Ads::GoogleAds::V4::Services::CustomerClientLinkOperation] instance that will create the resource - def self.customer_client_link(res = nil, &blk) - require "google/ads/google_ads/v4/services/customer_client_link_service_pb" - op = Google::Ads::GoogleAds::V4::Services::CustomerClientLinkOperation.new + # @return [Google::Ads::GoogleAds::V4::Services::AccountBudgetProposalOperation] instance that will create the resource + def self.account_budget_proposal(res = nil, &blk) + require "google/ads/google_ads/v4/services/account_budget_proposal_service_pb" + op = Google::Ads::GoogleAds::V4::Services::AccountBudgetProposalOperation.new op["create"] = if !res.nil? res elsif !blk.nil? - Factories::V4::Resources.customer_client_link(&blk) + Factories::V4::Resources.account_budget_proposal(&blk) else - Factories::V4::Resources.customer_client_link + Factories::V4::Resources.account_budget_proposal end op end - # A convenience method for creating an UserDataOperation instance with - # its "create" field prepopulated with an UserData instance. + # A convenience method for creating an AccountLinkOperation instance with + # its "create" field prepopulated with an AccountLink instance. # - # @overload user_data - # creates an operation instance, yielding a newly fabricated UserData + # @overload account_link + # creates an operation instance, yielding a newly fabricated AccountLink # which can be used for setting attributes on the newly created resource - # @overload user_data(res) + # @overload account_link(res) # creates an operation instance, with the resource to be created # set to the passed value (res) - # @param res [Google::Ads::GoogleAds::V4::Common::UserData] + # @param res [Google::Ads::GoogleAds::V4::Resources::AccountLink] # a resource instance to be used for creation in this operation. # - # @return [Google::Ads::GoogleAds::V4::Services::UserDataOperation] instance that will create the resource - def self.user_data(res = nil, &blk) - require "google/ads/google_ads/v4/services/user_data_service_pb" - op = Google::Ads::GoogleAds::V4::Services::UserDataOperation.new + # @return [Google::Ads::GoogleAds::V4::Services::AccountLinkOperation] instance that will create the resource + def self.account_link(res = nil, &blk) + require "google/ads/google_ads/v4/services/account_link_service_pb" + op = Google::Ads::GoogleAds::V4::Services::AccountLinkOperation.new op["create"] = if !res.nil? res elsif !blk.nil? - Factories::V4::Resources.user_data(&blk) + Factories::V4::Resources.account_link(&blk) else - Factories::V4::Resources.user_data + Factories::V4::Resources.account_link end op end @@ -2162,140 +2216,164 @@ Factories::V4::Resources.billing_setup end op end + end - # A convenience method for creating an AccountLinkOperation instance with - # its "create" field prepopulated with an AccountLink instance. + module UpdateResource + # A convenience method for creating an CustomerClientLinkOperation instance with + # its "update" field prepopulated with an CustomerClientLink instance, and + # its "update_mask" field populated as needed to send the updates to the API. # - # @overload account_link - # creates an operation instance, yielding a newly fabricated AccountLink - # which can be used for setting attributes on the newly created resource - # @overload account_link(res) - # creates an operation instance, with the resource to be created - # set to the passed value (res) - # @param res [Google::Ads::GoogleAds::V4::Resources::AccountLink] - # a resource instance to be used for creation in this operation. + # @overload #customer_client_link(path, &blk) + # @param path [String] a resource path for the resource to update + # @yield [Google::Ads::GoogleAds::V4::Resources::CustomerClientLink] a new instance of the resource for this update operation, on + # which fields can be set to update # - # @return [Google::Ads::GoogleAds::V4::Services::AccountLinkOperation] instance that will create the resource - def self.account_link(res = nil, &blk) - require "google/ads/google_ads/v4/services/account_link_service_pb" - op = Google::Ads::GoogleAds::V4::Services::AccountLinkOperation.new - op["create"] = if !res.nil? - res - elsif !blk.nil? - Factories::V4::Resources.account_link(&blk) + # @overload #customer_client_link(resource, &blk) + # @param resource [Google::Ads::GoogleAds::V4::Resources::CustomerClientLink] a resource instance to update + # @yield the passed block is called and updates against `resource` are recordered in the update mask + # @return [Google::Ads::GoogleAds::V4::Services::CustomerClientLinkOperation] the operation instance to update the resource + def self.customer_client_link(resource_or_path, &blk) + require "google/ads/google_ads/v4/services/customer_client_link_service_pb" + res = case resource_or_path + when Google::Ads::GoogleAds::V4::Resources::CustomerClientLink + resource_or_path + # got a resource path + when String + obj = Google::Ads::GoogleAds::V4::Resources::CustomerClientLink.new + obj.resource_name = resource_or_path + obj else - Factories::V4::Resources.account_link + unless Google::Ads::GoogleAds::V4::Resources::CustomerClientLink === res + raise ArgumentError.new( + "Called #{__method__} with instance of wrong type:"\ + " #{res.class} want #{operation.update_class}"\ + " or String representing resource name" + ) + end end + op = Google::Ads::GoogleAds::V4::Services::CustomerClientLinkOperation.new + op["update_mask"] = Google::Ads::GoogleAds::FieldMaskUtil.with(res, &blk) + op["update"] = res op end - # A convenience method for creating an AccountBudgetProposalOperation instance with - # its "create" field prepopulated with an AccountBudgetProposal instance. + # A convenience method for creating an CustomInterestOperation instance with + # its "update" field prepopulated with an CustomInterest instance, and + # its "update_mask" field populated as needed to send the updates to the API. # - # @overload account_budget_proposal - # creates an operation instance, yielding a newly fabricated AccountBudgetProposal - # which can be used for setting attributes on the newly created resource - # @overload account_budget_proposal(res) - # creates an operation instance, with the resource to be created - # set to the passed value (res) - # @param res [Google::Ads::GoogleAds::V4::Resources::AccountBudgetProposal] - # a resource instance to be used for creation in this operation. + # @overload #custom_interest(path, &blk) + # @param path [String] a resource path for the resource to update + # @yield [Google::Ads::GoogleAds::V4::Resources::CustomInterest] a new instance of the resource for this update operation, on + # which fields can be set to update # - # @return [Google::Ads::GoogleAds::V4::Services::AccountBudgetProposalOperation] instance that will create the resource - def self.account_budget_proposal(res = nil, &blk) - require "google/ads/google_ads/v4/services/account_budget_proposal_service_pb" - op = Google::Ads::GoogleAds::V4::Services::AccountBudgetProposalOperation.new - op["create"] = if !res.nil? - res - elsif !blk.nil? - Factories::V4::Resources.account_budget_proposal(&blk) + # @overload #custom_interest(resource, &blk) + # @param resource [Google::Ads::GoogleAds::V4::Resources::CustomInterest] a resource instance to update + # @yield the passed block is called and updates against `resource` are recordered in the update mask + # @return [Google::Ads::GoogleAds::V4::Services::CustomInterestOperation] the operation instance to update the resource + def self.custom_interest(resource_or_path, &blk) + require "google/ads/google_ads/v4/services/custom_interest_service_pb" + res = case resource_or_path + when Google::Ads::GoogleAds::V4::Resources::CustomInterest + resource_or_path + # got a resource path + when String + obj = Google::Ads::GoogleAds::V4::Resources::CustomInterest.new + obj.resource_name = resource_or_path + obj else - Factories::V4::Resources.account_budget_proposal + unless Google::Ads::GoogleAds::V4::Resources::CustomInterest === res + raise ArgumentError.new( + "Called #{__method__} with instance of wrong type:"\ + " #{res.class} want #{operation.update_class}"\ + " or String representing resource name" + ) + end end + op = Google::Ads::GoogleAds::V4::Services::CustomInterestOperation.new + op["update_mask"] = Google::Ads::GoogleAds::FieldMaskUtil.with(res, &blk) + op["update"] = res op end - end - module UpdateResource - # A convenience method for creating an CampaignBudgetOperation instance with - # its "update" field prepopulated with an CampaignBudget instance, and + # A convenience method for creating an KeywordPlanAdGroupKeywordOperation instance with + # its "update" field prepopulated with an KeywordPlanAdGroupKeyword instance, and # its "update_mask" field populated as needed to send the updates to the API. # - # @overload #campaign_budget(path, &blk) + # @overload #keyword_plan_ad_group_keyword(path, &blk) # @param path [String] a resource path for the resource to update - # @yield [Google::Ads::GoogleAds::V4::Resources::CampaignBudget] a new instance of the resource for this update operation, on + # @yield [Google::Ads::GoogleAds::V4::Resources::KeywordPlanAdGroupKeyword] a new instance of the resource for this update operation, on # which fields can be set to update # - # @overload #campaign_budget(resource, &blk) - # @param resource [Google::Ads::GoogleAds::V4::Resources::CampaignBudget] a resource instance to update + # @overload #keyword_plan_ad_group_keyword(resource, &blk) + # @param resource [Google::Ads::GoogleAds::V4::Resources::KeywordPlanAdGroupKeyword] a resource instance to update # @yield the passed block is called and updates against `resource` are recordered in the update mask - # @return [Google::Ads::GoogleAds::V4::Services::CampaignBudgetOperation] the operation instance to update the resource - def self.campaign_budget(resource_or_path, &blk) - require "google/ads/google_ads/v4/services/campaign_budget_service_pb" + # @return [Google::Ads::GoogleAds::V4::Services::KeywordPlanAdGroupKeywordOperation] the operation instance to update the resource + def self.keyword_plan_ad_group_keyword(resource_or_path, &blk) + require "google/ads/google_ads/v4/services/keyword_plan_ad_group_keyword_service_pb" res = case resource_or_path - when Google::Ads::GoogleAds::V4::Resources::CampaignBudget + when Google::Ads::GoogleAds::V4::Resources::KeywordPlanAdGroupKeyword resource_or_path # got a resource path when String - obj = Google::Ads::GoogleAds::V4::Resources::CampaignBudget.new + obj = Google::Ads::GoogleAds::V4::Resources::KeywordPlanAdGroupKeyword.new obj.resource_name = resource_or_path obj else - unless Google::Ads::GoogleAds::V4::Resources::CampaignBudget === res + unless Google::Ads::GoogleAds::V4::Resources::KeywordPlanAdGroupKeyword === res raise ArgumentError.new( "Called #{__method__} with instance of wrong type:"\ " #{res.class} want #{operation.update_class}"\ " or String representing resource name" ) end end - op = Google::Ads::GoogleAds::V4::Services::CampaignBudgetOperation.new + op = Google::Ads::GoogleAds::V4::Services::KeywordPlanAdGroupKeywordOperation.new op["update_mask"] = Google::Ads::GoogleAds::FieldMaskUtil.with(res, &blk) op["update"] = res op end - # A convenience method for creating an CustomerOperation instance with - # its "update" field prepopulated with an Customer instance, and + # A convenience method for creating an AdGroupOperation instance with + # its "update" field prepopulated with an AdGroup instance, and # its "update_mask" field populated as needed to send the updates to the API. # - # @overload #customer(path, &blk) + # @overload #ad_group(path, &blk) # @param path [String] a resource path for the resource to update - # @yield [Google::Ads::GoogleAds::V4::Resources::Customer] a new instance of the resource for this update operation, on + # @yield [Google::Ads::GoogleAds::V4::Resources::AdGroup] a new instance of the resource for this update operation, on # which fields can be set to update # - # @overload #customer(resource, &blk) - # @param resource [Google::Ads::GoogleAds::V4::Resources::Customer] a resource instance to update + # @overload #ad_group(resource, &blk) + # @param resource [Google::Ads::GoogleAds::V4::Resources::AdGroup] a resource instance to update # @yield the passed block is called and updates against `resource` are recordered in the update mask - # @return [Google::Ads::GoogleAds::V4::Services::CustomerOperation] the operation instance to update the resource - def self.customer(resource_or_path, &blk) - require "google/ads/google_ads/v4/services/customer_service_pb" + # @return [Google::Ads::GoogleAds::V4::Services::AdGroupOperation] the operation instance to update the resource + def self.ad_group(resource_or_path, &blk) + require "google/ads/google_ads/v4/services/ad_group_service_pb" res = case resource_or_path - when Google::Ads::GoogleAds::V4::Resources::Customer + when Google::Ads::GoogleAds::V4::Resources::AdGroup resource_or_path # got a resource path when String - obj = Google::Ads::GoogleAds::V4::Resources::Customer.new + obj = Google::Ads::GoogleAds::V4::Resources::AdGroup.new obj.resource_name = resource_or_path obj else - unless Google::Ads::GoogleAds::V4::Resources::Customer === res + unless Google::Ads::GoogleAds::V4::Resources::AdGroup === res raise ArgumentError.new( "Called #{__method__} with instance of wrong type:"\ " #{res.class} want #{operation.update_class}"\ " or String representing resource name" ) end end - op = Google::Ads::GoogleAds::V4::Services::CustomerOperation.new + op = Google::Ads::GoogleAds::V4::Services::AdGroupOperation.new op["update_mask"] = Google::Ads::GoogleAds::FieldMaskUtil.with(res, &blk) op["update"] = res op end @@ -2336,127 +2414,244 @@ op["update_mask"] = Google::Ads::GoogleAds::FieldMaskUtil.with(res, &blk) op["update"] = res op end - # A convenience method for creating an CampaignOperation instance with - # its "update" field prepopulated with an Campaign instance, and + # A convenience method for creating an CustomerManagerLinkOperation instance with + # its "update" field prepopulated with an CustomerManagerLink instance, and # its "update_mask" field populated as needed to send the updates to the API. # - # @overload #campaign(path, &blk) + # @overload #customer_manager_link(path, &blk) # @param path [String] a resource path for the resource to update - # @yield [Google::Ads::GoogleAds::V4::Resources::Campaign] a new instance of the resource for this update operation, on + # @yield [Google::Ads::GoogleAds::V4::Resources::CustomerManagerLink] a new instance of the resource for this update operation, on # which fields can be set to update # - # @overload #campaign(resource, &blk) - # @param resource [Google::Ads::GoogleAds::V4::Resources::Campaign] a resource instance to update + # @overload #customer_manager_link(resource, &blk) + # @param resource [Google::Ads::GoogleAds::V4::Resources::CustomerManagerLink] a resource instance to update # @yield the passed block is called and updates against `resource` are recordered in the update mask - # @return [Google::Ads::GoogleAds::V4::Services::CampaignOperation] the operation instance to update the resource - def self.campaign(resource_or_path, &blk) - require "google/ads/google_ads/v4/services/campaign_service_pb" + # @return [Google::Ads::GoogleAds::V4::Services::CustomerManagerLinkOperation] the operation instance to update the resource + def self.customer_manager_link(resource_or_path, &blk) + require "google/ads/google_ads/v4/services/customer_manager_link_service_pb" res = case resource_or_path - when Google::Ads::GoogleAds::V4::Resources::Campaign + when Google::Ads::GoogleAds::V4::Resources::CustomerManagerLink resource_or_path # got a resource path when String - obj = Google::Ads::GoogleAds::V4::Resources::Campaign.new + obj = Google::Ads::GoogleAds::V4::Resources::CustomerManagerLink.new obj.resource_name = resource_or_path obj else - unless Google::Ads::GoogleAds::V4::Resources::Campaign === res + unless Google::Ads::GoogleAds::V4::Resources::CustomerManagerLink === res raise ArgumentError.new( "Called #{__method__} with instance of wrong type:"\ " #{res.class} want #{operation.update_class}"\ " or String representing resource name" ) end end - op = Google::Ads::GoogleAds::V4::Services::CampaignOperation.new + op = Google::Ads::GoogleAds::V4::Services::CustomerManagerLinkOperation.new op["update_mask"] = Google::Ads::GoogleAds::FieldMaskUtil.with(res, &blk) op["update"] = res op end - # A convenience method for creating an BiddingStrategyOperation instance with - # its "update" field prepopulated with an BiddingStrategy instance, and + # A convenience method for creating an CampaignDraftOperation instance with + # its "update" field prepopulated with an CampaignDraft instance, and # its "update_mask" field populated as needed to send the updates to the API. # - # @overload #bidding_strategy(path, &blk) + # @overload #campaign_draft(path, &blk) # @param path [String] a resource path for the resource to update - # @yield [Google::Ads::GoogleAds::V4::Resources::BiddingStrategy] a new instance of the resource for this update operation, on + # @yield [Google::Ads::GoogleAds::V4::Resources::CampaignDraft] a new instance of the resource for this update operation, on # which fields can be set to update # - # @overload #bidding_strategy(resource, &blk) - # @param resource [Google::Ads::GoogleAds::V4::Resources::BiddingStrategy] a resource instance to update + # @overload #campaign_draft(resource, &blk) + # @param resource [Google::Ads::GoogleAds::V4::Resources::CampaignDraft] a resource instance to update # @yield the passed block is called and updates against `resource` are recordered in the update mask - # @return [Google::Ads::GoogleAds::V4::Services::BiddingStrategyOperation] the operation instance to update the resource - def self.bidding_strategy(resource_or_path, &blk) - require "google/ads/google_ads/v4/services/bidding_strategy_service_pb" + # @return [Google::Ads::GoogleAds::V4::Services::CampaignDraftOperation] the operation instance to update the resource + def self.campaign_draft(resource_or_path, &blk) + require "google/ads/google_ads/v4/services/campaign_draft_service_pb" res = case resource_or_path - when Google::Ads::GoogleAds::V4::Resources::BiddingStrategy + when Google::Ads::GoogleAds::V4::Resources::CampaignDraft resource_or_path # got a resource path when String - obj = Google::Ads::GoogleAds::V4::Resources::BiddingStrategy.new + obj = Google::Ads::GoogleAds::V4::Resources::CampaignDraft.new obj.resource_name = resource_or_path obj else - unless Google::Ads::GoogleAds::V4::Resources::BiddingStrategy === res + unless Google::Ads::GoogleAds::V4::Resources::CampaignDraft === res raise ArgumentError.new( "Called #{__method__} with instance of wrong type:"\ " #{res.class} want #{operation.update_class}"\ " or String representing resource name" ) end end - op = Google::Ads::GoogleAds::V4::Services::BiddingStrategyOperation.new + op = Google::Ads::GoogleAds::V4::Services::CampaignDraftOperation.new op["update_mask"] = Google::Ads::GoogleAds::FieldMaskUtil.with(res, &blk) op["update"] = res op end - # A convenience method for creating an AdGroupOperation instance with - # its "update" field prepopulated with an AdGroup instance, and + # A convenience method for creating an UserListOperation instance with + # its "update" field prepopulated with an UserList instance, and # its "update_mask" field populated as needed to send the updates to the API. # - # @overload #ad_group(path, &blk) + # @overload #user_list(path, &blk) # @param path [String] a resource path for the resource to update - # @yield [Google::Ads::GoogleAds::V4::Resources::AdGroup] a new instance of the resource for this update operation, on + # @yield [Google::Ads::GoogleAds::V4::Resources::UserList] a new instance of the resource for this update operation, on # which fields can be set to update # - # @overload #ad_group(resource, &blk) - # @param resource [Google::Ads::GoogleAds::V4::Resources::AdGroup] a resource instance to update + # @overload #user_list(resource, &blk) + # @param resource [Google::Ads::GoogleAds::V4::Resources::UserList] a resource instance to update # @yield the passed block is called and updates against `resource` are recordered in the update mask - # @return [Google::Ads::GoogleAds::V4::Services::AdGroupOperation] the operation instance to update the resource - def self.ad_group(resource_or_path, &blk) - require "google/ads/google_ads/v4/services/ad_group_service_pb" + # @return [Google::Ads::GoogleAds::V4::Services::UserListOperation] the operation instance to update the resource + def self.user_list(resource_or_path, &blk) + require "google/ads/google_ads/v4/services/user_list_service_pb" res = case resource_or_path - when Google::Ads::GoogleAds::V4::Resources::AdGroup + when Google::Ads::GoogleAds::V4::Resources::UserList resource_or_path # got a resource path when String - obj = Google::Ads::GoogleAds::V4::Resources::AdGroup.new + obj = Google::Ads::GoogleAds::V4::Resources::UserList.new obj.resource_name = resource_or_path obj else - unless Google::Ads::GoogleAds::V4::Resources::AdGroup === res + unless Google::Ads::GoogleAds::V4::Resources::UserList === res raise ArgumentError.new( "Called #{__method__} with instance of wrong type:"\ " #{res.class} want #{operation.update_class}"\ " or String representing resource name" ) end end - op = Google::Ads::GoogleAds::V4::Services::AdGroupOperation.new + op = Google::Ads::GoogleAds::V4::Services::UserListOperation.new op["update_mask"] = Google::Ads::GoogleAds::FieldMaskUtil.with(res, &blk) op["update"] = res op end + # A convenience method for creating an CustomerOperation instance with + # its "update" field prepopulated with an Customer instance, and + # its "update_mask" field populated as needed to send the updates to the API. + # + # @overload #customer(path, &blk) + # @param path [String] a resource path for the resource to update + # @yield [Google::Ads::GoogleAds::V4::Resources::Customer] a new instance of the resource for this update operation, on + # which fields can be set to update + # + # @overload #customer(resource, &blk) + # @param resource [Google::Ads::GoogleAds::V4::Resources::Customer] a resource instance to update + # @yield the passed block is called and updates against `resource` are recordered in the update mask + # @return [Google::Ads::GoogleAds::V4::Services::CustomerOperation] the operation instance to update the resource + def self.customer(resource_or_path, &blk) + require "google/ads/google_ads/v4/services/customer_service_pb" + res = case resource_or_path + when Google::Ads::GoogleAds::V4::Resources::Customer + resource_or_path + # got a resource path + when String + obj = Google::Ads::GoogleAds::V4::Resources::Customer.new + obj.resource_name = resource_or_path + obj + else + unless Google::Ads::GoogleAds::V4::Resources::Customer === res + raise ArgumentError.new( + "Called #{__method__} with instance of wrong type:"\ + " #{res.class} want #{operation.update_class}"\ + " or String representing resource name" + ) + end + end + + op = Google::Ads::GoogleAds::V4::Services::CustomerOperation.new + op["update_mask"] = Google::Ads::GoogleAds::FieldMaskUtil.with(res, &blk) + op["update"] = res + op + end + + # A convenience method for creating an SharedSetOperation instance with + # its "update" field prepopulated with an SharedSet instance, and + # its "update_mask" field populated as needed to send the updates to the API. + # + # @overload #shared_set(path, &blk) + # @param path [String] a resource path for the resource to update + # @yield [Google::Ads::GoogleAds::V4::Resources::SharedSet] a new instance of the resource for this update operation, on + # which fields can be set to update + # + # @overload #shared_set(resource, &blk) + # @param resource [Google::Ads::GoogleAds::V4::Resources::SharedSet] a resource instance to update + # @yield the passed block is called and updates against `resource` are recordered in the update mask + # @return [Google::Ads::GoogleAds::V4::Services::SharedSetOperation] the operation instance to update the resource + def self.shared_set(resource_or_path, &blk) + require "google/ads/google_ads/v4/services/shared_set_service_pb" + res = case resource_or_path + when Google::Ads::GoogleAds::V4::Resources::SharedSet + resource_or_path + # got a resource path + when String + obj = Google::Ads::GoogleAds::V4::Resources::SharedSet.new + obj.resource_name = resource_or_path + obj + else + unless Google::Ads::GoogleAds::V4::Resources::SharedSet === res + raise ArgumentError.new( + "Called #{__method__} with instance of wrong type:"\ + " #{res.class} want #{operation.update_class}"\ + " or String representing resource name" + ) + end + end + + op = Google::Ads::GoogleAds::V4::Services::SharedSetOperation.new + op["update_mask"] = Google::Ads::GoogleAds::FieldMaskUtil.with(res, &blk) + op["update"] = res + op + end + + # A convenience method for creating an LabelOperation instance with + # its "update" field prepopulated with an Label instance, and + # its "update_mask" field populated as needed to send the updates to the API. + # + # @overload #label(path, &blk) + # @param path [String] a resource path for the resource to update + # @yield [Google::Ads::GoogleAds::V4::Resources::Label] a new instance of the resource for this update operation, on + # which fields can be set to update + # + # @overload #label(resource, &blk) + # @param resource [Google::Ads::GoogleAds::V4::Resources::Label] a resource instance to update + # @yield the passed block is called and updates against `resource` are recordered in the update mask + # @return [Google::Ads::GoogleAds::V4::Services::LabelOperation] the operation instance to update the resource + def self.label(resource_or_path, &blk) + require "google/ads/google_ads/v4/services/label_service_pb" + res = case resource_or_path + when Google::Ads::GoogleAds::V4::Resources::Label + resource_or_path + # got a resource path + when String + obj = Google::Ads::GoogleAds::V4::Resources::Label.new + obj.resource_name = resource_or_path + obj + else + unless Google::Ads::GoogleAds::V4::Resources::Label === res + raise ArgumentError.new( + "Called #{__method__} with instance of wrong type:"\ + " #{res.class} want #{operation.update_class}"\ + " or String representing resource name" + ) + end + end + + op = Google::Ads::GoogleAds::V4::Services::LabelOperation.new + op["update_mask"] = Google::Ads::GoogleAds::FieldMaskUtil.with(res, &blk) + op["update"] = res + op + end + # A convenience method for creating an AdGroupAdOperation instance with # its "update" field prepopulated with an AdGroupAd instance, and # its "update_mask" field populated as needed to send the updates to the API. # # @overload #ad_group_ad(path, &blk) @@ -2726,88 +2921,127 @@ op["update_mask"] = Google::Ads::GoogleAds::FieldMaskUtil.with(res, &blk) op["update"] = res op end - # A convenience method for creating an CampaignCriterionOperation instance with - # its "update" field prepopulated with an CampaignCriterion instance, and + # A convenience method for creating an BiddingStrategyOperation instance with + # its "update" field prepopulated with an BiddingStrategy instance, and # its "update_mask" field populated as needed to send the updates to the API. # - # @overload #campaign_criterion(path, &blk) + # @overload #bidding_strategy(path, &blk) # @param path [String] a resource path for the resource to update - # @yield [Google::Ads::GoogleAds::V4::Resources::CampaignCriterion] a new instance of the resource for this update operation, on + # @yield [Google::Ads::GoogleAds::V4::Resources::BiddingStrategy] a new instance of the resource for this update operation, on # which fields can be set to update # - # @overload #campaign_criterion(resource, &blk) - # @param resource [Google::Ads::GoogleAds::V4::Resources::CampaignCriterion] a resource instance to update + # @overload #bidding_strategy(resource, &blk) + # @param resource [Google::Ads::GoogleAds::V4::Resources::BiddingStrategy] a resource instance to update # @yield the passed block is called and updates against `resource` are recordered in the update mask - # @return [Google::Ads::GoogleAds::V4::Services::CampaignCriterionOperation] the operation instance to update the resource - def self.campaign_criterion(resource_or_path, &blk) - require "google/ads/google_ads/v4/services/campaign_criterion_service_pb" + # @return [Google::Ads::GoogleAds::V4::Services::BiddingStrategyOperation] the operation instance to update the resource + def self.bidding_strategy(resource_or_path, &blk) + require "google/ads/google_ads/v4/services/bidding_strategy_service_pb" res = case resource_or_path - when Google::Ads::GoogleAds::V4::Resources::CampaignCriterion + when Google::Ads::GoogleAds::V4::Resources::BiddingStrategy resource_or_path # got a resource path when String - obj = Google::Ads::GoogleAds::V4::Resources::CampaignCriterion.new + obj = Google::Ads::GoogleAds::V4::Resources::BiddingStrategy.new obj.resource_name = resource_or_path obj else - unless Google::Ads::GoogleAds::V4::Resources::CampaignCriterion === res + unless Google::Ads::GoogleAds::V4::Resources::BiddingStrategy === res raise ArgumentError.new( "Called #{__method__} with instance of wrong type:"\ " #{res.class} want #{operation.update_class}"\ " or String representing resource name" ) end end - op = Google::Ads::GoogleAds::V4::Services::CampaignCriterionOperation.new + op = Google::Ads::GoogleAds::V4::Services::BiddingStrategyOperation.new op["update_mask"] = Google::Ads::GoogleAds::FieldMaskUtil.with(res, &blk) op["update"] = res op end - # A convenience method for creating an CampaignDraftOperation instance with - # its "update" field prepopulated with an CampaignDraft instance, and + # A convenience method for creating an CampaignBudgetOperation instance with + # its "update" field prepopulated with an CampaignBudget instance, and # its "update_mask" field populated as needed to send the updates to the API. # - # @overload #campaign_draft(path, &blk) + # @overload #campaign_budget(path, &blk) # @param path [String] a resource path for the resource to update - # @yield [Google::Ads::GoogleAds::V4::Resources::CampaignDraft] a new instance of the resource for this update operation, on + # @yield [Google::Ads::GoogleAds::V4::Resources::CampaignBudget] a new instance of the resource for this update operation, on # which fields can be set to update # - # @overload #campaign_draft(resource, &blk) - # @param resource [Google::Ads::GoogleAds::V4::Resources::CampaignDraft] a resource instance to update + # @overload #campaign_budget(resource, &blk) + # @param resource [Google::Ads::GoogleAds::V4::Resources::CampaignBudget] a resource instance to update # @yield the passed block is called and updates against `resource` are recordered in the update mask - # @return [Google::Ads::GoogleAds::V4::Services::CampaignDraftOperation] the operation instance to update the resource - def self.campaign_draft(resource_or_path, &blk) - require "google/ads/google_ads/v4/services/campaign_draft_service_pb" + # @return [Google::Ads::GoogleAds::V4::Services::CampaignBudgetOperation] the operation instance to update the resource + def self.campaign_budget(resource_or_path, &blk) + require "google/ads/google_ads/v4/services/campaign_budget_service_pb" res = case resource_or_path - when Google::Ads::GoogleAds::V4::Resources::CampaignDraft + when Google::Ads::GoogleAds::V4::Resources::CampaignBudget resource_or_path # got a resource path when String - obj = Google::Ads::GoogleAds::V4::Resources::CampaignDraft.new + obj = Google::Ads::GoogleAds::V4::Resources::CampaignBudget.new obj.resource_name = resource_or_path obj else - unless Google::Ads::GoogleAds::V4::Resources::CampaignDraft === res + unless Google::Ads::GoogleAds::V4::Resources::CampaignBudget === res raise ArgumentError.new( "Called #{__method__} with instance of wrong type:"\ " #{res.class} want #{operation.update_class}"\ " or String representing resource name" ) end end - op = Google::Ads::GoogleAds::V4::Services::CampaignDraftOperation.new + op = Google::Ads::GoogleAds::V4::Services::CampaignBudgetOperation.new op["update_mask"] = Google::Ads::GoogleAds::FieldMaskUtil.with(res, &blk) op["update"] = res op end + # A convenience method for creating an CampaignCriterionOperation instance with + # its "update" field prepopulated with an CampaignCriterion instance, and + # its "update_mask" field populated as needed to send the updates to the API. + # + # @overload #campaign_criterion(path, &blk) + # @param path [String] a resource path for the resource to update + # @yield [Google::Ads::GoogleAds::V4::Resources::CampaignCriterion] a new instance of the resource for this update operation, on + # which fields can be set to update + # + # @overload #campaign_criterion(resource, &blk) + # @param resource [Google::Ads::GoogleAds::V4::Resources::CampaignCriterion] a resource instance to update + # @yield the passed block is called and updates against `resource` are recordered in the update mask + # @return [Google::Ads::GoogleAds::V4::Services::CampaignCriterionOperation] the operation instance to update the resource + def self.campaign_criterion(resource_or_path, &blk) + require "google/ads/google_ads/v4/services/campaign_criterion_service_pb" + res = case resource_or_path + when Google::Ads::GoogleAds::V4::Resources::CampaignCriterion + resource_or_path + # got a resource path + when String + obj = Google::Ads::GoogleAds::V4::Resources::CampaignCriterion.new + obj.resource_name = resource_or_path + obj + else + unless Google::Ads::GoogleAds::V4::Resources::CampaignCriterion === res + raise ArgumentError.new( + "Called #{__method__} with instance of wrong type:"\ + " #{res.class} want #{operation.update_class}"\ + " or String representing resource name" + ) + end + end + + op = Google::Ads::GoogleAds::V4::Services::CampaignCriterionOperation.new + op["update_mask"] = Google::Ads::GoogleAds::FieldMaskUtil.with(res, &blk) + op["update"] = res + op + end + # A convenience method for creating an CampaignExperimentOperation instance with # its "update" field prepopulated with an CampaignExperiment instance, and # its "update_mask" field populated as needed to send the updates to the API. # # @overload #campaign_experiment(path, &blk) @@ -2921,10 +3155,49 @@ op["update_mask"] = Google::Ads::GoogleAds::FieldMaskUtil.with(res, &blk) op["update"] = res op end + # A convenience method for creating an CampaignOperation instance with + # its "update" field prepopulated with an Campaign instance, and + # its "update_mask" field populated as needed to send the updates to the API. + # + # @overload #campaign(path, &blk) + # @param path [String] a resource path for the resource to update + # @yield [Google::Ads::GoogleAds::V4::Resources::Campaign] a new instance of the resource for this update operation, on + # which fields can be set to update + # + # @overload #campaign(resource, &blk) + # @param resource [Google::Ads::GoogleAds::V4::Resources::Campaign] a resource instance to update + # @yield the passed block is called and updates against `resource` are recordered in the update mask + # @return [Google::Ads::GoogleAds::V4::Services::CampaignOperation] the operation instance to update the resource + def self.campaign(resource_or_path, &blk) + require "google/ads/google_ads/v4/services/campaign_service_pb" + res = case resource_or_path + when Google::Ads::GoogleAds::V4::Resources::Campaign + resource_or_path + # got a resource path + when String + obj = Google::Ads::GoogleAds::V4::Resources::Campaign.new + obj.resource_name = resource_or_path + obj + else + unless Google::Ads::GoogleAds::V4::Resources::Campaign === res + raise ArgumentError.new( + "Called #{__method__} with instance of wrong type:"\ + " #{res.class} want #{operation.update_class}"\ + " or String representing resource name" + ) + end + end + + op = Google::Ads::GoogleAds::V4::Services::CampaignOperation.new + op["update_mask"] = Google::Ads::GoogleAds::FieldMaskUtil.with(res, &blk) + op["update"] = res + op + end + # A convenience method for creating an ConversionActionOperation instance with # its "update" field prepopulated with an ConversionAction instance, and # its "update_mask" field populated as needed to send the updates to the API. # # @overload #conversion_action(path, &blk) @@ -3155,49 +3428,10 @@ op["update_mask"] = Google::Ads::GoogleAds::FieldMaskUtil.with(res, &blk) op["update"] = res op end - # A convenience method for creating an KeywordPlanAdGroupKeywordOperation instance with - # its "update" field prepopulated with an KeywordPlanAdGroupKeyword instance, and - # its "update_mask" field populated as needed to send the updates to the API. - # - # @overload #keyword_plan_ad_group_keyword(path, &blk) - # @param path [String] a resource path for the resource to update - # @yield [Google::Ads::GoogleAds::V4::Resources::KeywordPlanAdGroupKeyword] a new instance of the resource for this update operation, on - # which fields can be set to update - # - # @overload #keyword_plan_ad_group_keyword(resource, &blk) - # @param resource [Google::Ads::GoogleAds::V4::Resources::KeywordPlanAdGroupKeyword] a resource instance to update - # @yield the passed block is called and updates against `resource` are recordered in the update mask - # @return [Google::Ads::GoogleAds::V4::Services::KeywordPlanAdGroupKeywordOperation] the operation instance to update the resource - def self.keyword_plan_ad_group_keyword(resource_or_path, &blk) - require "google/ads/google_ads/v4/services/keyword_plan_ad_group_keyword_service_pb" - res = case resource_or_path - when Google::Ads::GoogleAds::V4::Resources::KeywordPlanAdGroupKeyword - resource_or_path - # got a resource path - when String - obj = Google::Ads::GoogleAds::V4::Resources::KeywordPlanAdGroupKeyword.new - obj.resource_name = resource_or_path - obj - else - unless Google::Ads::GoogleAds::V4::Resources::KeywordPlanAdGroupKeyword === res - raise ArgumentError.new( - "Called #{__method__} with instance of wrong type:"\ - " #{res.class} want #{operation.update_class}"\ - " or String representing resource name" - ) - end - end - - op = Google::Ads::GoogleAds::V4::Services::KeywordPlanAdGroupKeywordOperation.new - op["update_mask"] = Google::Ads::GoogleAds::FieldMaskUtil.with(res, &blk) - op["update"] = res - op - end - # A convenience method for creating an KeywordPlanAdGroupOperation instance with # its "update" field prepopulated with an KeywordPlanAdGroup instance, and # its "update_mask" field populated as needed to send the updates to the API. # # @overload #keyword_plan_ad_group(path, &blk) @@ -3350,49 +3584,10 @@ op["update_mask"] = Google::Ads::GoogleAds::FieldMaskUtil.with(res, &blk) op["update"] = res op end - # A convenience method for creating an LabelOperation instance with - # its "update" field prepopulated with an Label instance, and - # its "update_mask" field populated as needed to send the updates to the API. - # - # @overload #label(path, &blk) - # @param path [String] a resource path for the resource to update - # @yield [Google::Ads::GoogleAds::V4::Resources::Label] a new instance of the resource for this update operation, on - # which fields can be set to update - # - # @overload #label(resource, &blk) - # @param resource [Google::Ads::GoogleAds::V4::Resources::Label] a resource instance to update - # @yield the passed block is called and updates against `resource` are recordered in the update mask - # @return [Google::Ads::GoogleAds::V4::Services::LabelOperation] the operation instance to update the resource - def self.label(resource_or_path, &blk) - require "google/ads/google_ads/v4/services/label_service_pb" - res = case resource_or_path - when Google::Ads::GoogleAds::V4::Resources::Label - resource_or_path - # got a resource path - when String - obj = Google::Ads::GoogleAds::V4::Resources::Label.new - obj.resource_name = resource_or_path - obj - else - unless Google::Ads::GoogleAds::V4::Resources::Label === res - raise ArgumentError.new( - "Called #{__method__} with instance of wrong type:"\ - " #{res.class} want #{operation.update_class}"\ - " or String representing resource name" - ) - end - end - - op = Google::Ads::GoogleAds::V4::Services::LabelOperation.new - op["update_mask"] = Google::Ads::GoogleAds::FieldMaskUtil.with(res, &blk) - op["update"] = res - op - end - # A convenience method for creating an RemarketingActionOperation instance with # its "update" field prepopulated with an RemarketingAction instance, and # its "update_mask" field populated as needed to send the updates to the API. # # @overload #remarketing_action(path, &blk) @@ -3428,127 +3623,10 @@ op["update_mask"] = Google::Ads::GoogleAds::FieldMaskUtil.with(res, &blk) op["update"] = res op end - # A convenience method for creating an SharedSetOperation instance with - # its "update" field prepopulated with an SharedSet instance, and - # its "update_mask" field populated as needed to send the updates to the API. - # - # @overload #shared_set(path, &blk) - # @param path [String] a resource path for the resource to update - # @yield [Google::Ads::GoogleAds::V4::Resources::SharedSet] a new instance of the resource for this update operation, on - # which fields can be set to update - # - # @overload #shared_set(resource, &blk) - # @param resource [Google::Ads::GoogleAds::V4::Resources::SharedSet] a resource instance to update - # @yield the passed block is called and updates against `resource` are recordered in the update mask - # @return [Google::Ads::GoogleAds::V4::Services::SharedSetOperation] the operation instance to update the resource - def self.shared_set(resource_or_path, &blk) - require "google/ads/google_ads/v4/services/shared_set_service_pb" - res = case resource_or_path - when Google::Ads::GoogleAds::V4::Resources::SharedSet - resource_or_path - # got a resource path - when String - obj = Google::Ads::GoogleAds::V4::Resources::SharedSet.new - obj.resource_name = resource_or_path - obj - else - unless Google::Ads::GoogleAds::V4::Resources::SharedSet === res - raise ArgumentError.new( - "Called #{__method__} with instance of wrong type:"\ - " #{res.class} want #{operation.update_class}"\ - " or String representing resource name" - ) - end - end - - op = Google::Ads::GoogleAds::V4::Services::SharedSetOperation.new - op["update_mask"] = Google::Ads::GoogleAds::FieldMaskUtil.with(res, &blk) - op["update"] = res - op - end - - # A convenience method for creating an UserListOperation instance with - # its "update" field prepopulated with an UserList instance, and - # its "update_mask" field populated as needed to send the updates to the API. - # - # @overload #user_list(path, &blk) - # @param path [String] a resource path for the resource to update - # @yield [Google::Ads::GoogleAds::V4::Resources::UserList] a new instance of the resource for this update operation, on - # which fields can be set to update - # - # @overload #user_list(resource, &blk) - # @param resource [Google::Ads::GoogleAds::V4::Resources::UserList] a resource instance to update - # @yield the passed block is called and updates against `resource` are recordered in the update mask - # @return [Google::Ads::GoogleAds::V4::Services::UserListOperation] the operation instance to update the resource - def self.user_list(resource_or_path, &blk) - require "google/ads/google_ads/v4/services/user_list_service_pb" - res = case resource_or_path - when Google::Ads::GoogleAds::V4::Resources::UserList - resource_or_path - # got a resource path - when String - obj = Google::Ads::GoogleAds::V4::Resources::UserList.new - obj.resource_name = resource_or_path - obj - else - unless Google::Ads::GoogleAds::V4::Resources::UserList === res - raise ArgumentError.new( - "Called #{__method__} with instance of wrong type:"\ - " #{res.class} want #{operation.update_class}"\ - " or String representing resource name" - ) - end - end - - op = Google::Ads::GoogleAds::V4::Services::UserListOperation.new - op["update_mask"] = Google::Ads::GoogleAds::FieldMaskUtil.with(res, &blk) - op["update"] = res - op - end - - # A convenience method for creating an CustomInterestOperation instance with - # its "update" field prepopulated with an CustomInterest instance, and - # its "update_mask" field populated as needed to send the updates to the API. - # - # @overload #custom_interest(path, &blk) - # @param path [String] a resource path for the resource to update - # @yield [Google::Ads::GoogleAds::V4::Resources::CustomInterest] a new instance of the resource for this update operation, on - # which fields can be set to update - # - # @overload #custom_interest(resource, &blk) - # @param resource [Google::Ads::GoogleAds::V4::Resources::CustomInterest] a resource instance to update - # @yield the passed block is called and updates against `resource` are recordered in the update mask - # @return [Google::Ads::GoogleAds::V4::Services::CustomInterestOperation] the operation instance to update the resource - def self.custom_interest(resource_or_path, &blk) - require "google/ads/google_ads/v4/services/custom_interest_service_pb" - res = case resource_or_path - when Google::Ads::GoogleAds::V4::Resources::CustomInterest - resource_or_path - # got a resource path - when String - obj = Google::Ads::GoogleAds::V4::Resources::CustomInterest.new - obj.resource_name = resource_or_path - obj - else - unless Google::Ads::GoogleAds::V4::Resources::CustomInterest === res - raise ArgumentError.new( - "Called #{__method__} with instance of wrong type:"\ - " #{res.class} want #{operation.update_class}"\ - " or String representing resource name" - ) - end - end - - op = Google::Ads::GoogleAds::V4::Services::CustomInterestOperation.new - op["update_mask"] = Google::Ads::GoogleAds::FieldMaskUtil.with(res, &blk) - op["update"] = res - op - end - # A convenience method for creating an MerchantCenterLinkOperation instance with # its "update" field prepopulated with an MerchantCenterLink instance, and # its "update_mask" field populated as needed to send the updates to the API. # # @overload #merchant_center_link(path, &blk) @@ -3583,142 +3661,108 @@ op = Google::Ads::GoogleAds::V4::Services::MerchantCenterLinkOperation.new op["update_mask"] = Google::Ads::GoogleAds::FieldMaskUtil.with(res, &blk) op["update"] = res op end + end - # A convenience method for creating an CustomerClientLinkOperation instance with - # its "update" field prepopulated with an CustomerClientLink instance, and - # its "update_mask" field populated as needed to send the updates to the API. + module RemoveResource + # A convenience method for creating an FeedAttributeOperation instance with + # its "remove" field preopulated with a resource path corresponding to the resource to be removed. # - # @overload #customer_client_link(path, &blk) - # @param path [String] a resource path for the resource to update - # @yield [Google::Ads::GoogleAds::V4::Resources::CustomerClientLink] a new instance of the resource for this update operation, on - # which fields can be set to update + # @param path [String] the resource name of the resource to delete. + def self.feed_attribute(path) + require "google/ads/google_ads/v4/resources/feed_pb" + op = Google::Ads::GoogleAds::V4::Resources::FeedAttributeOperation.new + op["remove"] = path + op + end + + # A convenience method for creating an TargetRestrictionOperation instance with + # its "remove" field preopulated with a resource path corresponding to the resource to be removed. # - # @overload #customer_client_link(resource, &blk) - # @param resource [Google::Ads::GoogleAds::V4::Resources::CustomerClientLink] a resource instance to update - # @yield the passed block is called and updates against `resource` are recordered in the update mask - # @return [Google::Ads::GoogleAds::V4::Services::CustomerClientLinkOperation] the operation instance to update the resource - def self.customer_client_link(resource_or_path, &blk) - require "google/ads/google_ads/v4/services/customer_client_link_service_pb" - res = case resource_or_path - when Google::Ads::GoogleAds::V4::Resources::CustomerClientLink - resource_or_path - # got a resource path - when String - obj = Google::Ads::GoogleAds::V4::Resources::CustomerClientLink.new - obj.resource_name = resource_or_path - obj - else - unless Google::Ads::GoogleAds::V4::Resources::CustomerClientLink === res - raise ArgumentError.new( - "Called #{__method__} with instance of wrong type:"\ - " #{res.class} want #{operation.update_class}"\ - " or String representing resource name" - ) - end - end + # @param path [String] the resource name of the resource to delete. + def self.target_restriction(path) + require "google/ads/google_ads/v4/common/targeting_setting_pb" + op = Google::Ads::GoogleAds::V4::Common::TargetRestrictionOperation.new + op["remove"] = path + op + end + # A convenience method for creating an CustomerClientLinkOperation instance with + # its "remove" field preopulated with a resource path corresponding to the resource to be removed. + # + # @param path [String] the resource name of the resource to delete. + def self.customer_client_link(path) + require "google/ads/google_ads/v4/services/customer_client_link_service_pb" op = Google::Ads::GoogleAds::V4::Services::CustomerClientLinkOperation.new - op["update_mask"] = Google::Ads::GoogleAds::FieldMaskUtil.with(res, &blk) - op["update"] = res + op["remove"] = path op end - # A convenience method for creating an CustomerManagerLinkOperation instance with - # its "update" field prepopulated with an CustomerManagerLink instance, and - # its "update_mask" field populated as needed to send the updates to the API. + # A convenience method for creating an CustomInterestOperation instance with + # its "remove" field preopulated with a resource path corresponding to the resource to be removed. # - # @overload #customer_manager_link(path, &blk) - # @param path [String] a resource path for the resource to update - # @yield [Google::Ads::GoogleAds::V4::Resources::CustomerManagerLink] a new instance of the resource for this update operation, on - # which fields can be set to update - # - # @overload #customer_manager_link(resource, &blk) - # @param resource [Google::Ads::GoogleAds::V4::Resources::CustomerManagerLink] a resource instance to update - # @yield the passed block is called and updates against `resource` are recordered in the update mask - # @return [Google::Ads::GoogleAds::V4::Services::CustomerManagerLinkOperation] the operation instance to update the resource - def self.customer_manager_link(resource_or_path, &blk) - require "google/ads/google_ads/v4/services/customer_manager_link_service_pb" - res = case resource_or_path - when Google::Ads::GoogleAds::V4::Resources::CustomerManagerLink - resource_or_path - # got a resource path - when String - obj = Google::Ads::GoogleAds::V4::Resources::CustomerManagerLink.new - obj.resource_name = resource_or_path - obj - else - unless Google::Ads::GoogleAds::V4::Resources::CustomerManagerLink === res - raise ArgumentError.new( - "Called #{__method__} with instance of wrong type:"\ - " #{res.class} want #{operation.update_class}"\ - " or String representing resource name" - ) - end - end - - op = Google::Ads::GoogleAds::V4::Services::CustomerManagerLinkOperation.new - op["update_mask"] = Google::Ads::GoogleAds::FieldMaskUtil.with(res, &blk) - op["update"] = res + # @param path [String] the resource name of the resource to delete. + def self.custom_interest(path) + require "google/ads/google_ads/v4/services/custom_interest_service_pb" + op = Google::Ads::GoogleAds::V4::Services::CustomInterestOperation.new + op["remove"] = path op end - end - module RemoveResource - # A convenience method for creating an TargetRestrictionOperation instance with + # A convenience method for creating an CustomerNegativeCriterionOperation instance with # its "remove" field preopulated with a resource path corresponding to the resource to be removed. # # @param path [String] the resource name of the resource to delete. - def self.target_restriction(path) - require "google/ads/google_ads/v4/common/targeting_setting_pb" - op = Google::Ads::GoogleAds::V4::Common::TargetRestrictionOperation.new + def self.customer_negative_criterion(path) + require "google/ads/google_ads/v4/services/customer_negative_criterion_service_pb" + op = Google::Ads::GoogleAds::V4::Services::CustomerNegativeCriterionOperation.new op["remove"] = path op end - # A convenience method for creating an FeedAttributeOperation instance with + # A convenience method for creating an SharedCriterionOperation instance with # its "remove" field preopulated with a resource path corresponding to the resource to be removed. # # @param path [String] the resource name of the resource to delete. - def self.feed_attribute(path) - require "google/ads/google_ads/v4/resources/feed_pb" - op = Google::Ads::GoogleAds::V4::Resources::FeedAttributeOperation.new + def self.shared_criterion(path) + require "google/ads/google_ads/v4/services/shared_criterion_service_pb" + op = Google::Ads::GoogleAds::V4::Services::SharedCriterionOperation.new op["remove"] = path op end - # A convenience method for creating an CampaignBudgetOperation instance with + # A convenience method for creating an KeywordPlanAdGroupKeywordOperation instance with # its "remove" field preopulated with a resource path corresponding to the resource to be removed. # # @param path [String] the resource name of the resource to delete. - def self.campaign_budget(path) - require "google/ads/google_ads/v4/services/campaign_budget_service_pb" - op = Google::Ads::GoogleAds::V4::Services::CampaignBudgetOperation.new + def self.keyword_plan_ad_group_keyword(path) + require "google/ads/google_ads/v4/services/keyword_plan_ad_group_keyword_service_pb" + op = Google::Ads::GoogleAds::V4::Services::KeywordPlanAdGroupKeywordOperation.new op["remove"] = path op end - # A convenience method for creating an AdGroupAdLabelOperation instance with + # A convenience method for creating an FeedMappingOperation instance with # its "remove" field preopulated with a resource path corresponding to the resource to be removed. # # @param path [String] the resource name of the resource to delete. - def self.ad_group_ad_label(path) - require "google/ads/google_ads/v4/services/ad_group_ad_label_service_pb" - op = Google::Ads::GoogleAds::V4::Services::AdGroupAdLabelOperation.new + def self.feed_mapping(path) + require "google/ads/google_ads/v4/services/feed_mapping_service_pb" + op = Google::Ads::GoogleAds::V4::Services::FeedMappingOperation.new op["remove"] = path op end - # A convenience method for creating an CustomerOperation instance with + # A convenience method for creating an AdGroupOperation instance with # its "remove" field preopulated with a resource path corresponding to the resource to be removed. # # @param path [String] the resource name of the resource to delete. - def self.customer(path) - require "google/ads/google_ads/v4/services/customer_service_pb" - op = Google::Ads::GoogleAds::V4::Services::CustomerOperation.new + def self.ad_group(path) + require "google/ads/google_ads/v4/services/ad_group_service_pb" + op = Google::Ads::GoogleAds::V4::Services::AdGroupOperation.new op["remove"] = path op end # A convenience method for creating an CampaignBidModifierOperation instance with @@ -3730,61 +3774,61 @@ op = Google::Ads::GoogleAds::V4::Services::CampaignBidModifierOperation.new op["remove"] = path op end - # A convenience method for creating an CampaignOperation instance with + # A convenience method for creating an CustomerManagerLinkOperation instance with # its "remove" field preopulated with a resource path corresponding to the resource to be removed. # # @param path [String] the resource name of the resource to delete. - def self.campaign(path) - require "google/ads/google_ads/v4/services/campaign_service_pb" - op = Google::Ads::GoogleAds::V4::Services::CampaignOperation.new + def self.customer_manager_link(path) + require "google/ads/google_ads/v4/services/customer_manager_link_service_pb" + op = Google::Ads::GoogleAds::V4::Services::CustomerManagerLinkOperation.new op["remove"] = path op end - # A convenience method for creating an BiddingStrategyOperation instance with + # A convenience method for creating an CampaignDraftOperation instance with # its "remove" field preopulated with a resource path corresponding to the resource to be removed. # # @param path [String] the resource name of the resource to delete. - def self.bidding_strategy(path) - require "google/ads/google_ads/v4/services/bidding_strategy_service_pb" - op = Google::Ads::GoogleAds::V4::Services::BiddingStrategyOperation.new + def self.campaign_draft(path) + require "google/ads/google_ads/v4/services/campaign_draft_service_pb" + op = Google::Ads::GoogleAds::V4::Services::CampaignDraftOperation.new op["remove"] = path op end - # A convenience method for creating an AdGroupOperation instance with + # A convenience method for creating an UserListOperation instance with # its "remove" field preopulated with a resource path corresponding to the resource to be removed. # # @param path [String] the resource name of the resource to delete. - def self.ad_group(path) - require "google/ads/google_ads/v4/services/ad_group_service_pb" - op = Google::Ads::GoogleAds::V4::Services::AdGroupOperation.new + def self.user_list(path) + require "google/ads/google_ads/v4/services/user_list_service_pb" + op = Google::Ads::GoogleAds::V4::Services::UserListOperation.new op["remove"] = path op end - # A convenience method for creating an AdGroupAdOperation instance with + # A convenience method for creating an CustomerOperation instance with # its "remove" field preopulated with a resource path corresponding to the resource to be removed. # # @param path [String] the resource name of the resource to delete. - def self.ad_group_ad(path) - require "google/ads/google_ads/v4/services/ad_group_ad_service_pb" - op = Google::Ads::GoogleAds::V4::Services::AdGroupAdOperation.new + def self.customer(path) + require "google/ads/google_ads/v4/services/customer_service_pb" + op = Google::Ads::GoogleAds::V4::Services::CustomerOperation.new op["remove"] = path op end - # A convenience method for creating an AdGroupBidModifierOperation instance with + # A convenience method for creating an SharedSetOperation instance with # its "remove" field preopulated with a resource path corresponding to the resource to be removed. # # @param path [String] the resource name of the resource to delete. - def self.ad_group_bid_modifier(path) - require "google/ads/google_ads/v4/services/ad_group_bid_modifier_service_pb" - op = Google::Ads::GoogleAds::V4::Services::AdGroupBidModifierOperation.new + def self.shared_set(path) + require "google/ads/google_ads/v4/services/shared_set_service_pb" + op = Google::Ads::GoogleAds::V4::Services::SharedSetOperation.new op["remove"] = path op end # A convenience method for creating an AdGroupCriterionLabelOperation instance with @@ -3796,10 +3840,54 @@ op = Google::Ads::GoogleAds::V4::Services::AdGroupCriterionLabelOperation.new op["remove"] = path op end + # A convenience method for creating an LabelOperation instance with + # its "remove" field preopulated with a resource path corresponding to the resource to be removed. + # + # @param path [String] the resource name of the resource to delete. + def self.label(path) + require "google/ads/google_ads/v4/services/label_service_pb" + op = Google::Ads::GoogleAds::V4::Services::LabelOperation.new + op["remove"] = path + op + end + + # A convenience method for creating an AdGroupAdLabelOperation instance with + # its "remove" field preopulated with a resource path corresponding to the resource to be removed. + # + # @param path [String] the resource name of the resource to delete. + def self.ad_group_ad_label(path) + require "google/ads/google_ads/v4/services/ad_group_ad_label_service_pb" + op = Google::Ads::GoogleAds::V4::Services::AdGroupAdLabelOperation.new + op["remove"] = path + op + end + + # A convenience method for creating an AdGroupAdOperation instance with + # its "remove" field preopulated with a resource path corresponding to the resource to be removed. + # + # @param path [String] the resource name of the resource to delete. + def self.ad_group_ad(path) + require "google/ads/google_ads/v4/services/ad_group_ad_service_pb" + op = Google::Ads::GoogleAds::V4::Services::AdGroupAdOperation.new + op["remove"] = path + op + end + + # A convenience method for creating an AdGroupBidModifierOperation instance with + # its "remove" field preopulated with a resource path corresponding to the resource to be removed. + # + # @param path [String] the resource name of the resource to delete. + def self.ad_group_bid_modifier(path) + require "google/ads/google_ads/v4/services/ad_group_bid_modifier_service_pb" + op = Google::Ads::GoogleAds::V4::Services::AdGroupBidModifierOperation.new + op["remove"] = path + op + end + # A convenience method for creating an AdGroupCriterionOperation instance with # its "remove" field preopulated with a resource path corresponding to the resource to be removed. # # @param path [String] the resource name of the resource to delete. def self.ad_group_criterion(path) @@ -3873,32 +3961,43 @@ op = Google::Ads::GoogleAds::V4::Services::AssetOperation.new op["remove"] = path op end - # A convenience method for creating an CampaignCriterionOperation instance with + # A convenience method for creating an BiddingStrategyOperation instance with # its "remove" field preopulated with a resource path corresponding to the resource to be removed. # # @param path [String] the resource name of the resource to delete. - def self.campaign_criterion(path) - require "google/ads/google_ads/v4/services/campaign_criterion_service_pb" - op = Google::Ads::GoogleAds::V4::Services::CampaignCriterionOperation.new + def self.bidding_strategy(path) + require "google/ads/google_ads/v4/services/bidding_strategy_service_pb" + op = Google::Ads::GoogleAds::V4::Services::BiddingStrategyOperation.new op["remove"] = path op end - # A convenience method for creating an CampaignDraftOperation instance with + # A convenience method for creating an CampaignBudgetOperation instance with # its "remove" field preopulated with a resource path corresponding to the resource to be removed. # # @param path [String] the resource name of the resource to delete. - def self.campaign_draft(path) - require "google/ads/google_ads/v4/services/campaign_draft_service_pb" - op = Google::Ads::GoogleAds::V4::Services::CampaignDraftOperation.new + def self.campaign_budget(path) + require "google/ads/google_ads/v4/services/campaign_budget_service_pb" + op = Google::Ads::GoogleAds::V4::Services::CampaignBudgetOperation.new op["remove"] = path op end + # A convenience method for creating an CampaignCriterionOperation instance with + # its "remove" field preopulated with a resource path corresponding to the resource to be removed. + # + # @param path [String] the resource name of the resource to delete. + def self.campaign_criterion(path) + require "google/ads/google_ads/v4/services/campaign_criterion_service_pb" + op = Google::Ads::GoogleAds::V4::Services::CampaignCriterionOperation.new + op["remove"] = path + op + end + # A convenience method for creating an CampaignExperimentOperation instance with # its "remove" field preopulated with a resource path corresponding to the resource to be removed. # # @param path [String] the resource name of the resource to delete. def self.campaign_experiment(path) @@ -3939,10 +4038,21 @@ op = Google::Ads::GoogleAds::V4::Services::CampaignLabelOperation.new op["remove"] = path op end + # A convenience method for creating an CampaignOperation instance with + # its "remove" field preopulated with a resource path corresponding to the resource to be removed. + # + # @param path [String] the resource name of the resource to delete. + def self.campaign(path) + require "google/ads/google_ads/v4/services/campaign_service_pb" + op = Google::Ads::GoogleAds::V4::Services::CampaignOperation.new + op["remove"] = path + op + end + # A convenience method for creating an CampaignSharedSetOperation instance with # its "remove" field preopulated with a resource path corresponding to the resource to be removed. # # @param path [String] the resource name of the resource to delete. def self.campaign_shared_set(path) @@ -3994,21 +4104,10 @@ op = Google::Ads::GoogleAds::V4::Services::CustomerLabelOperation.new op["remove"] = path op end - # A convenience method for creating an CustomerNegativeCriterionOperation instance with - # its "remove" field preopulated with a resource path corresponding to the resource to be removed. - # - # @param path [String] the resource name of the resource to delete. - def self.customer_negative_criterion(path) - require "google/ads/google_ads/v4/services/customer_negative_criterion_service_pb" - op = Google::Ads::GoogleAds::V4::Services::CustomerNegativeCriterionOperation.new - op["remove"] = path - op - end - # A convenience method for creating an ExtensionFeedItemOperation instance with # its "remove" field preopulated with a resource path corresponding to the resource to be removed. # # @param path [String] the resource name of the resource to delete. def self.extension_feed_item(path) @@ -4038,21 +4137,10 @@ op = Google::Ads::GoogleAds::V4::Services::FeedItemTargetOperation.new op["remove"] = path op end - # A convenience method for creating an FeedMappingOperation instance with - # its "remove" field preopulated with a resource path corresponding to the resource to be removed. - # - # @param path [String] the resource name of the resource to delete. - def self.feed_mapping(path) - require "google/ads/google_ads/v4/services/feed_mapping_service_pb" - op = Google::Ads::GoogleAds::V4::Services::FeedMappingOperation.new - op["remove"] = path - op - end - # A convenience method for creating an FeedOperation instance with # its "remove" field preopulated with a resource path corresponding to the resource to be removed. # # @param path [String] the resource name of the resource to delete. def self.feed(path) @@ -4060,21 +4148,10 @@ op = Google::Ads::GoogleAds::V4::Services::FeedOperation.new op["remove"] = path op end - # A convenience method for creating an KeywordPlanAdGroupKeywordOperation instance with - # its "remove" field preopulated with a resource path corresponding to the resource to be removed. - # - # @param path [String] the resource name of the resource to delete. - def self.keyword_plan_ad_group_keyword(path) - require "google/ads/google_ads/v4/services/keyword_plan_ad_group_keyword_service_pb" - op = Google::Ads::GoogleAds::V4::Services::KeywordPlanAdGroupKeywordOperation.new - op["remove"] = path - op - end - # A convenience method for creating an KeywordPlanAdGroupOperation instance with # its "remove" field preopulated with a resource path corresponding to the resource to be removed. # # @param path [String] the resource name of the resource to delete. def self.keyword_plan_ad_group(path) @@ -4115,21 +4192,10 @@ op = Google::Ads::GoogleAds::V4::Services::KeywordPlanOperation.new op["remove"] = path op end - # A convenience method for creating an LabelOperation instance with - # its "remove" field preopulated with a resource path corresponding to the resource to be removed. - # - # @param path [String] the resource name of the resource to delete. - def self.label(path) - require "google/ads/google_ads/v4/services/label_service_pb" - op = Google::Ads::GoogleAds::V4::Services::LabelOperation.new - op["remove"] = path - op - end - # A convenience method for creating an MediaFileOperation instance with # its "remove" field preopulated with a resource path corresponding to the resource to be removed. # # @param path [String] the resource name of the resource to delete. def self.media_file(path) @@ -4148,43 +4214,10 @@ op = Google::Ads::GoogleAds::V4::Services::RemarketingActionOperation.new op["remove"] = path op end - # A convenience method for creating an SharedCriterionOperation instance with - # its "remove" field preopulated with a resource path corresponding to the resource to be removed. - # - # @param path [String] the resource name of the resource to delete. - def self.shared_criterion(path) - require "google/ads/google_ads/v4/services/shared_criterion_service_pb" - op = Google::Ads::GoogleAds::V4::Services::SharedCriterionOperation.new - op["remove"] = path - op - end - - # A convenience method for creating an SharedSetOperation instance with - # its "remove" field preopulated with a resource path corresponding to the resource to be removed. - # - # @param path [String] the resource name of the resource to delete. - def self.shared_set(path) - require "google/ads/google_ads/v4/services/shared_set_service_pb" - op = Google::Ads::GoogleAds::V4::Services::SharedSetOperation.new - op["remove"] = path - op - end - - # A convenience method for creating an UserListOperation instance with - # its "remove" field preopulated with a resource path corresponding to the resource to be removed. - # - # @param path [String] the resource name of the resource to delete. - def self.user_list(path) - require "google/ads/google_ads/v4/services/user_list_service_pb" - op = Google::Ads::GoogleAds::V4::Services::UserListOperation.new - op["remove"] = path - op - end - # A convenience method for creating an MutateOperation instance with # its "remove" field preopulated with a resource path corresponding to the resource to be removed. # # @param path [String] the resource name of the resource to delete. def self.mutate(path) @@ -4214,43 +4247,10 @@ op = Google::Ads::GoogleAds::V4::Services::OfflineUserDataJobOperation.new op["remove"] = path op end - # A convenience method for creating an CustomInterestOperation instance with - # its "remove" field preopulated with a resource path corresponding to the resource to be removed. - # - # @param path [String] the resource name of the resource to delete. - def self.custom_interest(path) - require "google/ads/google_ads/v4/services/custom_interest_service_pb" - op = Google::Ads::GoogleAds::V4::Services::CustomInterestOperation.new - op["remove"] = path - op - end - - # A convenience method for creating an MerchantCenterLinkOperation instance with - # its "remove" field preopulated with a resource path corresponding to the resource to be removed. - # - # @param path [String] the resource name of the resource to delete. - def self.merchant_center_link(path) - require "google/ads/google_ads/v4/services/merchant_center_link_service_pb" - op = Google::Ads::GoogleAds::V4::Services::MerchantCenterLinkOperation.new - op["remove"] = path - op - end - - # A convenience method for creating an CustomerClientLinkOperation instance with - # its "remove" field preopulated with a resource path corresponding to the resource to be removed. - # - # @param path [String] the resource name of the resource to delete. - def self.customer_client_link(path) - require "google/ads/google_ads/v4/services/customer_client_link_service_pb" - op = Google::Ads::GoogleAds::V4::Services::CustomerClientLinkOperation.new - op["remove"] = path - op - end - # A convenience method for creating an UserDataOperation instance with # its "remove" field preopulated with a resource path corresponding to the resource to be removed. # # @param path [String] the resource name of the resource to delete. def self.user_data(path) @@ -4258,17 +4258,17 @@ op = Google::Ads::GoogleAds::V4::Services::UserDataOperation.new op["remove"] = path op end - # A convenience method for creating an CustomerManagerLinkOperation instance with + # A convenience method for creating an AccountBudgetProposalOperation instance with # its "remove" field preopulated with a resource path corresponding to the resource to be removed. # # @param path [String] the resource name of the resource to delete. - def self.customer_manager_link(path) - require "google/ads/google_ads/v4/services/customer_manager_link_service_pb" - op = Google::Ads::GoogleAds::V4::Services::CustomerManagerLinkOperation.new + def self.account_budget_proposal(path) + require "google/ads/google_ads/v4/services/account_budget_proposal_service_pb" + op = Google::Ads::GoogleAds::V4::Services::AccountBudgetProposalOperation.new op["remove"] = path op end # A convenience method for creating an ApplyRecommendationOperation instance with @@ -4291,38 +4291,38 @@ op = Google::Ads::GoogleAds::V4::Services::DismissRecommendationRequest::DismissRecommendationOperation.new op["remove"] = path op end - # A convenience method for creating an BillingSetupOperation instance with + # A convenience method for creating an AccountLinkOperation instance with # its "remove" field preopulated with a resource path corresponding to the resource to be removed. # # @param path [String] the resource name of the resource to delete. - def self.billing_setup(path) - require "google/ads/google_ads/v4/services/billing_setup_service_pb" - op = Google::Ads::GoogleAds::V4::Services::BillingSetupOperation.new + def self.account_link(path) + require "google/ads/google_ads/v4/services/account_link_service_pb" + op = Google::Ads::GoogleAds::V4::Services::AccountLinkOperation.new op["remove"] = path op end - # A convenience method for creating an AccountLinkOperation instance with + # A convenience method for creating an MerchantCenterLinkOperation instance with # its "remove" field preopulated with a resource path corresponding to the resource to be removed. # # @param path [String] the resource name of the resource to delete. - def self.account_link(path) - require "google/ads/google_ads/v4/services/account_link_service_pb" - op = Google::Ads::GoogleAds::V4::Services::AccountLinkOperation.new + def self.merchant_center_link(path) + require "google/ads/google_ads/v4/services/merchant_center_link_service_pb" + op = Google::Ads::GoogleAds::V4::Services::MerchantCenterLinkOperation.new op["remove"] = path op end - # A convenience method for creating an AccountBudgetProposalOperation instance with + # A convenience method for creating an BillingSetupOperation instance with # its "remove" field preopulated with a resource path corresponding to the resource to be removed. # # @param path [String] the resource name of the resource to delete. - def self.account_budget_proposal(path) - require "google/ads/google_ads/v4/services/account_budget_proposal_service_pb" - op = Google::Ads::GoogleAds::V4::Services::AccountBudgetProposalOperation.new + def self.billing_setup(path) + require "google/ads/google_ads/v4/services/billing_setup_service_pb" + op = Google::Ads::GoogleAds::V4::Services::BillingSetupOperation.new op["remove"] = path op end end end