google-ads-googleads 2.1.1 → 2.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/ChangeLog +2 -0
- data/lib/google/ads/google_ads/factories/v1/enums.rb +72 -0
- data/lib/google/ads/google_ads/factories/v1/operations.rb +125 -0
- data/lib/google/ads/google_ads/factories/v1/resources.rb +190 -86
- data/lib/google/ads/google_ads/factories/v1/services.rb +72 -0
- data/lib/google/ads/google_ads/google_ads_client.rb +12 -5
- data/lib/google/ads/google_ads/lookup_util.rb +1 -1
- data/lib/google/ads/google_ads/utils/v1/path_lookup_util.rb +14 -0
- data/lib/google/ads/google_ads/utils/v1/proto_lookup_util.rb +13 -0
- data/lib/google/ads/google_ads/v1/common/ad_type_infos_pb.rb +4 -0
- data/lib/google/ads/google_ads/v1/common/segments_pb.rb +4 -0
- data/lib/google/ads/google_ads/v1/common/simulation_pb.rb +16 -0
- data/lib/google/ads/google_ads/v1/enums/ad_group_type_pb.rb +1 -0
- data/lib/google/ads/google_ads/v1/enums/ad_type_pb.rb +1 -0
- data/lib/google/ads/google_ads/v1/enums/advertising_channel_sub_type_pb.rb +1 -0
- data/lib/google/ads/google_ads/v1/enums/bidding_strategy_type_pb.rb +1 -0
- data/lib/google/ads/google_ads/v1/enums/campaign_criterion_status_pb.rb +22 -0
- data/lib/google/ads/google_ads/v1/enums/campaign_draft_status_pb.rb +24 -0
- data/lib/google/ads/google_ads/v1/enums/campaign_experiment_status_pb.rb +28 -0
- data/lib/google/ads/google_ads/v1/enums/campaign_experiment_traffic_split_type_pb.rb +21 -0
- data/lib/google/ads/google_ads/v1/enums/click_type_pb.rb +1 -0
- data/lib/google/ads/google_ads/v1/enums/device_pb.rb +1 -0
- data/lib/google/ads/google_ads/v1/enums/google_ads_field_data_type_pb.rb +1 -0
- data/lib/google/ads/google_ads/v1/enums/hotel_rate_type_pb.rb +23 -0
- data/lib/google/ads/google_ads/v1/errors/bidding_error_pb.rb +1 -0
- data/lib/google/ads/google_ads/v1/errors/campaign_draft_error_pb.rb +29 -0
- data/lib/google/ads/google_ads/v1/errors/campaign_error_pb.rb +2 -0
- data/lib/google/ads/google_ads/v1/errors/campaign_experiment_error_pb.rb +29 -0
- data/lib/google/ads/google_ads/v1/errors/errors_pb.rb +8 -0
- data/lib/google/ads/google_ads/v1/errors/feed_error_pb.rb +1 -0
- data/lib/google/ads/google_ads/v1/errors/manager_link_error_pb.rb +33 -0
- data/lib/google/ads/google_ads/v1/errors/not_whitelisted_error_pb.rb +20 -0
- data/lib/google/ads/google_ads/v1/errors/url_field_error_pb.rb +1 -0
- data/lib/google/ads/google_ads/v1/resources/ad_group_pb.rb +1 -0
- data/lib/google/ads/google_ads/v1/resources/ad_group_simulation_pb.rb +1 -0
- data/lib/google/ads/google_ads/v1/resources/ad_pb.rb +1 -0
- data/lib/google/ads/google_ads/v1/resources/campaign_criterion_pb.rb +2 -0
- data/lib/google/ads/google_ads/v1/resources/campaign_draft_pb.rb +24 -0
- data/lib/google/ads/google_ads/v1/resources/campaign_experiment_pb.rb +29 -0
- data/lib/google/ads/google_ads/v1/resources/campaign_pb.rb +21 -20
- data/lib/google/ads/google_ads/v1/resources/extension_feed_item_pb.rb +5 -0
- data/lib/google/ads/google_ads/v1/resources/recommendation_pb.rb +21 -21
- data/lib/google/ads/google_ads/v1/services/asset_service_client.rb +3 -1
- data/lib/google/ads/google_ads/v1/services/asset_service_services_pb.rb +3 -1
- data/lib/google/ads/google_ads/v1/services/campaign_draft_service_client.rb +439 -0
- data/lib/google/ads/google_ads/v1/services/campaign_draft_service_client_config.json +46 -0
- data/lib/google/ads/google_ads/v1/services/campaign_draft_service_pb.rb +60 -0
- data/lib/google/ads/google_ads/v1/services/campaign_draft_service_services_pb.rb +59 -0
- data/lib/google/ads/google_ads/v1/services/campaign_experiment_service_client.rb +616 -0
- data/lib/google/ads/google_ads/v1/services/campaign_experiment_service_client_config.json +61 -0
- data/lib/google/ads/google_ads/v1/services/campaign_experiment_service_pb.rb +83 -0
- data/lib/google/ads/google_ads/v1/services/campaign_experiment_service_services_pb.rb +82 -0
- data/lib/google/ads/google_ads/v1/services/conversion_adjustment_upload_service_client.rb +6 -1
- data/lib/google/ads/google_ads/v1/services/conversion_adjustment_upload_service_pb.rb +1 -0
- data/lib/google/ads/google_ads/v1/services/conversion_upload_service_client.rb +12 -2
- data/lib/google/ads/google_ads/v1/services/conversion_upload_service_pb.rb +2 -0
- data/lib/google/ads/google_ads/v1/services/google_ads_service_pb.rb +10 -0
- data/lib/google/ads/google_ads/version.rb +1 -1
- metadata +21 -2
@@ -45,6 +45,7 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
|
|
45
45
|
optional :targeting_setting, :message, 43, "google.ads.googleads.v1.common.TargetingSetting"
|
46
46
|
optional :geo_target_type_setting, :message, 47, "google.ads.googleads.v1.resources.Campaign.GeoTargetTypeSetting"
|
47
47
|
optional :app_campaign_setting, :message, 51, "google.ads.googleads.v1.resources.Campaign.AppCampaignSetting"
|
48
|
+
repeated :labels, :message, 53, "google.protobuf.StringValue"
|
48
49
|
optional :experiment_type, :enum, 17, "google.ads.googleads.v1.enums.CampaignExperimentTypeEnum.CampaignExperimentType"
|
49
50
|
optional :base_campaign, :message, 28, "google.protobuf.StringValue"
|
50
51
|
optional :campaign_budget, :message, 6, "google.protobuf.StringValue"
|
@@ -83,48 +84,48 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
|
|
83
84
|
add_message "google.ads.googleads.v1.resources.Campaign.HotelSettingInfo" do
|
84
85
|
optional :hotel_center_id, :message, 1, "google.protobuf.Int64Value"
|
85
86
|
end
|
87
|
+
add_message "google.ads.googleads.v1.resources.Campaign.VanityPharma" do
|
88
|
+
optional :vanity_pharma_display_url_mode, :enum, 1, "google.ads.googleads.v1.enums.VanityPharmaDisplayUrlModeEnum.VanityPharmaDisplayUrlMode"
|
89
|
+
optional :vanity_pharma_text, :enum, 2, "google.ads.googleads.v1.enums.VanityPharmaTextEnum.VanityPharmaText"
|
90
|
+
end
|
91
|
+
add_message "google.ads.googleads.v1.resources.Campaign.DynamicSearchAdsSetting" do
|
92
|
+
optional :domain_name, :message, 1, "google.protobuf.StringValue"
|
93
|
+
optional :language_code, :message, 2, "google.protobuf.StringValue"
|
94
|
+
optional :use_supplied_urls_only, :message, 3, "google.protobuf.BoolValue"
|
95
|
+
repeated :feeds, :message, 5, "google.protobuf.StringValue"
|
96
|
+
end
|
86
97
|
add_message "google.ads.googleads.v1.resources.Campaign.ShoppingSetting" do
|
87
98
|
optional :merchant_id, :message, 1, "google.protobuf.Int64Value"
|
88
99
|
optional :sales_country, :message, 2, "google.protobuf.StringValue"
|
89
100
|
optional :campaign_priority, :message, 3, "google.protobuf.Int32Value"
|
90
101
|
optional :enable_local, :message, 4, "google.protobuf.BoolValue"
|
91
102
|
end
|
103
|
+
add_message "google.ads.googleads.v1.resources.Campaign.TrackingSetting" do
|
104
|
+
optional :tracking_url, :message, 1, "google.protobuf.StringValue"
|
105
|
+
end
|
106
|
+
add_message "google.ads.googleads.v1.resources.Campaign.SelectiveOptimization" do
|
107
|
+
repeated :conversion_actions, :message, 1, "google.protobuf.StringValue"
|
108
|
+
end
|
92
109
|
add_message "google.ads.googleads.v1.resources.Campaign.AppCampaignSetting" do
|
93
110
|
optional :bidding_strategy_goal_type, :enum, 1, "google.ads.googleads.v1.enums.AppCampaignBiddingStrategyGoalTypeEnum.AppCampaignBiddingStrategyGoalType"
|
94
111
|
optional :app_id, :message, 2, "google.protobuf.StringValue"
|
95
112
|
optional :app_store, :enum, 3, "google.ads.googleads.v1.enums.AppCampaignAppStoreEnum.AppCampaignAppStore"
|
96
113
|
end
|
97
|
-
add_message "google.ads.googleads.v1.resources.Campaign.DynamicSearchAdsSetting" do
|
98
|
-
optional :domain_name, :message, 1, "google.protobuf.StringValue"
|
99
|
-
optional :language_code, :message, 2, "google.protobuf.StringValue"
|
100
|
-
optional :use_supplied_urls_only, :message, 3, "google.protobuf.BoolValue"
|
101
|
-
repeated :feeds, :message, 5, "google.protobuf.StringValue"
|
102
|
-
end
|
103
|
-
add_message "google.ads.googleads.v1.resources.Campaign.TrackingSetting" do
|
104
|
-
optional :tracking_url, :message, 1, "google.protobuf.StringValue"
|
105
|
-
end
|
106
114
|
add_message "google.ads.googleads.v1.resources.Campaign.GeoTargetTypeSetting" do
|
107
115
|
optional :positive_geo_target_type, :enum, 1, "google.ads.googleads.v1.enums.PositiveGeoTargetTypeEnum.PositiveGeoTargetType"
|
108
116
|
optional :negative_geo_target_type, :enum, 2, "google.ads.googleads.v1.enums.NegativeGeoTargetTypeEnum.NegativeGeoTargetType"
|
109
117
|
end
|
110
|
-
add_message "google.ads.googleads.v1.resources.Campaign.VanityPharma" do
|
111
|
-
optional :vanity_pharma_display_url_mode, :enum, 1, "google.ads.googleads.v1.enums.VanityPharmaDisplayUrlModeEnum.VanityPharmaDisplayUrlMode"
|
112
|
-
optional :vanity_pharma_text, :enum, 2, "google.ads.googleads.v1.enums.VanityPharmaTextEnum.VanityPharmaText"
|
113
|
-
end
|
114
|
-
add_message "google.ads.googleads.v1.resources.Campaign.SelectiveOptimization" do
|
115
|
-
repeated :conversion_actions, :message, 1, "google.protobuf.StringValue"
|
116
|
-
end
|
117
118
|
end
|
118
119
|
|
119
120
|
module Google::Ads::GoogleAds::V1::Resources
|
120
121
|
Campaign = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v1.resources.Campaign").msgclass
|
121
122
|
Campaign::NetworkSettings = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v1.resources.Campaign.NetworkSettings").msgclass
|
122
123
|
Campaign::HotelSettingInfo = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v1.resources.Campaign.HotelSettingInfo").msgclass
|
123
|
-
Campaign::
|
124
|
-
Campaign::AppCampaignSetting = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v1.resources.Campaign.AppCampaignSetting").msgclass
|
124
|
+
Campaign::VanityPharma = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v1.resources.Campaign.VanityPharma").msgclass
|
125
125
|
Campaign::DynamicSearchAdsSetting = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v1.resources.Campaign.DynamicSearchAdsSetting").msgclass
|
126
|
+
Campaign::ShoppingSetting = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v1.resources.Campaign.ShoppingSetting").msgclass
|
126
127
|
Campaign::TrackingSetting = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v1.resources.Campaign.TrackingSetting").msgclass
|
127
|
-
Campaign::GeoTargetTypeSetting = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v1.resources.Campaign.GeoTargetTypeSetting").msgclass
|
128
|
-
Campaign::VanityPharma = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v1.resources.Campaign.VanityPharma").msgclass
|
129
128
|
Campaign::SelectiveOptimization = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v1.resources.Campaign.SelectiveOptimization").msgclass
|
129
|
+
Campaign::AppCampaignSetting = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v1.resources.Campaign.AppCampaignSetting").msgclass
|
130
|
+
Campaign::GeoTargetTypeSetting = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v1.resources.Campaign.GeoTargetTypeSetting").msgclass
|
130
131
|
end
|
@@ -18,6 +18,7 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
|
|
18
18
|
optional :end_date_time, :message, 6, "google.protobuf.StringValue"
|
19
19
|
repeated :ad_schedules, :message, 16, "google.ads.googleads.v1.common.AdScheduleInfo"
|
20
20
|
optional :device, :enum, 17, "google.ads.googleads.v1.enums.FeedItemTargetDeviceEnum.FeedItemTargetDevice"
|
21
|
+
optional :targeted_geo_target_constant, :message, 20, "google.protobuf.StringValue"
|
21
22
|
optional :status, :enum, 4, "google.ads.googleads.v1.enums.FeedItemStatusEnum.FeedItemStatus"
|
22
23
|
oneof :extension do
|
23
24
|
optional :sitelink_feed_item, :message, 2, "google.ads.googleads.v1.common.SitelinkFeedItem"
|
@@ -31,6 +32,10 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
|
|
31
32
|
optional :location_feed_item, :message, 14, "google.ads.googleads.v1.common.LocationFeedItem"
|
32
33
|
optional :affiliate_location_feed_item, :message, 15, "google.ads.googleads.v1.common.AffiliateLocationFeedItem"
|
33
34
|
end
|
35
|
+
oneof :serving_resource_targeting do
|
36
|
+
optional :targeted_campaign, :message, 18, "google.protobuf.StringValue"
|
37
|
+
optional :targeted_ad_group, :message, 19, "google.protobuf.StringValue"
|
38
|
+
end
|
34
39
|
end
|
35
40
|
end
|
36
41
|
|
@@ -61,11 +61,23 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
|
|
61
61
|
optional :keyword, :message, 1, "google.ads.googleads.v1.common.KeywordInfo"
|
62
62
|
optional :recommended_cpc_bid_micros, :message, 2, "google.protobuf.Int64Value"
|
63
63
|
end
|
64
|
+
add_message "google.ads.googleads.v1.resources.Recommendation.KeywordMatchTypeRecommendation" do
|
65
|
+
optional :keyword, :message, 1, "google.ads.googleads.v1.common.KeywordInfo"
|
66
|
+
optional :recommended_match_type, :enum, 2, "google.ads.googleads.v1.enums.KeywordMatchTypeEnum.KeywordMatchType"
|
67
|
+
end
|
64
68
|
add_message "google.ads.googleads.v1.resources.Recommendation.TextAdRecommendation" do
|
65
69
|
optional :ad, :message, 1, "google.ads.googleads.v1.resources.Ad"
|
66
70
|
optional :creation_date, :message, 2, "google.protobuf.StringValue"
|
67
71
|
optional :auto_apply_date, :message, 3, "google.protobuf.StringValue"
|
68
72
|
end
|
73
|
+
add_message "google.ads.googleads.v1.resources.Recommendation.SearchPartnersOptInRecommendation" do
|
74
|
+
end
|
75
|
+
add_message "google.ads.googleads.v1.resources.Recommendation.MaximizeClicksOptInRecommendation" do
|
76
|
+
optional :recommended_budget_amount_micros, :message, 1, "google.protobuf.Int64Value"
|
77
|
+
end
|
78
|
+
add_message "google.ads.googleads.v1.resources.Recommendation.CalloutExtensionRecommendation" do
|
79
|
+
repeated :recommended_extensions, :message, 1, "google.ads.googleads.v1.common.CalloutFeedItem"
|
80
|
+
end
|
69
81
|
add_message "google.ads.googleads.v1.resources.Recommendation.TargetCpaOptInRecommendation" do
|
70
82
|
repeated :options, :message, 1, "google.ads.googleads.v1.resources.Recommendation.TargetCpaOptInRecommendation.TargetCpaOptInRecommendationOption"
|
71
83
|
optional :recommended_target_cpa_micros, :message, 2, "google.protobuf.Int64Value"
|
@@ -76,27 +88,11 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
|
|
76
88
|
optional :required_campaign_budget_amount_micros, :message, 3, "google.protobuf.Int64Value"
|
77
89
|
optional :impact, :message, 4, "google.ads.googleads.v1.resources.Recommendation.RecommendationImpact"
|
78
90
|
end
|
79
|
-
add_message "google.ads.googleads.v1.resources.Recommendation.CalloutExtensionRecommendation" do
|
80
|
-
repeated :recommended_extensions, :message, 1, "google.ads.googleads.v1.common.CalloutFeedItem"
|
81
|
-
end
|
82
91
|
add_message "google.ads.googleads.v1.resources.Recommendation.MaximizeConversionsOptInRecommendation" do
|
83
92
|
optional :recommended_budget_amount_micros, :message, 1, "google.protobuf.Int64Value"
|
84
93
|
end
|
85
|
-
add_message "google.ads.googleads.v1.resources.Recommendation.KeywordMatchTypeRecommendation" do
|
86
|
-
optional :keyword, :message, 1, "google.ads.googleads.v1.common.KeywordInfo"
|
87
|
-
optional :recommended_match_type, :enum, 2, "google.ads.googleads.v1.enums.KeywordMatchTypeEnum.KeywordMatchType"
|
88
|
-
end
|
89
94
|
add_message "google.ads.googleads.v1.resources.Recommendation.EnhancedCpcOptInRecommendation" do
|
90
95
|
end
|
91
|
-
add_message "google.ads.googleads.v1.resources.Recommendation.SearchPartnersOptInRecommendation" do
|
92
|
-
end
|
93
|
-
add_message "google.ads.googleads.v1.resources.Recommendation.MaximizeClicksOptInRecommendation" do
|
94
|
-
optional :recommended_budget_amount_micros, :message, 1, "google.protobuf.Int64Value"
|
95
|
-
end
|
96
|
-
add_message "google.ads.googleads.v1.resources.Recommendation.MoveUnusedBudgetRecommendation" do
|
97
|
-
optional :excess_campaign_budget, :message, 1, "google.protobuf.StringValue"
|
98
|
-
optional :budget_recommendation, :message, 2, "google.ads.googleads.v1.resources.Recommendation.CampaignBudgetRecommendation"
|
99
|
-
end
|
100
96
|
add_message "google.ads.googleads.v1.resources.Recommendation.OptimizeAdRotationRecommendation" do
|
101
97
|
end
|
102
98
|
add_message "google.ads.googleads.v1.resources.Recommendation.SitelinkExtensionRecommendation" do
|
@@ -105,6 +101,10 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
|
|
105
101
|
add_message "google.ads.googleads.v1.resources.Recommendation.CallExtensionRecommendation" do
|
106
102
|
repeated :recommended_extensions, :message, 1, "google.ads.googleads.v1.common.CallFeedItem"
|
107
103
|
end
|
104
|
+
add_message "google.ads.googleads.v1.resources.Recommendation.MoveUnusedBudgetRecommendation" do
|
105
|
+
optional :excess_campaign_budget, :message, 1, "google.protobuf.StringValue"
|
106
|
+
optional :budget_recommendation, :message, 2, "google.ads.googleads.v1.resources.Recommendation.CampaignBudgetRecommendation"
|
107
|
+
end
|
108
108
|
end
|
109
109
|
|
110
110
|
module Google::Ads::GoogleAds::V1::Resources
|
@@ -114,17 +114,17 @@ module Google::Ads::GoogleAds::V1::Resources
|
|
114
114
|
Recommendation::CampaignBudgetRecommendation = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v1.resources.Recommendation.CampaignBudgetRecommendation").msgclass
|
115
115
|
Recommendation::CampaignBudgetRecommendation::CampaignBudgetRecommendationOption = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v1.resources.Recommendation.CampaignBudgetRecommendation.CampaignBudgetRecommendationOption").msgclass
|
116
116
|
Recommendation::KeywordRecommendation = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v1.resources.Recommendation.KeywordRecommendation").msgclass
|
117
|
+
Recommendation::KeywordMatchTypeRecommendation = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v1.resources.Recommendation.KeywordMatchTypeRecommendation").msgclass
|
117
118
|
Recommendation::TextAdRecommendation = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v1.resources.Recommendation.TextAdRecommendation").msgclass
|
119
|
+
Recommendation::SearchPartnersOptInRecommendation = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v1.resources.Recommendation.SearchPartnersOptInRecommendation").msgclass
|
120
|
+
Recommendation::MaximizeClicksOptInRecommendation = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v1.resources.Recommendation.MaximizeClicksOptInRecommendation").msgclass
|
121
|
+
Recommendation::CalloutExtensionRecommendation = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v1.resources.Recommendation.CalloutExtensionRecommendation").msgclass
|
118
122
|
Recommendation::TargetCpaOptInRecommendation = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v1.resources.Recommendation.TargetCpaOptInRecommendation").msgclass
|
119
123
|
Recommendation::TargetCpaOptInRecommendation::TargetCpaOptInRecommendationOption = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v1.resources.Recommendation.TargetCpaOptInRecommendation.TargetCpaOptInRecommendationOption").msgclass
|
120
|
-
Recommendation::CalloutExtensionRecommendation = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v1.resources.Recommendation.CalloutExtensionRecommendation").msgclass
|
121
124
|
Recommendation::MaximizeConversionsOptInRecommendation = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v1.resources.Recommendation.MaximizeConversionsOptInRecommendation").msgclass
|
122
|
-
Recommendation::KeywordMatchTypeRecommendation = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v1.resources.Recommendation.KeywordMatchTypeRecommendation").msgclass
|
123
125
|
Recommendation::EnhancedCpcOptInRecommendation = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v1.resources.Recommendation.EnhancedCpcOptInRecommendation").msgclass
|
124
|
-
Recommendation::SearchPartnersOptInRecommendation = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v1.resources.Recommendation.SearchPartnersOptInRecommendation").msgclass
|
125
|
-
Recommendation::MaximizeClicksOptInRecommendation = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v1.resources.Recommendation.MaximizeClicksOptInRecommendation").msgclass
|
126
|
-
Recommendation::MoveUnusedBudgetRecommendation = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v1.resources.Recommendation.MoveUnusedBudgetRecommendation").msgclass
|
127
126
|
Recommendation::OptimizeAdRotationRecommendation = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v1.resources.Recommendation.OptimizeAdRotationRecommendation").msgclass
|
128
127
|
Recommendation::SitelinkExtensionRecommendation = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v1.resources.Recommendation.SitelinkExtensionRecommendation").msgclass
|
129
128
|
Recommendation::CallExtensionRecommendation = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v1.resources.Recommendation.CallExtensionRecommendation").msgclass
|
129
|
+
Recommendation::MoveUnusedBudgetRecommendation = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v1.resources.Recommendation.MoveUnusedBudgetRecommendation").msgclass
|
130
130
|
end
|
@@ -32,7 +32,9 @@ module Google
|
|
32
32
|
module GoogleAds
|
33
33
|
module V1
|
34
34
|
module Services
|
35
|
-
# Service to manage assets.
|
35
|
+
# Service to manage assets. Asset types can be created with AssetService are
|
36
|
+
# YoutubeVideoAsset, MediaBundleAsset and ImageAsset. TextAsset should be
|
37
|
+
# created with Ad inline.
|
36
38
|
#
|
37
39
|
# @!attribute [r] asset_service_stub
|
38
40
|
# @return [Google::Ads::GoogleAds::V1::Services::AssetService::Stub]
|
@@ -24,7 +24,9 @@ module Google::Ads::GoogleAds::V1::Services
|
|
24
24
|
module AssetService
|
25
25
|
# Proto file describing the Asset service.
|
26
26
|
#
|
27
|
-
# Service to manage assets.
|
27
|
+
# Service to manage assets. Asset types can be created with AssetService are
|
28
|
+
# YoutubeVideoAsset, MediaBundleAsset and ImageAsset. TextAsset should be
|
29
|
+
# created with Ad inline.
|
28
30
|
class Service
|
29
31
|
|
30
32
|
include GRPC::GenericService
|
@@ -0,0 +1,439 @@
|
|
1
|
+
# Copyright 2019 Google LLC
|
2
|
+
#
|
3
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
4
|
+
# you may not use this file except in compliance with the License.
|
5
|
+
# You may obtain a copy of the License at
|
6
|
+
#
|
7
|
+
# https://www.apache.org/licenses/LICENSE-2.0
|
8
|
+
#
|
9
|
+
# Unless required by applicable law or agreed to in writing, software
|
10
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
11
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
12
|
+
# See the License for the specific language governing permissions and
|
13
|
+
# limitations under the License.
|
14
|
+
#
|
15
|
+
# EDITING INSTRUCTIONS
|
16
|
+
# This file was generated from the file
|
17
|
+
# https://github.com/googleapis/googleapis/blob/master/google/ads/google_ads/v1/services/campaign_draft_service.proto,
|
18
|
+
# and updates to that file get reflected here through a refresh process.
|
19
|
+
# For the short term, the refresh process will only be runnable by Google
|
20
|
+
# engineers.
|
21
|
+
|
22
|
+
require "json"
|
23
|
+
require "pathname"
|
24
|
+
|
25
|
+
require "google/gax"
|
26
|
+
require "google/gax/operation"
|
27
|
+
require "google/longrunning/operations_client"
|
28
|
+
|
29
|
+
require "google/ads/google_ads/v1/services/campaign_draft_service_pb"
|
30
|
+
require "google/ads/google_ads/v1/services/credentials"
|
31
|
+
|
32
|
+
module Google
|
33
|
+
module Ads
|
34
|
+
module GoogleAds
|
35
|
+
module V1
|
36
|
+
module Services
|
37
|
+
# Service to manage campaign drafts.
|
38
|
+
#
|
39
|
+
# @!attribute [r] campaign_draft_service_stub
|
40
|
+
# @return [Google::Ads::GoogleAds::V1::Services::CampaignDraftService::Stub]
|
41
|
+
class CampaignDraftServiceClient
|
42
|
+
attr_reader :campaign_draft_service_stub
|
43
|
+
|
44
|
+
# The default address of the service.
|
45
|
+
SERVICE_ADDRESS = "googleads.googleapis.com".freeze
|
46
|
+
|
47
|
+
# The default port of the service.
|
48
|
+
DEFAULT_SERVICE_PORT = 443
|
49
|
+
|
50
|
+
# The default set of gRPC interceptors.
|
51
|
+
GRPC_INTERCEPTORS = []
|
52
|
+
|
53
|
+
DEFAULT_TIMEOUT = 30
|
54
|
+
|
55
|
+
PAGE_DESCRIPTORS = {
|
56
|
+
"list_campaign_draft_async_errors" => Google::Gax::PageDescriptor.new(
|
57
|
+
"page_token",
|
58
|
+
"next_page_token",
|
59
|
+
"errors")
|
60
|
+
}.freeze
|
61
|
+
|
62
|
+
private_constant :PAGE_DESCRIPTORS
|
63
|
+
|
64
|
+
# The scopes needed to make gRPC calls to all of the methods defined in
|
65
|
+
# this service.
|
66
|
+
ALL_SCOPES = [
|
67
|
+
].freeze
|
68
|
+
|
69
|
+
class OperationsClient < Google::Longrunning::OperationsClient
|
70
|
+
self::SERVICE_ADDRESS = CampaignDraftServiceClient::SERVICE_ADDRESS
|
71
|
+
self::GRPC_INTERCEPTORS = CampaignDraftServiceClient::GRPC_INTERCEPTORS
|
72
|
+
end
|
73
|
+
|
74
|
+
CAMPAIGN_DRAFT_PATH_TEMPLATE = Google::Gax::PathTemplate.new(
|
75
|
+
"customers/{customer}/campaignDrafts/{campaign_draft}"
|
76
|
+
)
|
77
|
+
|
78
|
+
private_constant :CAMPAIGN_DRAFT_PATH_TEMPLATE
|
79
|
+
|
80
|
+
# Returns a fully-qualified campaign_draft resource name string.
|
81
|
+
# @param customer [String]
|
82
|
+
# @param campaign_draft [String]
|
83
|
+
# @return [String]
|
84
|
+
def self.campaign_draft_path customer, campaign_draft
|
85
|
+
CAMPAIGN_DRAFT_PATH_TEMPLATE.render(
|
86
|
+
:"customer" => customer,
|
87
|
+
:"campaign_draft" => campaign_draft
|
88
|
+
)
|
89
|
+
end
|
90
|
+
|
91
|
+
# @param credentials [Google::Auth::Credentials, String, Hash, GRPC::Core::Channel, GRPC::Core::ChannelCredentials, Proc]
|
92
|
+
# Provides the means for authenticating requests made by the client. This parameter can
|
93
|
+
# be many types.
|
94
|
+
# A `Google::Auth::Credentials` uses a the properties of its represented keyfile for
|
95
|
+
# authenticating requests made by this client.
|
96
|
+
# A `String` will be treated as the path to the keyfile to be used for the construction of
|
97
|
+
# credentials for this client.
|
98
|
+
# A `Hash` will be treated as the contents of a keyfile to be used for the construction of
|
99
|
+
# credentials for this client.
|
100
|
+
# A `GRPC::Core::Channel` will be used to make calls through.
|
101
|
+
# A `GRPC::Core::ChannelCredentials` for the setting up the RPC client. The channel credentials
|
102
|
+
# should already be composed with a `GRPC::Core::CallCredentials` object.
|
103
|
+
# A `Proc` will be used as an updater_proc for the Grpc channel. The proc transforms the
|
104
|
+
# metadata for requests, generally, to give OAuth credentials.
|
105
|
+
# @param scopes [Array<String>]
|
106
|
+
# The OAuth scopes for this service. This parameter is ignored if
|
107
|
+
# an updater_proc is supplied.
|
108
|
+
# @param client_config [Hash]
|
109
|
+
# A Hash for call options for each method. See
|
110
|
+
# Google::Gax#construct_settings for the structure of
|
111
|
+
# this data. Falls back to the default config if not specified
|
112
|
+
# or the specified config is missing data points.
|
113
|
+
# @param timeout [Numeric]
|
114
|
+
# The default timeout, in seconds, for calls made through this client.
|
115
|
+
# @param metadata [Hash]
|
116
|
+
# Default metadata to be sent with each request. This can be overridden on a per call basis.
|
117
|
+
# @param exception_transformer [Proc]
|
118
|
+
# An optional proc that intercepts any exceptions raised during an API call to inject
|
119
|
+
# custom error handling.
|
120
|
+
def initialize \
|
121
|
+
credentials: nil,
|
122
|
+
scopes: ALL_SCOPES,
|
123
|
+
client_config: {},
|
124
|
+
timeout: DEFAULT_TIMEOUT,
|
125
|
+
metadata: nil,
|
126
|
+
exception_transformer: nil,
|
127
|
+
lib_name: nil,
|
128
|
+
lib_version: ""
|
129
|
+
# These require statements are intentionally placed here to initialize
|
130
|
+
# the gRPC module only when it's required.
|
131
|
+
# See https://github.com/googleapis/toolkit/issues/446
|
132
|
+
require "google/gax/grpc"
|
133
|
+
require "google/ads/google_ads/v1/services/campaign_draft_service_services_pb"
|
134
|
+
|
135
|
+
credentials ||= Google::Ads::GoogleAds::V1::Services::Credentials.default
|
136
|
+
|
137
|
+
@operations_client = OperationsClient.new(
|
138
|
+
credentials: credentials,
|
139
|
+
scopes: scopes,
|
140
|
+
client_config: client_config,
|
141
|
+
timeout: timeout,
|
142
|
+
lib_name: lib_name,
|
143
|
+
lib_version: lib_version,
|
144
|
+
)
|
145
|
+
|
146
|
+
if credentials.is_a?(String) || credentials.is_a?(Hash)
|
147
|
+
updater_proc = Google::Ads::GoogleAds::V1::Services::Credentials.new(credentials).updater_proc
|
148
|
+
end
|
149
|
+
if credentials.is_a?(GRPC::Core::Channel)
|
150
|
+
channel = credentials
|
151
|
+
end
|
152
|
+
if credentials.is_a?(GRPC::Core::ChannelCredentials)
|
153
|
+
chan_creds = credentials
|
154
|
+
end
|
155
|
+
if credentials.is_a?(Proc)
|
156
|
+
updater_proc = credentials
|
157
|
+
end
|
158
|
+
if credentials.is_a?(Google::Auth::Credentials)
|
159
|
+
updater_proc = credentials.updater_proc
|
160
|
+
end
|
161
|
+
|
162
|
+
package_version = Gem.loaded_specs['google-ads-googleads'].version.version
|
163
|
+
|
164
|
+
google_api_client = "gl-ruby/#{RUBY_VERSION}"
|
165
|
+
google_api_client << " #{lib_name}/#{lib_version}" if lib_name
|
166
|
+
google_api_client << " gapic/#{package_version} gax/#{Google::Gax::VERSION}"
|
167
|
+
google_api_client << " grpc/#{GRPC::VERSION}"
|
168
|
+
google_api_client.freeze
|
169
|
+
|
170
|
+
headers = { :"x-goog-api-client" => google_api_client }
|
171
|
+
headers.merge!(metadata) unless metadata.nil?
|
172
|
+
client_config_file = Pathname.new(__dir__).join(
|
173
|
+
"campaign_draft_service_client_config.json"
|
174
|
+
)
|
175
|
+
defaults = client_config_file.open do |f|
|
176
|
+
Google::Gax.construct_settings(
|
177
|
+
"google.ads.googleads.v1.services.CampaignDraftService",
|
178
|
+
JSON.parse(f.read),
|
179
|
+
client_config,
|
180
|
+
Google::Gax::Grpc::STATUS_CODE_NAMES,
|
181
|
+
timeout,
|
182
|
+
page_descriptors: PAGE_DESCRIPTORS,
|
183
|
+
errors: Google::Gax::Grpc::API_ERRORS,
|
184
|
+
metadata: headers
|
185
|
+
)
|
186
|
+
end
|
187
|
+
|
188
|
+
# Allow overriding the service path/port in subclasses.
|
189
|
+
service_path = self.class::SERVICE_ADDRESS
|
190
|
+
port = self.class::DEFAULT_SERVICE_PORT
|
191
|
+
interceptors = self.class::GRPC_INTERCEPTORS
|
192
|
+
@campaign_draft_service_stub = Google::Gax::Grpc.create_stub(
|
193
|
+
service_path,
|
194
|
+
port,
|
195
|
+
chan_creds: chan_creds,
|
196
|
+
channel: channel,
|
197
|
+
updater_proc: updater_proc,
|
198
|
+
scopes: scopes,
|
199
|
+
interceptors: interceptors,
|
200
|
+
&Google::Ads::GoogleAds::V1::Services::CampaignDraftService::Stub.method(:new)
|
201
|
+
)
|
202
|
+
|
203
|
+
@get_campaign_draft = Google::Gax.create_api_call(
|
204
|
+
@campaign_draft_service_stub.method(:get_campaign_draft),
|
205
|
+
defaults["get_campaign_draft"],
|
206
|
+
exception_transformer: exception_transformer
|
207
|
+
)
|
208
|
+
@mutate_campaign_drafts = Google::Gax.create_api_call(
|
209
|
+
@campaign_draft_service_stub.method(:mutate_campaign_drafts),
|
210
|
+
defaults["mutate_campaign_drafts"],
|
211
|
+
exception_transformer: exception_transformer
|
212
|
+
)
|
213
|
+
@promote_campaign_draft = Google::Gax.create_api_call(
|
214
|
+
@campaign_draft_service_stub.method(:promote_campaign_draft),
|
215
|
+
defaults["promote_campaign_draft"],
|
216
|
+
exception_transformer: exception_transformer
|
217
|
+
)
|
218
|
+
@list_campaign_draft_async_errors = Google::Gax.create_api_call(
|
219
|
+
@campaign_draft_service_stub.method(:list_campaign_draft_async_errors),
|
220
|
+
defaults["list_campaign_draft_async_errors"],
|
221
|
+
exception_transformer: exception_transformer
|
222
|
+
)
|
223
|
+
end
|
224
|
+
|
225
|
+
# Service calls
|
226
|
+
|
227
|
+
# Returns the requested campaign draft in full detail.
|
228
|
+
#
|
229
|
+
# @param resource_name [String]
|
230
|
+
# The resource name of the campaign draft to fetch.
|
231
|
+
# @param options [Google::Gax::CallOptions]
|
232
|
+
# Overrides the default settings for this call, e.g, timeout,
|
233
|
+
# retries, etc.
|
234
|
+
# @yield [result, operation] Access the result along with the RPC operation
|
235
|
+
# @yieldparam result [Google::Ads::GoogleAds::V1::Resources::CampaignDraft]
|
236
|
+
# @yieldparam operation [GRPC::ActiveCall::Operation]
|
237
|
+
# @return [Google::Ads::GoogleAds::V1::Resources::CampaignDraft]
|
238
|
+
# @raise [Google::Gax::GaxError] if the RPC is aborted.
|
239
|
+
# @example
|
240
|
+
# require "google/ads/google_ads"
|
241
|
+
#
|
242
|
+
# campaign_draft_client = Google::Ads::GoogleAds::CampaignDraft.new(version: :v1)
|
243
|
+
# formatted_resource_name = Google::Ads::GoogleAds::V1::Services::CampaignDraftServiceClient.campaign_draft_path("[CUSTOMER]", "[CAMPAIGN_DRAFT]")
|
244
|
+
# response = campaign_draft_client.get_campaign_draft(formatted_resource_name)
|
245
|
+
|
246
|
+
def get_campaign_draft \
|
247
|
+
resource_name,
|
248
|
+
options: nil,
|
249
|
+
&block
|
250
|
+
req = {
|
251
|
+
resource_name: resource_name
|
252
|
+
}.delete_if { |_, v| v.nil? }
|
253
|
+
req = Google::Gax::to_proto(req, Google::Ads::GoogleAds::V1::Services::GetCampaignDraftRequest)
|
254
|
+
@get_campaign_draft.call(req, options, &block)
|
255
|
+
end
|
256
|
+
|
257
|
+
# Creates, updates, or removes campaign drafts. Operation statuses are
|
258
|
+
# returned.
|
259
|
+
#
|
260
|
+
# @param customer_id [String]
|
261
|
+
# The ID of the customer whose campaign drafts are being modified.
|
262
|
+
# @param operations [Array<Google::Ads::GoogleAds::V1::Services::CampaignDraftOperation | Hash>]
|
263
|
+
# The list of operations to perform on individual campaign drafts.
|
264
|
+
# A hash of the same form as `Google::Ads::GoogleAds::V1::Services::CampaignDraftOperation`
|
265
|
+
# can also be provided.
|
266
|
+
# @param partial_failure [true, false]
|
267
|
+
# If true, successful operations will be carried out and invalid
|
268
|
+
# operations will return errors. If false, all operations will be carried
|
269
|
+
# out in one transaction if and only if they are all valid.
|
270
|
+
# Default is false.
|
271
|
+
# @param validate_only [true, false]
|
272
|
+
# If true, the request is validated but not executed. Only errors are
|
273
|
+
# returned, not results.
|
274
|
+
# @param options [Google::Gax::CallOptions]
|
275
|
+
# Overrides the default settings for this call, e.g, timeout,
|
276
|
+
# retries, etc.
|
277
|
+
# @yield [result, operation] Access the result along with the RPC operation
|
278
|
+
# @yieldparam result [Google::Ads::GoogleAds::V1::Services::MutateCampaignDraftsResponse]
|
279
|
+
# @yieldparam operation [GRPC::ActiveCall::Operation]
|
280
|
+
# @return [Google::Ads::GoogleAds::V1::Services::MutateCampaignDraftsResponse]
|
281
|
+
# @raise [Google::Gax::GaxError] if the RPC is aborted.
|
282
|
+
# @example
|
283
|
+
# require "google/ads/google_ads"
|
284
|
+
#
|
285
|
+
# campaign_draft_client = Google::Ads::GoogleAds::CampaignDraft.new(version: :v1)
|
286
|
+
#
|
287
|
+
# # TODO: Initialize `customer_id`:
|
288
|
+
# customer_id = ''
|
289
|
+
#
|
290
|
+
# # TODO: Initialize `operations`:
|
291
|
+
# operations = []
|
292
|
+
# response = campaign_draft_client.mutate_campaign_drafts(customer_id, operations)
|
293
|
+
|
294
|
+
def mutate_campaign_drafts \
|
295
|
+
customer_id,
|
296
|
+
operations,
|
297
|
+
partial_failure: nil,
|
298
|
+
validate_only: nil,
|
299
|
+
options: nil,
|
300
|
+
&block
|
301
|
+
req = {
|
302
|
+
customer_id: customer_id,
|
303
|
+
operations: operations,
|
304
|
+
partial_failure: partial_failure,
|
305
|
+
validate_only: validate_only
|
306
|
+
}.delete_if { |_, v| v.nil? }
|
307
|
+
req = Google::Gax::to_proto(req, Google::Ads::GoogleAds::V1::Services::MutateCampaignDraftsRequest)
|
308
|
+
@mutate_campaign_drafts.call(req, options, &block)
|
309
|
+
end
|
310
|
+
|
311
|
+
# Promotes the changes in a draft back to the base campaign.
|
312
|
+
#
|
313
|
+
# This method returns a Long Running Operation (LRO) indicating if the
|
314
|
+
# Promote is done. Use [Operations.GetOperation] to poll the LRO until it
|
315
|
+
# is done. Only a done status is returned in the response. See the status
|
316
|
+
# in the Campaign Draft resource to determine if the promotion was
|
317
|
+
# successful. If the LRO failed, use
|
318
|
+
# {Google::Ads::GoogleAds::V1::Services::CampaignDraftService::ListCampaignDraftAsyncErrors CampaignDraftService::ListCampaignDraftAsyncErrors} to view the list of
|
319
|
+
# error reasons.
|
320
|
+
#
|
321
|
+
# @param campaign_draft [String]
|
322
|
+
# The resource name of the campaign draft to promote.
|
323
|
+
# @param options [Google::Gax::CallOptions]
|
324
|
+
# Overrides the default settings for this call, e.g, timeout,
|
325
|
+
# retries, etc.
|
326
|
+
# @return [Google::Gax::Operation]
|
327
|
+
# @raise [Google::Gax::GaxError] if the RPC is aborted.
|
328
|
+
# @example
|
329
|
+
# require "google/ads/google_ads"
|
330
|
+
#
|
331
|
+
# campaign_draft_client = Google::Ads::GoogleAds::CampaignDraft.new(version: :v1)
|
332
|
+
# formatted_campaign_draft = Google::Ads::GoogleAds::V1::Services::CampaignDraftServiceClient.campaign_draft_path("[CUSTOMER]", "[CAMPAIGN_DRAFT]")
|
333
|
+
#
|
334
|
+
# # Register a callback during the method call.
|
335
|
+
# operation = campaign_draft_client.promote_campaign_draft(formatted_campaign_draft) do |op|
|
336
|
+
# raise op.results.message if op.error?
|
337
|
+
# op_results = op.results
|
338
|
+
# # Process the results.
|
339
|
+
#
|
340
|
+
# metadata = op.metadata
|
341
|
+
# # Process the metadata.
|
342
|
+
# end
|
343
|
+
#
|
344
|
+
# # Or use the return value to register a callback.
|
345
|
+
# operation.on_done do |op|
|
346
|
+
# raise op.results.message if op.error?
|
347
|
+
# op_results = op.results
|
348
|
+
# # Process the results.
|
349
|
+
#
|
350
|
+
# metadata = op.metadata
|
351
|
+
# # Process the metadata.
|
352
|
+
# end
|
353
|
+
#
|
354
|
+
# # Manually reload the operation.
|
355
|
+
# operation.reload!
|
356
|
+
#
|
357
|
+
# # Or block until the operation completes, triggering callbacks on
|
358
|
+
# # completion.
|
359
|
+
# operation.wait_until_done!
|
360
|
+
|
361
|
+
def promote_campaign_draft \
|
362
|
+
campaign_draft,
|
363
|
+
options: nil
|
364
|
+
req = {
|
365
|
+
campaign_draft: campaign_draft
|
366
|
+
}.delete_if { |_, v| v.nil? }
|
367
|
+
req = Google::Gax::to_proto(req, Google::Ads::GoogleAds::V1::Services::PromoteCampaignDraftRequest)
|
368
|
+
operation = Google::Gax::Operation.new(
|
369
|
+
@promote_campaign_draft.call(req, options),
|
370
|
+
@operations_client,
|
371
|
+
Google::Protobuf::Empty,
|
372
|
+
Google::Protobuf::Empty,
|
373
|
+
call_options: options
|
374
|
+
)
|
375
|
+
operation.on_done { |operation| yield(operation) } if block_given?
|
376
|
+
operation
|
377
|
+
end
|
378
|
+
|
379
|
+
# Returns all errors that occurred during CampaignDraft promote. Throws an
|
380
|
+
# error if called before campaign draft is promoted.
|
381
|
+
# Supports standard list paging.
|
382
|
+
#
|
383
|
+
# @param resource_name [String]
|
384
|
+
# The name of the campaign draft from which to retrieve the async errors.
|
385
|
+
# @param page_size [Integer]
|
386
|
+
# The maximum number of resources contained in the underlying API
|
387
|
+
# response. If page streaming is performed per-resource, this
|
388
|
+
# parameter does not affect the return value. If page streaming is
|
389
|
+
# performed per-page, this determines the maximum number of
|
390
|
+
# resources in a page.
|
391
|
+
# @param options [Google::Gax::CallOptions]
|
392
|
+
# Overrides the default settings for this call, e.g, timeout,
|
393
|
+
# retries, etc.
|
394
|
+
# @yield [result, operation] Access the result along with the RPC operation
|
395
|
+
# @yieldparam result [Google::Gax::PagedEnumerable<Google::Rpc::Status>]
|
396
|
+
# @yieldparam operation [GRPC::ActiveCall::Operation]
|
397
|
+
# @return [Google::Gax::PagedEnumerable<Google::Rpc::Status>]
|
398
|
+
# An enumerable of Google::Rpc::Status instances.
|
399
|
+
# See Google::Gax::PagedEnumerable documentation for other
|
400
|
+
# operations such as per-page iteration or access to the response
|
401
|
+
# object.
|
402
|
+
# @raise [Google::Gax::GaxError] if the RPC is aborted.
|
403
|
+
# @example
|
404
|
+
# require "google/ads/google_ads"
|
405
|
+
#
|
406
|
+
# campaign_draft_client = Google::Ads::GoogleAds::CampaignDraft.new(version: :v1)
|
407
|
+
# formatted_resource_name = Google::Ads::GoogleAds::V1::Services::CampaignDraftServiceClient.campaign_draft_path("[CUSTOMER]", "[CAMPAIGN_DRAFT]")
|
408
|
+
#
|
409
|
+
# # Iterate over all results.
|
410
|
+
# campaign_draft_client.list_campaign_draft_async_errors(formatted_resource_name).each do |element|
|
411
|
+
# # Process element.
|
412
|
+
# end
|
413
|
+
#
|
414
|
+
# # Or iterate over results one page at a time.
|
415
|
+
# campaign_draft_client.list_campaign_draft_async_errors(formatted_resource_name).each_page do |page|
|
416
|
+
# # Process each page at a time.
|
417
|
+
# page.each do |element|
|
418
|
+
# # Process element.
|
419
|
+
# end
|
420
|
+
# end
|
421
|
+
|
422
|
+
def list_campaign_draft_async_errors \
|
423
|
+
resource_name,
|
424
|
+
page_size: nil,
|
425
|
+
options: nil,
|
426
|
+
&block
|
427
|
+
req = {
|
428
|
+
resource_name: resource_name,
|
429
|
+
page_size: page_size
|
430
|
+
}.delete_if { |_, v| v.nil? }
|
431
|
+
req = Google::Gax::to_proto(req, Google::Ads::GoogleAds::V1::Services::ListCampaignDraftAsyncErrorsRequest)
|
432
|
+
@list_campaign_draft_async_errors.call(req, options, &block)
|
433
|
+
end
|
434
|
+
end
|
435
|
+
end
|
436
|
+
end
|
437
|
+
end
|
438
|
+
end
|
439
|
+
end
|