google-ads-googleads 0.6.0 → 0.7.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/ChangeLog +4 -0
- data/google_ads_config.rb +9 -0
- data/lib/google/ads/google_ads/config.rb +2 -0
- data/lib/google/ads/google_ads/google_ads_client.rb +13 -1
- data/lib/google/ads/google_ads/path_lookup_util.rb +115 -0
- data/lib/google/ads/google_ads/proto_lookup_util.rb +237 -3
- data/lib/google/ads/google_ads/v0/common/ad_type_infos_pb.rb +37 -0
- data/lib/google/ads/google_ads/v0/common/criteria_pb.rb +34 -0
- data/lib/google/ads/google_ads/v0/common/criterion_category_availability_pb.rb +41 -0
- data/lib/google/ads/google_ads/v0/common/dates_pb.rb +24 -0
- data/lib/google/ads/google_ads/v0/common/explorer_auto_optimizer_setting_pb.rb +23 -0
- data/lib/google/ads/google_ads/v0/common/feed_common_pb.rb +24 -0
- data/lib/google/ads/google_ads/v0/common/frequency_cap_pb.rb +34 -0
- data/lib/google/ads/google_ads/v0/common/keyword_plan_common_pb.rb +25 -0
- data/lib/google/ads/google_ads/v0/common/matching_function_pb.rb +23 -0
- data/lib/google/ads/google_ads/v0/common/metrics_pb.rb +3 -0
- data/lib/google/ads/google_ads/v0/common/real_time_bidding_setting_pb.rb +23 -0
- data/lib/google/ads/google_ads/v0/common/user_lists_pb.rb +31 -0
- data/lib/google/ads/google_ads/v0/enums/access_reason_pb.rb +31 -0
- data/lib/google/ads/google_ads/v0/enums/ad_customizer_placeholder_field_pb.rb +30 -0
- data/lib/google/ads/google_ads/v0/enums/ad_type_pb.rb +3 -1
- data/lib/google/ads/google_ads/v0/enums/affiliate_location_feed_relationship_type_pb.rb +27 -0
- data/lib/google/ads/google_ads/v0/enums/app_placeholder_field_pb.rb +34 -0
- data/lib/google/ads/google_ads/v0/enums/call_placeholder_field_pb.rb +31 -0
- data/lib/google/ads/google_ads/v0/enums/callout_placeholder_field_pb.rb +27 -0
- data/lib/google/ads/google_ads/v0/enums/content_label_type_pb.rb +41 -0
- data/lib/google/ads/google_ads/v0/enums/criterion_category_channel_availability_mode_pb.rb +29 -0
- data/lib/google/ads/google_ads/v0/enums/criterion_category_locale_availability_mode_pb.rb +30 -0
- data/lib/google/ads/google_ads/v0/enums/criterion_type_pb.rb +7 -0
- data/lib/google/ads/google_ads/v0/enums/custom_placeholder_field_pb.rb +46 -0
- data/lib/google/ads/google_ads/v0/enums/customer_match_upload_key_type_pb.rb +29 -0
- data/lib/google/ads/google_ads/v0/enums/education_placeholder_field_pb.rb +43 -0
- data/lib/google/ads/google_ads/v0/enums/feed_attribute_type_pb.rb +39 -0
- data/lib/google/ads/google_ads/v0/enums/feed_item_status_pb.rb +28 -0
- data/lib/google/ads/google_ads/v0/enums/feed_link_status_pb.rb +28 -0
- data/lib/google/ads/google_ads/v0/enums/feed_mapping_criterion_type_pb.rb +28 -0
- data/lib/google/ads/google_ads/v0/enums/feed_mapping_status_pb.rb +28 -0
- data/lib/google/ads/google_ads/v0/enums/feed_origin_pb.rb +28 -0
- data/lib/google/ads/google_ads/v0/enums/feed_status_pb.rb +28 -0
- data/lib/google/ads/google_ads/v0/enums/flight_placeholder_field_pb.rb +43 -0
- data/lib/google/ads/google_ads/v0/enums/frequency_cap_event_type_pb.rb +28 -0
- data/lib/google/ads/google_ads/v0/enums/frequency_cap_level_pb.rb +29 -0
- data/lib/google/ads/google_ads/v0/enums/frequency_cap_time_unit_pb.rb +29 -0
- data/lib/google/ads/google_ads/v0/enums/geo_targeting_restriction_pb.rb +27 -0
- data/lib/google/ads/google_ads/v0/enums/hotel_placeholder_field_pb.rb +46 -0
- data/lib/google/ads/google_ads/v0/enums/job_placeholder_field_pb.rb +43 -0
- data/lib/google/ads/google_ads/v0/enums/keyword_plan_competition_level_pb.rb +29 -0
- data/lib/google/ads/google_ads/v0/enums/keyword_plan_forecast_interval_pb.rb +29 -0
- data/lib/google/ads/google_ads/v0/enums/keyword_plan_network_pb.rb +28 -0
- data/lib/google/ads/google_ads/v0/enums/local_placeholder_field_pb.rb +45 -0
- data/lib/google/ads/google_ads/v0/enums/message_placeholder_field_pb.rb +31 -0
- data/lib/google/ads/google_ads/v0/enums/placeholder_type_pb.rb +45 -0
- data/lib/google/ads/google_ads/v0/enums/preferred_content_type_pb.rb +27 -0
- data/lib/google/ads/google_ads/v0/enums/price_placeholder_field_pb.rb +79 -0
- data/lib/google/ads/google_ads/v0/enums/product_condition_pb.rb +0 -1
- data/lib/google/ads/google_ads/v0/enums/promotion_placeholder_field_pb.rb +40 -0
- data/lib/google/ads/google_ads/v0/enums/real_estate_placeholder_field_pb.rb +44 -0
- data/lib/google/ads/google_ads/v0/enums/search_term_match_type_pb.rb +31 -0
- data/lib/google/ads/google_ads/v0/enums/search_term_targeting_status_pb.rb +30 -0
- data/lib/google/ads/google_ads/v0/enums/sitelink_placeholder_field_pb.rb +33 -0
- data/lib/google/ads/google_ads/v0/enums/structured_snippet_placeholder_field_pb.rb +28 -0
- data/lib/google/ads/google_ads/v0/enums/targeting_dimension_pb.rb +34 -0
- data/lib/google/ads/google_ads/v0/enums/tracking_code_page_format_pb.rb +1 -0
- data/lib/google/ads/google_ads/v0/enums/travel_placeholder_field_pb.rb +46 -0
- data/lib/google/ads/google_ads/v0/enums/user_interest_taxonomy_type_pb.rb +31 -0
- data/lib/google/ads/google_ads/v0/enums/user_list_access_status_pb.rb +28 -0
- data/lib/google/ads/google_ads/v0/enums/user_list_closing_reason_pb.rb +27 -0
- data/lib/google/ads/google_ads/v0/enums/user_list_crm_data_source_type_pb.rb +29 -0
- data/lib/google/ads/google_ads/v0/enums/user_list_membership_status_pb.rb +28 -0
- data/lib/google/ads/google_ads/v0/enums/user_list_size_range_pb.rb +42 -0
- data/lib/google/ads/google_ads/v0/enums/user_list_type_pb.rb +32 -0
- data/lib/google/ads/google_ads/v0/errors/ad_group_feed_error_pb.rb +33 -0
- data/lib/google/ads/google_ads/v0/errors/authentication_error_pb.rb +1 -2
- data/lib/google/ads/google_ads/v0/errors/campaign_feed_error_pb.rb +32 -0
- data/lib/google/ads/google_ads/v0/errors/customer_error_pb.rb +1 -0
- data/lib/google/ads/google_ads/v0/errors/customer_feed_error_pb.rb +33 -0
- data/lib/google/ads/google_ads/v0/errors/date_error_pb.rb +2 -1
- data/lib/google/ads/google_ads/v0/errors/errors_pb.rb +26 -0
- data/lib/google/ads/google_ads/v0/errors/feed_error_pb.rb +45 -0
- data/lib/google/ads/google_ads/v0/errors/feed_item_error_pb.rb +35 -0
- data/lib/google/ads/google_ads/v0/errors/feed_mapping_error_pb.rb +42 -0
- data/lib/google/ads/google_ads/v0/errors/header_error_pb.rb +1 -0
- data/lib/google/ads/google_ads/v0/errors/keyword_plan_ad_group_error_pb.rb +28 -0
- data/lib/google/ads/google_ads/v0/errors/keyword_plan_campaign_error_pb.rb +31 -0
- data/lib/google/ads/google_ads/v0/errors/keyword_plan_error_pb.rb +40 -0
- data/lib/google/ads/google_ads/v0/errors/keyword_plan_idea_error_pb.rb +28 -0
- data/lib/google/ads/google_ads/v0/errors/keyword_plan_keyword_error_pb.rb +32 -0
- data/lib/google/ads/google_ads/v0/errors/keyword_plan_negative_keyword_error_pb.rb +26 -0
- data/lib/google/ads/google_ads/v0/errors/new_resource_creation_error_pb.rb +1 -1
- data/lib/google/ads/google_ads/v0/errors/operation_access_denied_error_pb.rb +1 -0
- data/lib/google/ads/google_ads/v0/errors/recommendation_error_pb.rb +5 -0
- data/lib/google/ads/google_ads/v0/errors/url_field_error_pb.rb +5 -0
- data/lib/google/ads/google_ads/v0/errors/user_list_error_pb.rb +49 -0
- data/lib/google/ads/google_ads/v0/resources/ad_group_bid_modifier_pb.rb +1 -0
- data/lib/google/ads/google_ads/v0/resources/ad_group_criterion_pb.rb +2 -0
- data/lib/google/ads/google_ads/v0/resources/ad_group_feed_pb.rb +31 -0
- data/lib/google/ads/google_ads/v0/resources/ad_group_pb.rb +5 -0
- data/lib/google/ads/google_ads/v0/resources/ad_pb.rb +3 -0
- data/lib/google/ads/google_ads/v0/resources/billing_setup_pb.rb +4 -0
- data/lib/google/ads/google_ads/v0/resources/campaign_audience_view_pb.rb +22 -0
- data/lib/google/ads/google_ads/v0/resources/campaign_budget_pb.rb +1 -0
- data/lib/google/ads/google_ads/v0/resources/campaign_criterion_pb.rb +7 -0
- data/lib/google/ads/google_ads/v0/resources/campaign_feed_pb.rb +31 -0
- data/lib/google/ads/google_ads/v0/resources/campaign_pb.rb +4 -0
- data/lib/google/ads/google_ads/v0/resources/carrier_constant_pb.rb +26 -0
- data/lib/google/ads/google_ads/v0/resources/customer_client_pb.rb +26 -0
- data/lib/google/ads/google_ads/v0/resources/customer_feed_pb.rb +30 -0
- data/lib/google/ads/google_ads/v0/resources/customer_pb.rb +1 -0
- data/lib/google/ads/google_ads/v0/resources/feed_item_pb.rb +48 -0
- data/lib/google/ads/google_ads/v0/resources/feed_mapping_pb.rb +74 -0
- data/lib/google/ads/google_ads/v0/resources/feed_pb.rb +75 -0
- data/lib/google/ads/google_ads/v0/resources/hotel_performance_view_pb.rb +22 -0
- data/lib/google/ads/google_ads/v0/resources/keyword_plan_ad_group_pb.rb +27 -0
- data/lib/google/ads/google_ads/v0/resources/keyword_plan_campaign_pb.rb +35 -0
- data/lib/google/ads/google_ads/v0/resources/keyword_plan_keyword_pb.rb +29 -0
- data/lib/google/ads/google_ads/v0/resources/keyword_plan_negative_keyword_pb.rb +28 -0
- data/lib/google/ads/google_ads/v0/resources/keyword_plan_pb.rb +35 -0
- data/lib/google/ads/google_ads/v0/resources/language_constant_pb.rb +26 -0
- data/lib/google/ads/google_ads/v0/resources/payments_account_pb.rb +28 -0
- data/lib/google/ads/google_ads/v0/resources/search_term_view_pb.rb +27 -0
- data/lib/google/ads/google_ads/v0/resources/user_interest_pb.rb +31 -0
- data/lib/google/ads/google_ads/v0/resources/user_list_pb.rb +51 -0
- data/lib/google/ads/google_ads/v0/services/ad_group_feed_service_client.rb +268 -0
- data/lib/google/ads/google_ads/v0/services/ad_group_feed_service_client_config.json +36 -0
- data/lib/google/ads/google_ads/v0/services/ad_group_feed_service_pb.rb +47 -0
- data/lib/google/ads/google_ads/v0/services/ad_group_feed_service_services_pb.rb +51 -0
- data/lib/google/ads/google_ads/v0/services/campaign_audience_view_service_client.rb +221 -0
- data/lib/google/ads/google_ads/v0/services/campaign_audience_view_service_client_config.json +31 -0
- data/lib/google/ads/google_ads/v0/services/campaign_audience_view_service_pb.rb +24 -0
- data/lib/google/ads/google_ads/v0/services/campaign_audience_view_service_services_pb.rb +48 -0
- data/lib/google/ads/google_ads/v0/services/campaign_feed_service_client.rb +268 -0
- data/lib/google/ads/google_ads/v0/services/campaign_feed_service_client_config.json +36 -0
- data/lib/google/ads/google_ads/v0/services/campaign_feed_service_pb.rb +47 -0
- data/lib/google/ads/google_ads/v0/services/campaign_feed_service_services_pb.rb +51 -0
- data/lib/google/ads/google_ads/v0/services/carrier_constant_service_client.rb +219 -0
- data/lib/google/ads/google_ads/v0/services/carrier_constant_service_client_config.json +31 -0
- data/lib/google/ads/google_ads/v0/services/carrier_constant_service_pb.rb +24 -0
- data/lib/google/ads/google_ads/v0/services/carrier_constant_service_services_pb.rb +48 -0
- data/lib/google/ads/google_ads/v0/services/customer_client_service_client.rb +221 -0
- data/lib/google/ads/google_ads/v0/services/customer_client_service_client_config.json +31 -0
- data/lib/google/ads/google_ads/v0/services/customer_client_service_pb.rb +24 -0
- data/lib/google/ads/google_ads/v0/services/customer_client_service_services_pb.rb +48 -0
- data/lib/google/ads/google_ads/v0/services/customer_feed_service_client.rb +268 -0
- data/lib/google/ads/google_ads/v0/services/customer_feed_service_client_config.json +36 -0
- data/lib/google/ads/google_ads/v0/services/customer_feed_service_pb.rb +47 -0
- data/lib/google/ads/google_ads/v0/services/customer_feed_service_services_pb.rb +51 -0
- data/lib/google/ads/google_ads/v0/services/customer_service_client.rb +93 -0
- data/lib/google/ads/google_ads/v0/services/customer_service_client_config.json +10 -0
- data/lib/google/ads/google_ads/v0/services/customer_service_pb.rb +28 -0
- data/lib/google/ads/google_ads/v0/services/customer_service_services_pb.rb +4 -0
- data/lib/google/ads/google_ads/v0/services/feed_item_service_client.rb +268 -0
- data/lib/google/ads/google_ads/v0/services/feed_item_service_client_config.json +36 -0
- data/lib/google/ads/google_ads/v0/services/feed_item_service_pb.rb +47 -0
- data/lib/google/ads/google_ads/v0/services/feed_item_service_services_pb.rb +51 -0
- data/lib/google/ads/google_ads/v0/services/feed_mapping_service_client.rb +268 -0
- data/lib/google/ads/google_ads/v0/services/feed_mapping_service_client_config.json +36 -0
- data/lib/google/ads/google_ads/v0/services/feed_mapping_service_pb.rb +44 -0
- data/lib/google/ads/google_ads/v0/services/feed_mapping_service_services_pb.rb +51 -0
- data/lib/google/ads/google_ads/v0/services/feed_service_client.rb +268 -0
- data/lib/google/ads/google_ads/v0/services/feed_service_client_config.json +36 -0
- data/lib/google/ads/google_ads/v0/services/feed_service_pb.rb +47 -0
- data/lib/google/ads/google_ads/v0/services/feed_service_services_pb.rb +51 -0
- data/lib/google/ads/google_ads/v0/services/geo_target_constant_service_client.rb +10 -1
- data/lib/google/ads/google_ads/v0/services/geo_target_constant_service_pb.rb +1 -0
- data/lib/google/ads/google_ads/v0/services/google_ads_service_client.rb +46 -0
- data/lib/google/ads/google_ads/v0/services/google_ads_service_client_config.json +5 -0
- data/lib/google/ads/google_ads/v0/services/google_ads_service_pb.rb +118 -0
- data/lib/google/ads/google_ads/v0/services/google_ads_service_services_pb.rb +2 -0
- data/lib/google/ads/google_ads/v0/services/hotel_performance_view_service_client.rb +219 -0
- data/lib/google/ads/google_ads/v0/services/hotel_performance_view_service_client_config.json +31 -0
- data/lib/google/ads/google_ads/v0/services/hotel_performance_view_service_pb.rb +24 -0
- data/lib/google/ads/google_ads/v0/services/hotel_performance_view_service_services_pb.rb +48 -0
- data/lib/google/ads/google_ads/v0/services/keyword_plan_ad_group_service_client.rb +268 -0
- data/lib/google/ads/google_ads/v0/services/keyword_plan_ad_group_service_client_config.json +36 -0
- data/lib/google/ads/google_ads/v0/services/keyword_plan_ad_group_service_pb.rb +47 -0
- data/lib/google/ads/google_ads/v0/services/keyword_plan_ad_group_service_services_pb.rb +51 -0
- data/lib/google/ads/google_ads/v0/services/keyword_plan_campaign_service_client.rb +268 -0
- data/lib/google/ads/google_ads/v0/services/keyword_plan_campaign_service_client_config.json +36 -0
- data/lib/google/ads/google_ads/v0/services/keyword_plan_campaign_service_pb.rb +47 -0
- data/lib/google/ads/google_ads/v0/services/keyword_plan_campaign_service_services_pb.rb +51 -0
- data/lib/google/ads/google_ads/v0/services/keyword_plan_idea_service_client.rb +252 -0
- data/lib/google/ads/google_ads/v0/services/keyword_plan_idea_service_client_config.json +31 -0
- data/lib/google/ads/google_ads/v0/services/keyword_plan_idea_service_pb.rb +56 -0
- data/lib/google/ads/google_ads/v0/services/keyword_plan_idea_service_services_pb.rb +48 -0
- data/lib/google/ads/google_ads/v0/services/keyword_plan_keyword_service_client.rb +268 -0
- data/lib/google/ads/google_ads/v0/services/keyword_plan_keyword_service_client_config.json +36 -0
- data/lib/google/ads/google_ads/v0/services/keyword_plan_keyword_service_pb.rb +47 -0
- data/lib/google/ads/google_ads/v0/services/keyword_plan_keyword_service_services_pb.rb +51 -0
- data/lib/google/ads/google_ads/v0/services/keyword_plan_negative_keyword_service_client.rb +269 -0
- data/lib/google/ads/google_ads/v0/services/keyword_plan_negative_keyword_service_client_config.json +36 -0
- data/lib/google/ads/google_ads/v0/services/keyword_plan_negative_keyword_service_pb.rb +47 -0
- data/lib/google/ads/google_ads/v0/services/keyword_plan_negative_keyword_service_services_pb.rb +51 -0
- data/lib/google/ads/google_ads/v0/services/keyword_plan_service_client.rb +339 -0
- data/lib/google/ads/google_ads/v0/services/keyword_plan_service_client_config.json +46 -0
- data/lib/google/ads/google_ads/v0/services/keyword_plan_service_pb.rb +95 -0
- data/lib/google/ads/google_ads/v0/services/keyword_plan_service_services_pb.rb +55 -0
- data/lib/google/ads/google_ads/v0/services/language_constant_service_client.rb +219 -0
- data/lib/google/ads/google_ads/v0/services/language_constant_service_client_config.json +31 -0
- data/lib/google/ads/google_ads/v0/services/language_constant_service_pb.rb +24 -0
- data/lib/google/ads/google_ads/v0/services/language_constant_service_services_pb.rb +48 -0
- data/lib/google/ads/google_ads/v0/services/payments_account_service_client.rb +209 -0
- data/lib/google/ads/google_ads/v0/services/payments_account_service_client_config.json +31 -0
- data/lib/google/ads/google_ads/v0/services/payments_account_service_pb.rb +28 -0
- data/lib/google/ads/google_ads/v0/services/payments_account_service_services_pb.rb +51 -0
- data/lib/google/ads/google_ads/v0/services/recommendation_service_client.rb +71 -1
- data/lib/google/ads/google_ads/v0/services/recommendation_service_client_config.json +5 -0
- data/lib/google/ads/google_ads/v0/services/recommendation_service_pb.rb +22 -4
- data/lib/google/ads/google_ads/v0/services/recommendation_service_services_pb.rb +2 -0
- data/lib/google/ads/google_ads/v0/services/search_term_view_service_client.rb +221 -0
- data/lib/google/ads/google_ads/v0/services/search_term_view_service_client_config.json +31 -0
- data/lib/google/ads/google_ads/v0/services/search_term_view_service_pb.rb +24 -0
- data/lib/google/ads/google_ads/v0/services/search_term_view_service_services_pb.rb +48 -0
- data/lib/google/ads/google_ads/v0/services/user_interest_service_client.rb +221 -0
- data/lib/google/ads/google_ads/v0/services/user_interest_service_client_config.json +31 -0
- data/lib/google/ads/google_ads/v0/services/user_interest_service_pb.rb +24 -0
- data/lib/google/ads/google_ads/v0/services/user_interest_service_services_pb.rb +48 -0
- data/lib/google/ads/google_ads/v0/services/user_list_service_client.rb +267 -0
- data/lib/google/ads/google_ads/v0/services/user_list_service_client_config.json +36 -0
- data/lib/google/ads/google_ads/v0/services/user_list_service_pb.rb +47 -0
- data/lib/google/ads/google_ads/v0/services/user_list_service_services_pb.rb +50 -0
- data/lib/google/ads/google_ads/version.rb +1 -1
- metadata +179 -4
@@ -225,6 +225,10 @@ module Google
|
|
225
225
|
# targets.
|
226
226
|
# A hash of the same form as `Google::Protobuf::StringValue`
|
227
227
|
# can also be provided.
|
228
|
+
# @param country_code [Google::Protobuf::StringValue | Hash]
|
229
|
+
# Returned geo targets are restricted to this country code.
|
230
|
+
# A hash of the same form as `Google::Protobuf::StringValue`
|
231
|
+
# can also be provided.
|
228
232
|
# @param location_names [Google::Ads::GoogleAds::V0::Services::SuggestGeoTargetConstantsRequest::LocationNames | Hash]
|
229
233
|
# The location names to search by. At most 25 names can be set.
|
230
234
|
# A hash of the same form as `Google::Ads::GoogleAds::V0::Services::SuggestGeoTargetConstantsRequest::LocationNames`
|
@@ -248,16 +252,21 @@ module Google
|
|
248
252
|
#
|
249
253
|
# # TODO: Initialize +locale+:
|
250
254
|
# locale = {}
|
251
|
-
#
|
255
|
+
#
|
256
|
+
# # TODO: Initialize +country_code+:
|
257
|
+
# country_code = {}
|
258
|
+
# response = geo_target_constant_service_client.suggest_geo_target_constants(locale, country_code)
|
252
259
|
|
253
260
|
def suggest_geo_target_constants \
|
254
261
|
locale,
|
262
|
+
country_code,
|
255
263
|
location_names: nil,
|
256
264
|
geo_targets: nil,
|
257
265
|
options: nil,
|
258
266
|
&block
|
259
267
|
req = {
|
260
268
|
locale: locale,
|
269
|
+
country_code: country_code,
|
261
270
|
location_names: location_names,
|
262
271
|
geo_targets: geo_targets
|
263
272
|
}.delete_if { |_, v| v.nil? }
|
@@ -12,6 +12,7 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
|
|
12
12
|
end
|
13
13
|
add_message "google.ads.googleads.v0.services.SuggestGeoTargetConstantsRequest" do
|
14
14
|
optional :locale, :message, 3, "google.protobuf.StringValue"
|
15
|
+
optional :country_code, :message, 5, "google.protobuf.StringValue"
|
15
16
|
oneof :query do
|
16
17
|
optional :location_names, :message, 1, "google.ads.googleads.v0.services.SuggestGeoTargetConstantsRequest.LocationNames"
|
17
18
|
optional :geo_targets, :message, 2, "google.ads.googleads.v0.services.SuggestGeoTargetConstantsRequest.GeoTargets"
|
@@ -173,6 +173,11 @@ module Google
|
|
173
173
|
defaults["search"],
|
174
174
|
exception_transformer: exception_transformer
|
175
175
|
)
|
176
|
+
@mutate = Google::Gax.create_api_call(
|
177
|
+
@google_ads_service_stub.method(:mutate),
|
178
|
+
defaults["mutate"],
|
179
|
+
exception_transformer: exception_transformer
|
180
|
+
)
|
176
181
|
end
|
177
182
|
|
178
183
|
# Service calls
|
@@ -239,6 +244,47 @@ module Google
|
|
239
244
|
req = Google::Gax::to_proto(req, Google::Ads::GoogleAds::V0::Services::SearchGoogleAdsRequest)
|
240
245
|
@search.call(req, options, &block)
|
241
246
|
end
|
247
|
+
|
248
|
+
# Creates, updates, or removes resources. Operation statuses are returned.
|
249
|
+
#
|
250
|
+
# @param customer_id [String]
|
251
|
+
# The ID of the customer whose resources are being modified.
|
252
|
+
# @param mutate_operations [Array<Google::Ads::GoogleAds::V0::Services::MutateOperation | Hash>]
|
253
|
+
# The list of operations to perform on individual resources.
|
254
|
+
# A hash of the same form as `Google::Ads::GoogleAds::V0::Services::MutateOperation`
|
255
|
+
# can also be provided.
|
256
|
+
# @param options [Google::Gax::CallOptions]
|
257
|
+
# Overrides the default settings for this call, e.g, timeout,
|
258
|
+
# retries, etc.
|
259
|
+
# @yield [result, operation] Access the result along with the RPC operation
|
260
|
+
# @yieldparam result [Google::Ads::GoogleAds::V0::Services::MutateGoogleAdsResponse]
|
261
|
+
# @yieldparam operation [GRPC::ActiveCall::Operation]
|
262
|
+
# @return [Google::Ads::GoogleAds::V0::Services::MutateGoogleAdsResponse]
|
263
|
+
# @raise [Google::Gax::GaxError] if the RPC is aborted.
|
264
|
+
# @example
|
265
|
+
# require "google/ads/google_ads"
|
266
|
+
#
|
267
|
+
# google_ads_service_client = Google::Ads::GoogleAds::GoogleAds.new(version: :v0)
|
268
|
+
#
|
269
|
+
# # TODO: Initialize +customer_id+:
|
270
|
+
# customer_id = ''
|
271
|
+
#
|
272
|
+
# # TODO: Initialize +mutate_operations+:
|
273
|
+
# mutate_operations = []
|
274
|
+
# response = google_ads_service_client.mutate(customer_id, mutate_operations)
|
275
|
+
|
276
|
+
def mutate \
|
277
|
+
customer_id,
|
278
|
+
mutate_operations,
|
279
|
+
options: nil,
|
280
|
+
&block
|
281
|
+
req = {
|
282
|
+
customer_id: customer_id,
|
283
|
+
mutate_operations: mutate_operations
|
284
|
+
}.delete_if { |_, v| v.nil? }
|
285
|
+
req = Google::Gax::to_proto(req, Google::Ads::GoogleAds::V0::Services::MutateGoogleAdsRequest)
|
286
|
+
@mutate.call(req, options, &block)
|
287
|
+
end
|
242
288
|
end
|
243
289
|
end
|
244
290
|
end
|
@@ -7,7 +7,10 @@ require 'google/ads/google_ads/v0/common/metrics_pb'
|
|
7
7
|
require 'google/ads/google_ads/v0/enums/ad_network_type_pb'
|
8
8
|
require 'google/ads/google_ads/v0/enums/day_of_week_pb'
|
9
9
|
require 'google/ads/google_ads/v0/enums/device_pb'
|
10
|
+
require 'google/ads/google_ads/v0/enums/hotel_date_selection_type_pb'
|
10
11
|
require 'google/ads/google_ads/v0/enums/month_of_year_pb'
|
12
|
+
require 'google/ads/google_ads/v0/enums/placeholder_type_pb'
|
13
|
+
require 'google/ads/google_ads/v0/enums/search_term_match_type_pb'
|
11
14
|
require 'google/ads/google_ads/v0/enums/slot_pb'
|
12
15
|
require 'google/ads/google_ads/v0/resources/account_budget_pb'
|
13
16
|
require 'google/ads/google_ads/v0/resources/account_budget_proposal_pb'
|
@@ -16,33 +19,67 @@ require 'google/ads/google_ads/v0/resources/ad_group_ad_pb'
|
|
16
19
|
require 'google/ads/google_ads/v0/resources/ad_group_audience_view_pb'
|
17
20
|
require 'google/ads/google_ads/v0/resources/ad_group_bid_modifier_pb'
|
18
21
|
require 'google/ads/google_ads/v0/resources/ad_group_criterion_pb'
|
22
|
+
require 'google/ads/google_ads/v0/resources/ad_group_feed_pb'
|
19
23
|
require 'google/ads/google_ads/v0/resources/age_range_view_pb'
|
20
24
|
require 'google/ads/google_ads/v0/resources/bidding_strategy_pb'
|
21
25
|
require 'google/ads/google_ads/v0/resources/billing_setup_pb'
|
22
26
|
require 'google/ads/google_ads/v0/resources/campaign_pb'
|
27
|
+
require 'google/ads/google_ads/v0/resources/campaign_audience_view_pb'
|
23
28
|
require 'google/ads/google_ads/v0/resources/campaign_bid_modifier_pb'
|
24
29
|
require 'google/ads/google_ads/v0/resources/campaign_budget_pb'
|
25
30
|
require 'google/ads/google_ads/v0/resources/campaign_criterion_pb'
|
31
|
+
require 'google/ads/google_ads/v0/resources/campaign_feed_pb'
|
26
32
|
require 'google/ads/google_ads/v0/resources/campaign_group_pb'
|
27
33
|
require 'google/ads/google_ads/v0/resources/campaign_shared_set_pb'
|
34
|
+
require 'google/ads/google_ads/v0/resources/carrier_constant_pb'
|
28
35
|
require 'google/ads/google_ads/v0/resources/change_status_pb'
|
29
36
|
require 'google/ads/google_ads/v0/resources/customer_pb'
|
37
|
+
require 'google/ads/google_ads/v0/resources/customer_client_pb'
|
30
38
|
require 'google/ads/google_ads/v0/resources/customer_client_link_pb'
|
39
|
+
require 'google/ads/google_ads/v0/resources/customer_feed_pb'
|
31
40
|
require 'google/ads/google_ads/v0/resources/customer_manager_link_pb'
|
32
41
|
require 'google/ads/google_ads/v0/resources/display_keyword_view_pb'
|
42
|
+
require 'google/ads/google_ads/v0/resources/feed_pb'
|
43
|
+
require 'google/ads/google_ads/v0/resources/feed_item_pb'
|
44
|
+
require 'google/ads/google_ads/v0/resources/feed_mapping_pb'
|
33
45
|
require 'google/ads/google_ads/v0/resources/gender_view_pb'
|
34
46
|
require 'google/ads/google_ads/v0/resources/geo_target_constant_pb'
|
35
47
|
require 'google/ads/google_ads/v0/resources/hotel_group_view_pb'
|
48
|
+
require 'google/ads/google_ads/v0/resources/hotel_performance_view_pb'
|
49
|
+
require 'google/ads/google_ads/v0/resources/keyword_plan_pb'
|
50
|
+
require 'google/ads/google_ads/v0/resources/keyword_plan_ad_group_pb'
|
51
|
+
require 'google/ads/google_ads/v0/resources/keyword_plan_campaign_pb'
|
52
|
+
require 'google/ads/google_ads/v0/resources/keyword_plan_keyword_pb'
|
53
|
+
require 'google/ads/google_ads/v0/resources/keyword_plan_negative_keyword_pb'
|
36
54
|
require 'google/ads/google_ads/v0/resources/keyword_view_pb'
|
55
|
+
require 'google/ads/google_ads/v0/resources/language_constant_pb'
|
37
56
|
require 'google/ads/google_ads/v0/resources/managed_placement_view_pb'
|
38
57
|
require 'google/ads/google_ads/v0/resources/parental_status_view_pb'
|
39
58
|
require 'google/ads/google_ads/v0/resources/product_group_view_pb'
|
40
59
|
require 'google/ads/google_ads/v0/resources/recommendation_pb'
|
60
|
+
require 'google/ads/google_ads/v0/resources/search_term_view_pb'
|
41
61
|
require 'google/ads/google_ads/v0/resources/shared_criterion_pb'
|
42
62
|
require 'google/ads/google_ads/v0/resources/shared_set_pb'
|
43
63
|
require 'google/ads/google_ads/v0/resources/topic_constant_pb'
|
44
64
|
require 'google/ads/google_ads/v0/resources/topic_view_pb'
|
65
|
+
require 'google/ads/google_ads/v0/resources/user_interest_pb'
|
66
|
+
require 'google/ads/google_ads/v0/resources/user_list_pb'
|
45
67
|
require 'google/ads/google_ads/v0/resources/video_pb'
|
68
|
+
require 'google/ads/google_ads/v0/services/ad_group_ad_service_pb'
|
69
|
+
require 'google/ads/google_ads/v0/services/ad_group_bid_modifier_service_pb'
|
70
|
+
require 'google/ads/google_ads/v0/services/ad_group_criterion_service_pb'
|
71
|
+
require 'google/ads/google_ads/v0/services/ad_group_service_pb'
|
72
|
+
require 'google/ads/google_ads/v0/services/bidding_strategy_service_pb'
|
73
|
+
require 'google/ads/google_ads/v0/services/campaign_bid_modifier_service_pb'
|
74
|
+
require 'google/ads/google_ads/v0/services/campaign_budget_service_pb'
|
75
|
+
require 'google/ads/google_ads/v0/services/campaign_criterion_service_pb'
|
76
|
+
require 'google/ads/google_ads/v0/services/campaign_group_service_pb'
|
77
|
+
require 'google/ads/google_ads/v0/services/campaign_service_pb'
|
78
|
+
require 'google/ads/google_ads/v0/services/campaign_shared_set_service_pb'
|
79
|
+
require 'google/ads/google_ads/v0/services/conversion_action_service_pb'
|
80
|
+
require 'google/ads/google_ads/v0/services/shared_criterion_service_pb'
|
81
|
+
require 'google/ads/google_ads/v0/services/shared_set_service_pb'
|
82
|
+
require 'google/ads/google_ads/v0/services/user_list_service_pb'
|
46
83
|
require 'google/api/annotations_pb'
|
47
84
|
require 'google/protobuf/field_mask_pb'
|
48
85
|
require 'google/protobuf/wrappers_pb'
|
@@ -67,31 +104,50 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
|
|
67
104
|
optional :ad_group_audience_view, :message, 57, "google.ads.googleads.v0.resources.AdGroupAudienceView"
|
68
105
|
optional :ad_group_bid_modifier, :message, 24, "google.ads.googleads.v0.resources.AdGroupBidModifier"
|
69
106
|
optional :ad_group_criterion, :message, 17, "google.ads.googleads.v0.resources.AdGroupCriterion"
|
107
|
+
optional :ad_group_feed, :message, 67, "google.ads.googleads.v0.resources.AdGroupFeed"
|
70
108
|
optional :age_range_view, :message, 48, "google.ads.googleads.v0.resources.AgeRangeView"
|
71
109
|
optional :bidding_strategy, :message, 18, "google.ads.googleads.v0.resources.BiddingStrategy"
|
72
110
|
optional :billing_setup, :message, 41, "google.ads.googleads.v0.resources.BillingSetup"
|
73
111
|
optional :campaign_budget, :message, 19, "google.ads.googleads.v0.resources.CampaignBudget"
|
74
112
|
optional :campaign, :message, 2, "google.ads.googleads.v0.resources.Campaign"
|
113
|
+
optional :campaign_audience_view, :message, 69, "google.ads.googleads.v0.resources.CampaignAudienceView"
|
75
114
|
optional :campaign_bid_modifier, :message, 26, "google.ads.googleads.v0.resources.CampaignBidModifier"
|
76
115
|
optional :campaign_criterion, :message, 20, "google.ads.googleads.v0.resources.CampaignCriterion"
|
116
|
+
optional :campaign_feed, :message, 63, "google.ads.googleads.v0.resources.CampaignFeed"
|
77
117
|
optional :campaign_group, :message, 25, "google.ads.googleads.v0.resources.CampaignGroup"
|
78
118
|
optional :campaign_shared_set, :message, 30, "google.ads.googleads.v0.resources.CampaignSharedSet"
|
119
|
+
optional :carrier_constant, :message, 66, "google.ads.googleads.v0.resources.CarrierConstant"
|
79
120
|
optional :change_status, :message, 37, "google.ads.googleads.v0.resources.ChangeStatus"
|
80
121
|
optional :customer, :message, 1, "google.ads.googleads.v0.resources.Customer"
|
81
122
|
optional :customer_manager_link, :message, 61, "google.ads.googleads.v0.resources.CustomerManagerLink"
|
82
123
|
optional :customer_client_link, :message, 62, "google.ads.googleads.v0.resources.CustomerClientLink"
|
124
|
+
optional :customer_client, :message, 70, "google.ads.googleads.v0.resources.CustomerClient"
|
125
|
+
optional :customer_feed, :message, 64, "google.ads.googleads.v0.resources.CustomerFeed"
|
83
126
|
optional :display_keyword_view, :message, 47, "google.ads.googleads.v0.resources.DisplayKeywordView"
|
127
|
+
optional :feed, :message, 46, "google.ads.googleads.v0.resources.Feed"
|
128
|
+
optional :feed_item, :message, 50, "google.ads.googleads.v0.resources.FeedItem"
|
129
|
+
optional :feed_mapping, :message, 58, "google.ads.googleads.v0.resources.FeedMapping"
|
84
130
|
optional :gender_view, :message, 40, "google.ads.googleads.v0.resources.GenderView"
|
85
131
|
optional :geo_target_constant, :message, 23, "google.ads.googleads.v0.resources.GeoTargetConstant"
|
86
132
|
optional :hotel_group_view, :message, 51, "google.ads.googleads.v0.resources.HotelGroupView"
|
133
|
+
optional :hotel_performance_view, :message, 71, "google.ads.googleads.v0.resources.HotelPerformanceView"
|
87
134
|
optional :keyword_view, :message, 21, "google.ads.googleads.v0.resources.KeywordView"
|
135
|
+
optional :keyword_plan, :message, 32, "google.ads.googleads.v0.resources.KeywordPlan"
|
136
|
+
optional :keyword_plan_campaign, :message, 33, "google.ads.googleads.v0.resources.KeywordPlanCampaign"
|
137
|
+
optional :keyword_plan_negative_keyword, :message, 34, "google.ads.googleads.v0.resources.KeywordPlanNegativeKeyword"
|
138
|
+
optional :keyword_plan_ad_group, :message, 35, "google.ads.googleads.v0.resources.KeywordPlanAdGroup"
|
139
|
+
optional :keyword_plan_keyword, :message, 36, "google.ads.googleads.v0.resources.KeywordPlanKeyword"
|
140
|
+
optional :language_constant, :message, 55, "google.ads.googleads.v0.resources.LanguageConstant"
|
88
141
|
optional :managed_placement_view, :message, 53, "google.ads.googleads.v0.resources.ManagedPlacementView"
|
89
142
|
optional :parental_status_view, :message, 45, "google.ads.googleads.v0.resources.ParentalStatusView"
|
90
143
|
optional :product_group_view, :message, 54, "google.ads.googleads.v0.resources.ProductGroupView"
|
91
144
|
optional :recommendation, :message, 22, "google.ads.googleads.v0.resources.Recommendation"
|
145
|
+
optional :search_term_view, :message, 68, "google.ads.googleads.v0.resources.SearchTermView"
|
92
146
|
optional :shared_criterion, :message, 29, "google.ads.googleads.v0.resources.SharedCriterion"
|
93
147
|
optional :shared_set, :message, 27, "google.ads.googleads.v0.resources.SharedSet"
|
94
148
|
optional :topic_view, :message, 44, "google.ads.googleads.v0.resources.TopicView"
|
149
|
+
optional :user_interest, :message, 59, "google.ads.googleads.v0.resources.UserInterest"
|
150
|
+
optional :user_list, :message, 38, "google.ads.googleads.v0.resources.UserList"
|
95
151
|
optional :topic_constant, :message, 31, "google.ads.googleads.v0.resources.TopicConstant"
|
96
152
|
optional :video, :message, 39, "google.ads.googleads.v0.resources.Video"
|
97
153
|
optional :metrics, :message, 4, "google.ads.googleads.v0.common.Metrics"
|
@@ -99,14 +155,72 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
|
|
99
155
|
optional :date, :message, 6, "google.protobuf.StringValue"
|
100
156
|
optional :day_of_week, :enum, 7, "google.ads.googleads.v0.enums.DayOfWeekEnum.DayOfWeek"
|
101
157
|
optional :device, :enum, 8, "google.ads.googleads.v0.enums.DeviceEnum.Device"
|
158
|
+
optional :hotel_booking_window_days, :message, 83, "google.protobuf.Int64Value"
|
159
|
+
optional :hotel_center_id, :message, 72, "google.protobuf.Int64Value"
|
160
|
+
optional :hotel_check_in_date, :message, 73, "google.protobuf.StringValue"
|
161
|
+
optional :hotel_check_in_day_of_week, :enum, 74, "google.ads.googleads.v0.enums.DayOfWeekEnum.DayOfWeek"
|
162
|
+
optional :hotel_city, :message, 75, "google.protobuf.StringValue"
|
163
|
+
optional :hotel_class, :message, 76, "google.protobuf.Int32Value"
|
164
|
+
optional :hotel_country, :message, 77, "google.protobuf.StringValue"
|
165
|
+
optional :hotel_date_selection_type, :enum, 78, "google.ads.googleads.v0.enums.HotelDateSelectionTypeEnum.HotelDateSelectionType"
|
166
|
+
optional :hotel_length_of_stay, :message, 79, "google.protobuf.Int32Value"
|
167
|
+
optional :hotel_state, :message, 81, "google.protobuf.StringValue"
|
102
168
|
optional :hour, :message, 9, "google.protobuf.Int32Value"
|
103
169
|
optional :month, :message, 10, "google.protobuf.StringValue"
|
104
170
|
optional :month_of_year, :enum, 28, "google.ads.googleads.v0.enums.MonthOfYearEnum.MonthOfYear"
|
171
|
+
optional :partner_hotel_id, :message, 82, "google.protobuf.StringValue"
|
172
|
+
optional :placeholder_type, :enum, 65, "google.ads.googleads.v0.enums.PlaceholderTypeEnum.PlaceholderType"
|
105
173
|
optional :quarter, :message, 12, "google.protobuf.StringValue"
|
174
|
+
optional :search_term_match_type, :enum, 56, "google.ads.googleads.v0.enums.SearchTermMatchTypeEnum.SearchTermMatchType"
|
106
175
|
optional :slot, :enum, 13, "google.ads.googleads.v0.enums.SlotEnum.Slot"
|
107
176
|
optional :week, :message, 14, "google.protobuf.StringValue"
|
108
177
|
optional :year, :message, 15, "google.protobuf.Int32Value"
|
109
178
|
end
|
179
|
+
add_message "google.ads.googleads.v0.services.MutateGoogleAdsRequest" do
|
180
|
+
optional :customer_id, :string, 1
|
181
|
+
repeated :mutate_operations, :message, 2, "google.ads.googleads.v0.services.MutateOperation"
|
182
|
+
end
|
183
|
+
add_message "google.ads.googleads.v0.services.MutateGoogleAdsResponse" do
|
184
|
+
repeated :mutate_operation_responses, :message, 1, "google.ads.googleads.v0.services.MutateOperationResponse"
|
185
|
+
end
|
186
|
+
add_message "google.ads.googleads.v0.services.MutateOperation" do
|
187
|
+
oneof :operation do
|
188
|
+
optional :ad_group_ad_operation, :message, 1, "google.ads.googleads.v0.services.AdGroupAdOperation"
|
189
|
+
optional :ad_group_bid_modifier_operation, :message, 2, "google.ads.googleads.v0.services.AdGroupBidModifierOperation"
|
190
|
+
optional :ad_group_criterion_operation, :message, 3, "google.ads.googleads.v0.services.AdGroupCriterionOperation"
|
191
|
+
optional :ad_group_operation, :message, 5, "google.ads.googleads.v0.services.AdGroupOperation"
|
192
|
+
optional :bidding_strategy_operation, :message, 6, "google.ads.googleads.v0.services.BiddingStrategyOperation"
|
193
|
+
optional :campaign_bid_modifier_operation, :message, 7, "google.ads.googleads.v0.services.CampaignBidModifierOperation"
|
194
|
+
optional :campaign_budget_operation, :message, 8, "google.ads.googleads.v0.services.CampaignBudgetOperation"
|
195
|
+
optional :campaign_group_operation, :message, 9, "google.ads.googleads.v0.services.CampaignGroupOperation"
|
196
|
+
optional :campaign_operation, :message, 10, "google.ads.googleads.v0.services.CampaignOperation"
|
197
|
+
optional :campaign_shared_set_operation, :message, 11, "google.ads.googleads.v0.services.CampaignSharedSetOperation"
|
198
|
+
optional :conversion_action_operation, :message, 12, "google.ads.googleads.v0.services.ConversionActionOperation"
|
199
|
+
optional :campaign_criterion_operation, :message, 13, "google.ads.googleads.v0.services.CampaignCriterionOperation"
|
200
|
+
optional :shared_criterion_operation, :message, 14, "google.ads.googleads.v0.services.SharedCriterionOperation"
|
201
|
+
optional :shared_set_operation, :message, 15, "google.ads.googleads.v0.services.SharedSetOperation"
|
202
|
+
optional :user_list_operation, :message, 16, "google.ads.googleads.v0.services.UserListOperation"
|
203
|
+
end
|
204
|
+
end
|
205
|
+
add_message "google.ads.googleads.v0.services.MutateOperationResponse" do
|
206
|
+
oneof :response do
|
207
|
+
optional :ad_group_ad_result, :message, 1, "google.ads.googleads.v0.services.MutateAdGroupAdResult"
|
208
|
+
optional :ad_group_bid_modifier_result, :message, 2, "google.ads.googleads.v0.services.MutateAdGroupBidModifierResult"
|
209
|
+
optional :ad_group_criterion_result, :message, 3, "google.ads.googleads.v0.services.MutateAdGroupCriterionResult"
|
210
|
+
optional :ad_group_result, :message, 5, "google.ads.googleads.v0.services.MutateAdGroupResult"
|
211
|
+
optional :bidding_strategy_result, :message, 6, "google.ads.googleads.v0.services.MutateBiddingStrategyResult"
|
212
|
+
optional :campaign_bid_modifier_result, :message, 7, "google.ads.googleads.v0.services.MutateCampaignBidModifierResult"
|
213
|
+
optional :campaign_budget_result, :message, 8, "google.ads.googleads.v0.services.MutateCampaignBudgetResult"
|
214
|
+
optional :campaign_group_result, :message, 9, "google.ads.googleads.v0.services.MutateCampaignGroupResult"
|
215
|
+
optional :campaign_result, :message, 10, "google.ads.googleads.v0.services.MutateCampaignResult"
|
216
|
+
optional :campaign_shared_set_result, :message, 11, "google.ads.googleads.v0.services.MutateCampaignSharedSetResult"
|
217
|
+
optional :conversion_action_result, :message, 12, "google.ads.googleads.v0.services.MutateConversionActionResult"
|
218
|
+
optional :campaign_criterion_result, :message, 13, "google.ads.googleads.v0.services.MutateCampaignCriterionResult"
|
219
|
+
optional :shared_criterion_result, :message, 14, "google.ads.googleads.v0.services.MutateSharedCriterionResult"
|
220
|
+
optional :shared_set_result, :message, 15, "google.ads.googleads.v0.services.MutateSharedSetResult"
|
221
|
+
optional :user_list_result, :message, 16, "google.ads.googleads.v0.services.MutateUserListResult"
|
222
|
+
end
|
223
|
+
end
|
110
224
|
end
|
111
225
|
|
112
226
|
module Google
|
@@ -117,6 +231,10 @@ module Google
|
|
117
231
|
SearchGoogleAdsRequest = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v0.services.SearchGoogleAdsRequest").msgclass
|
118
232
|
SearchGoogleAdsResponse = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v0.services.SearchGoogleAdsResponse").msgclass
|
119
233
|
GoogleAdsRow = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v0.services.GoogleAdsRow").msgclass
|
234
|
+
MutateGoogleAdsRequest = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v0.services.MutateGoogleAdsRequest").msgclass
|
235
|
+
MutateGoogleAdsResponse = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v0.services.MutateGoogleAdsResponse").msgclass
|
236
|
+
MutateOperation = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v0.services.MutateOperation").msgclass
|
237
|
+
MutateOperationResponse = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v0.services.MutateOperationResponse").msgclass
|
120
238
|
end
|
121
239
|
end
|
122
240
|
end
|
@@ -37,6 +37,8 @@ module Google
|
|
37
37
|
|
38
38
|
# Returns all rows that match the search query.
|
39
39
|
rpc :Search, SearchGoogleAdsRequest, SearchGoogleAdsResponse
|
40
|
+
# Creates, updates, or removes resources. Operation statuses are returned.
|
41
|
+
rpc :Mutate, MutateGoogleAdsRequest, MutateGoogleAdsResponse
|
40
42
|
end
|
41
43
|
|
42
44
|
Stub = Service.rpc_stub_class
|
@@ -0,0 +1,219 @@
|
|
1
|
+
# Copyright 2018 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/v0/services/hotel_performance_view_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
|
+
|
27
|
+
require "google/ads/google_ads/v0/services/hotel_performance_view_service_pb"
|
28
|
+
require "google/ads/google_ads/v0/services/credentials"
|
29
|
+
|
30
|
+
module Google
|
31
|
+
module Ads
|
32
|
+
module GoogleAds
|
33
|
+
module V0
|
34
|
+
module Services
|
35
|
+
# Service to manage Hotel Performance Views.
|
36
|
+
#
|
37
|
+
# @!attribute [r] hotel_performance_view_service_stub
|
38
|
+
# @return [Google::Ads::GoogleAds::V0::Services::HotelPerformanceViewService::Stub]
|
39
|
+
class HotelPerformanceViewServiceClient
|
40
|
+
attr_reader :hotel_performance_view_service_stub
|
41
|
+
|
42
|
+
# The default address of the service.
|
43
|
+
SERVICE_ADDRESS = "googleads.googleapis.com".freeze
|
44
|
+
|
45
|
+
# The default port of the service.
|
46
|
+
DEFAULT_SERVICE_PORT = 443
|
47
|
+
|
48
|
+
# The default set of gRPC interceptors.
|
49
|
+
GRPC_INTERCEPTORS = []
|
50
|
+
|
51
|
+
DEFAULT_TIMEOUT = 30
|
52
|
+
|
53
|
+
# The scopes needed to make gRPC calls to all of the methods defined in
|
54
|
+
# this service.
|
55
|
+
ALL_SCOPES = [
|
56
|
+
].freeze
|
57
|
+
|
58
|
+
|
59
|
+
HOTEL_PERFORMANCE_VIEW_PATH_TEMPLATE = Google::Gax::PathTemplate.new(
|
60
|
+
"customers/{customer}/hotelPerformanceView"
|
61
|
+
)
|
62
|
+
|
63
|
+
private_constant :HOTEL_PERFORMANCE_VIEW_PATH_TEMPLATE
|
64
|
+
|
65
|
+
# Returns a fully-qualified hotel_performance_view resource name string.
|
66
|
+
# @param customer [String]
|
67
|
+
# @return [String]
|
68
|
+
def self.hotel_performance_view_path customer
|
69
|
+
HOTEL_PERFORMANCE_VIEW_PATH_TEMPLATE.render(
|
70
|
+
:"customer" => customer
|
71
|
+
)
|
72
|
+
end
|
73
|
+
|
74
|
+
# @param credentials [Google::Auth::Credentials, String, Hash, GRPC::Core::Channel, GRPC::Core::ChannelCredentials, Proc]
|
75
|
+
# Provides the means for authenticating requests made by the client. This parameter can
|
76
|
+
# be many types.
|
77
|
+
# A `Google::Auth::Credentials` uses a the properties of its represented keyfile for
|
78
|
+
# authenticating requests made by this client.
|
79
|
+
# A `String` will be treated as the path to the keyfile to be used for the construction of
|
80
|
+
# credentials for this client.
|
81
|
+
# A `Hash` will be treated as the contents of a keyfile to be used for the construction of
|
82
|
+
# credentials for this client.
|
83
|
+
# A `GRPC::Core::Channel` will be used to make calls through.
|
84
|
+
# A `GRPC::Core::ChannelCredentials` for the setting up the RPC client. The channel credentials
|
85
|
+
# should already be composed with a `GRPC::Core::CallCredentials` object.
|
86
|
+
# A `Proc` will be used as an updater_proc for the Grpc channel. The proc transforms the
|
87
|
+
# metadata for requests, generally, to give OAuth credentials.
|
88
|
+
# @param scopes [Array<String>]
|
89
|
+
# The OAuth scopes for this service. This parameter is ignored if
|
90
|
+
# an updater_proc is supplied.
|
91
|
+
# @param client_config [Hash]
|
92
|
+
# A Hash for call options for each method. See
|
93
|
+
# Google::Gax#construct_settings for the structure of
|
94
|
+
# this data. Falls back to the default config if not specified
|
95
|
+
# or the specified config is missing data points.
|
96
|
+
# @param timeout [Numeric]
|
97
|
+
# The default timeout, in seconds, for calls made through this client.
|
98
|
+
# @param metadata [Hash]
|
99
|
+
# Default metadata to be sent with each request. This can be overridden on a per call basis.
|
100
|
+
# @param exception_transformer [Proc]
|
101
|
+
# An optional proc that intercepts any exceptions raised during an API call to inject
|
102
|
+
# custom error handling.
|
103
|
+
def initialize \
|
104
|
+
credentials: nil,
|
105
|
+
scopes: ALL_SCOPES,
|
106
|
+
client_config: {},
|
107
|
+
timeout: DEFAULT_TIMEOUT,
|
108
|
+
metadata: nil,
|
109
|
+
exception_transformer: nil,
|
110
|
+
lib_name: nil,
|
111
|
+
lib_version: ""
|
112
|
+
# These require statements are intentionally placed here to initialize
|
113
|
+
# the gRPC module only when it's required.
|
114
|
+
# See https://github.com/googleapis/toolkit/issues/446
|
115
|
+
require "google/gax/grpc"
|
116
|
+
require "google/ads/google_ads/v0/services/hotel_performance_view_service_services_pb"
|
117
|
+
|
118
|
+
credentials ||= Google::Ads::GoogleAds::V0::Services::Credentials.default
|
119
|
+
|
120
|
+
if credentials.is_a?(String) || credentials.is_a?(Hash)
|
121
|
+
updater_proc = Google::Ads::GoogleAds::V0::Services::Credentials.new(credentials).updater_proc
|
122
|
+
end
|
123
|
+
if credentials.is_a?(GRPC::Core::Channel)
|
124
|
+
channel = credentials
|
125
|
+
end
|
126
|
+
if credentials.is_a?(GRPC::Core::ChannelCredentials)
|
127
|
+
chan_creds = credentials
|
128
|
+
end
|
129
|
+
if credentials.is_a?(Proc)
|
130
|
+
updater_proc = credentials
|
131
|
+
end
|
132
|
+
if credentials.is_a?(Google::Auth::Credentials)
|
133
|
+
updater_proc = credentials.updater_proc
|
134
|
+
end
|
135
|
+
|
136
|
+
package_version = Gem.loaded_specs['google-ads-googleads'].version.version
|
137
|
+
|
138
|
+
google_api_client = "gl-ruby/#{RUBY_VERSION}"
|
139
|
+
google_api_client << " #{lib_name}/#{lib_version}" if lib_name
|
140
|
+
google_api_client << " gapic/#{package_version} gax/#{Google::Gax::VERSION}"
|
141
|
+
google_api_client << " grpc/#{GRPC::VERSION}"
|
142
|
+
google_api_client.freeze
|
143
|
+
|
144
|
+
headers = { :"x-goog-api-client" => google_api_client }
|
145
|
+
headers.merge!(metadata) unless metadata.nil?
|
146
|
+
client_config_file = Pathname.new(__dir__).join(
|
147
|
+
"hotel_performance_view_service_client_config.json"
|
148
|
+
)
|
149
|
+
defaults = client_config_file.open do |f|
|
150
|
+
Google::Gax.construct_settings(
|
151
|
+
"google.ads.googleads.v0.services.HotelPerformanceViewService",
|
152
|
+
JSON.parse(f.read),
|
153
|
+
client_config,
|
154
|
+
Google::Gax::Grpc::STATUS_CODE_NAMES,
|
155
|
+
timeout,
|
156
|
+
errors: Google::Gax::Grpc::API_ERRORS,
|
157
|
+
metadata: headers
|
158
|
+
)
|
159
|
+
end
|
160
|
+
|
161
|
+
# Allow overriding the service path/port in subclasses.
|
162
|
+
service_path = self.class::SERVICE_ADDRESS
|
163
|
+
port = self.class::DEFAULT_SERVICE_PORT
|
164
|
+
interceptors = self.class::GRPC_INTERCEPTORS
|
165
|
+
@hotel_performance_view_service_stub = Google::Gax::Grpc.create_stub(
|
166
|
+
service_path,
|
167
|
+
port,
|
168
|
+
chan_creds: chan_creds,
|
169
|
+
channel: channel,
|
170
|
+
updater_proc: updater_proc,
|
171
|
+
scopes: scopes,
|
172
|
+
interceptors: interceptors,
|
173
|
+
&Google::Ads::GoogleAds::V0::Services::HotelPerformanceViewService::Stub.method(:new)
|
174
|
+
)
|
175
|
+
|
176
|
+
@get_hotel_performance_view = Google::Gax.create_api_call(
|
177
|
+
@hotel_performance_view_service_stub.method(:get_hotel_performance_view),
|
178
|
+
defaults["get_hotel_performance_view"],
|
179
|
+
exception_transformer: exception_transformer
|
180
|
+
)
|
181
|
+
end
|
182
|
+
|
183
|
+
# Service calls
|
184
|
+
|
185
|
+
# Returns the requested Hotel Performance View in full detail.
|
186
|
+
#
|
187
|
+
# @param resource_name [String]
|
188
|
+
# Resource name of the Hotel Performance View to fetch.
|
189
|
+
# @param options [Google::Gax::CallOptions]
|
190
|
+
# Overrides the default settings for this call, e.g, timeout,
|
191
|
+
# retries, etc.
|
192
|
+
# @yield [result, operation] Access the result along with the RPC operation
|
193
|
+
# @yieldparam result [Google::Ads::GoogleAds::V0::Resources::HotelPerformanceView]
|
194
|
+
# @yieldparam operation [GRPC::ActiveCall::Operation]
|
195
|
+
# @return [Google::Ads::GoogleAds::V0::Resources::HotelPerformanceView]
|
196
|
+
# @raise [Google::Gax::GaxError] if the RPC is aborted.
|
197
|
+
# @example
|
198
|
+
# require "google/ads/google_ads"
|
199
|
+
#
|
200
|
+
# hotel_performance_view_service_client = Google::Ads::GoogleAds::HotelPerformanceView.new(version: :v0)
|
201
|
+
# formatted_resource_name = Google::Ads::GoogleAds::V0::Services::HotelPerformanceViewServiceClient.hotel_performance_view_path("[CUSTOMER]")
|
202
|
+
# response = hotel_performance_view_service_client.get_hotel_performance_view(formatted_resource_name)
|
203
|
+
|
204
|
+
def get_hotel_performance_view \
|
205
|
+
resource_name,
|
206
|
+
options: nil,
|
207
|
+
&block
|
208
|
+
req = {
|
209
|
+
resource_name: resource_name
|
210
|
+
}.delete_if { |_, v| v.nil? }
|
211
|
+
req = Google::Gax::to_proto(req, Google::Ads::GoogleAds::V0::Services::GetHotelPerformanceViewRequest)
|
212
|
+
@get_hotel_performance_view.call(req, options, &block)
|
213
|
+
end
|
214
|
+
end
|
215
|
+
end
|
216
|
+
end
|
217
|
+
end
|
218
|
+
end
|
219
|
+
end
|