google-ads-googleads 0.4.0 → 0.5.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (317) hide show
  1. checksums.yaml +5 -5
  2. data/ChangeLog +7 -0
  3. data/README.md +6 -6
  4. data/{googleads_config.rb → google_ads_config.rb} +1 -1
  5. data/lib/google/ads/{googleads → google_ads}/config.rb +1 -1
  6. data/lib/google/ads/{googleads → google_ads}/errors.rb +1 -1
  7. data/lib/google/ads/{googleads → google_ads}/field_mask_util.rb +1 -1
  8. data/lib/google/ads/{googleads/googleads_client.rb → google_ads/google_ads_client.rb} +31 -24
  9. data/lib/google/ads/{googleads → google_ads}/patches.rb +0 -0
  10. data/lib/google/ads/{googleads → google_ads}/path_lookup_util.rb +27 -1
  11. data/lib/google/ads/{googleads → google_ads}/proto_lookup_util.rb +78 -10
  12. data/lib/google/ads/{googleads → google_ads}/v0/common/ad_type_infos_pb.rb +5 -2
  13. data/lib/google/ads/{googleads → google_ads}/v0/common/bidding_pb.rb +6 -3
  14. data/lib/google/ads/{googleads → google_ads}/v0/common/criteria_pb.rb +29 -12
  15. data/lib/google/ads/{googleads → google_ads}/v0/common/custom_parameter_pb.rb +2 -2
  16. data/lib/google/ads/{googleads → google_ads}/v0/common/metrics_pb.rb +10 -2
  17. data/lib/google/ads/{googleads → google_ads}/v0/common/policy_pb.rb +8 -4
  18. data/lib/google/ads/{googleads → google_ads}/v0/common/value_pb.rb +2 -2
  19. data/lib/google/ads/google_ads/v0/enums/account_budget_proposal_status_pb.rb +31 -0
  20. data/lib/google/ads/google_ads/v0/enums/account_budget_proposal_type_pb.rb +30 -0
  21. data/lib/google/ads/{googleads → google_ads}/v0/enums/ad_group_ad_status_pb.rb +2 -2
  22. data/lib/google/ads/{googleads → google_ads}/v0/enums/ad_group_criterion_status_pb.rb +2 -2
  23. data/lib/google/ads/{googleads → google_ads}/v0/enums/ad_group_status_pb.rb +2 -2
  24. data/lib/google/ads/{googleads → google_ads}/v0/enums/ad_group_type_pb.rb +4 -2
  25. data/lib/google/ads/{googleads → google_ads}/v0/enums/ad_network_type_pb.rb +2 -2
  26. data/lib/google/ads/{googleads → google_ads}/v0/enums/ad_serving_optimization_status_pb.rb +2 -2
  27. data/lib/google/ads/{googleads → google_ads}/v0/enums/ad_type_pb.rb +3 -2
  28. data/lib/google/ads/{googleads → google_ads}/v0/enums/advertising_channel_sub_type_pb.rb +2 -2
  29. data/lib/google/ads/{googleads → google_ads}/v0/enums/advertising_channel_type_pb.rb +3 -2
  30. data/lib/google/ads/google_ads/v0/enums/attribution_model_pb.rb +33 -0
  31. data/lib/google/ads/{googleads → google_ads}/v0/enums/bid_modifier_source_pb.rb +2 -2
  32. data/lib/google/ads/{googleads → google_ads}/v0/enums/bidding_source_pb.rb +2 -2
  33. data/lib/google/ads/{googleads → google_ads}/v0/enums/bidding_strategy_type_pb.rb +3 -2
  34. data/lib/google/ads/google_ads/v0/enums/billing_setup_status_pb.rb +30 -0
  35. data/lib/google/ads/{googleads → google_ads}/v0/enums/budget_delivery_method_pb.rb +2 -2
  36. data/lib/google/ads/{googleads → google_ads}/v0/enums/budget_status_pb.rb +2 -2
  37. data/lib/google/ads/{googleads → google_ads}/v0/enums/campaign_group_status_pb.rb +2 -2
  38. data/lib/google/ads/{googleads → google_ads}/v0/enums/campaign_serving_status_pb.rb +2 -2
  39. data/lib/google/ads/{googleads → google_ads}/v0/enums/campaign_shared_set_status_pb.rb +2 -2
  40. data/lib/google/ads/{googleads → google_ads}/v0/enums/campaign_status_pb.rb +2 -2
  41. data/lib/google/ads/google_ads/v0/enums/change_status_operation_pb.rb +29 -0
  42. data/lib/google/ads/google_ads/v0/enums/conversion_action_category_pb.rb +32 -0
  43. data/lib/google/ads/google_ads/v0/enums/conversion_action_counting_type_pb.rb +28 -0
  44. data/lib/google/ads/google_ads/v0/enums/conversion_action_status_pb.rb +29 -0
  45. data/lib/google/ads/google_ads/v0/enums/conversion_action_type_pb.rb +34 -0
  46. data/lib/google/ads/{googleads → google_ads}/v0/enums/criterion_type_pb.rb +2 -2
  47. data/lib/google/ads/google_ads/v0/enums/data_driven_model_status_pb.rb +30 -0
  48. data/lib/google/ads/{googleads → google_ads}/v0/enums/day_of_week_pb.rb +2 -2
  49. data/lib/google/ads/{googleads → google_ads}/v0/enums/device_pb.rb +2 -3
  50. data/lib/google/ads/{googleads → google_ads}/v0/enums/google_ads_field_category_pb.rb +2 -2
  51. data/lib/google/ads/{googleads → google_ads}/v0/enums/google_ads_field_data_type_pb.rb +2 -2
  52. data/lib/google/ads/{googleads → google_ads}/v0/enums/hotel_date_selection_type_pb.rb +2 -2
  53. data/lib/google/ads/{googleads → google_ads}/v0/enums/interaction_type_pb.rb +2 -2
  54. data/lib/google/ads/{googleads → google_ads}/v0/enums/keyword_match_type_pb.rb +2 -2
  55. data/lib/google/ads/{googleads → google_ads}/v0/enums/listing_custom_attribute_index_pb.rb +2 -2
  56. data/lib/google/ads/{googleads → google_ads}/v0/enums/listing_group_type_pb.rb +2 -2
  57. data/lib/google/ads/{googleads → google_ads}/v0/enums/minute_of_hour_pb.rb +2 -2
  58. data/lib/google/ads/{googleads → google_ads}/v0/enums/month_of_year_pb.rb +2 -2
  59. data/lib/google/ads/{googleads → google_ads}/v0/enums/page_one_promoted_strategy_goal_pb.rb +2 -2
  60. data/lib/google/ads/google_ads/v0/enums/policy_approval_status_pb.rb +30 -0
  61. data/lib/google/ads/google_ads/v0/enums/policy_review_status_pb.rb +29 -0
  62. data/lib/google/ads/{googleads → google_ads}/v0/enums/policy_topic_entry_type_pb.rb +2 -2
  63. data/lib/google/ads/{googleads → google_ads}/v0/enums/policy_topic_evidence_destination_mismatch_url_type_pb.rb +2 -2
  64. data/lib/google/ads/google_ads/v0/enums/product_channel_exclusivity_pb.rb +28 -0
  65. data/lib/google/ads/google_ads/v0/enums/product_channel_pb.rb +28 -0
  66. data/lib/google/ads/{googleads → google_ads}/v0/enums/product_condition_pb.rb +2 -2
  67. data/lib/google/ads/{googleads → google_ads}/v0/enums/product_type_level_pb.rb +2 -2
  68. data/lib/google/ads/{googleads → google_ads}/v0/enums/quality_score_bucket_pb.rb +2 -2
  69. data/lib/google/ads/{googleads → google_ads}/v0/enums/recommendation_type_pb.rb +2 -2
  70. data/lib/google/ads/google_ads/v0/enums/resource_type_pb.rb +32 -0
  71. data/lib/google/ads/{googleads → google_ads}/v0/enums/shared_set_status_pb.rb +2 -2
  72. data/lib/google/ads/{googleads → google_ads}/v0/enums/shared_set_type_pb.rb +2 -2
  73. data/lib/google/ads/{googleads → google_ads}/v0/enums/slot_pb.rb +2 -2
  74. data/lib/google/ads/google_ads/v0/enums/spending_limit_type_pb.rb +27 -0
  75. data/lib/google/ads/{googleads → google_ads}/v0/enums/target_cpa_opt_in_recommendation_goal_pb.rb +2 -2
  76. data/lib/google/ads/google_ads/v0/enums/time_type_pb.rb +28 -0
  77. data/lib/google/ads/google_ads/v0/enums/tracking_code_page_format_pb.rb +27 -0
  78. data/lib/google/ads/google_ads/v0/enums/tracking_code_type_pb.rb +29 -0
  79. data/lib/google/ads/google_ads/v0/errors/account_budget_proposal_error_pb.rb +48 -0
  80. data/lib/google/ads/{googleads → google_ads}/v0/errors/ad_customizer_error_pb.rb +2 -2
  81. data/lib/google/ads/{googleads → google_ads}/v0/errors/ad_error_pb.rb +2 -2
  82. data/lib/google/ads/{googleads → google_ads}/v0/errors/ad_group_ad_error_pb.rb +2 -2
  83. data/lib/google/ads/{googleads → google_ads}/v0/errors/ad_group_bid_modifier_error_pb.rb +2 -2
  84. data/lib/google/ads/{googleads → google_ads}/v0/errors/ad_group_criterion_error_pb.rb +2 -2
  85. data/lib/google/ads/{googleads → google_ads}/v0/errors/ad_group_error_pb.rb +2 -2
  86. data/lib/google/ads/{googleads → google_ads}/v0/errors/ad_sharing_error_pb.rb +2 -2
  87. data/lib/google/ads/{googleads → google_ads}/v0/errors/adx_error_pb.rb +2 -2
  88. data/lib/google/ads/{googleads → google_ads}/v0/errors/authentication_error_pb.rb +2 -2
  89. data/lib/google/ads/{googleads → google_ads}/v0/errors/authorization_error_pb.rb +2 -2
  90. data/lib/google/ads/{googleads → google_ads}/v0/errors/bidding_error_pb.rb +2 -2
  91. data/lib/google/ads/{googleads → google_ads}/v0/errors/bidding_strategy_error_pb.rb +2 -2
  92. data/lib/google/ads/{googleads → google_ads}/v0/errors/campaign_budget_error_pb.rb +3 -2
  93. data/lib/google/ads/{googleads → google_ads}/v0/errors/campaign_criterion_error_pb.rb +2 -2
  94. data/lib/google/ads/{googleads → google_ads}/v0/errors/campaign_error_pb.rb +2 -2
  95. data/lib/google/ads/{googleads → google_ads}/v0/errors/campaign_group_error_pb.rb +2 -2
  96. data/lib/google/ads/{googleads → google_ads}/v0/errors/campaign_shared_set_error_pb.rb +2 -2
  97. data/lib/google/ads/google_ads/v0/errors/change_status_error_pb.rb +28 -0
  98. data/lib/google/ads/{googleads → google_ads}/v0/errors/collection_size_error_pb.rb +2 -2
  99. data/lib/google/ads/{googleads → google_ads}/v0/errors/context_error_pb.rb +2 -2
  100. data/lib/google/ads/google_ads/v0/errors/conversion_action_error_pb.rb +34 -0
  101. data/lib/google/ads/{googleads → google_ads}/v0/errors/criterion_error_pb.rb +2 -2
  102. data/lib/google/ads/{googleads → google_ads}/v0/errors/database_error_pb.rb +2 -2
  103. data/lib/google/ads/{googleads → google_ads}/v0/errors/date_error_pb.rb +2 -2
  104. data/lib/google/ads/{googleads → google_ads}/v0/errors/date_range_error_pb.rb +2 -2
  105. data/lib/google/ads/{googleads → google_ads}/v0/errors/distinct_error_pb.rb +2 -2
  106. data/lib/google/ads/{googleads → google_ads}/v0/errors/enum_error_pb.rb +2 -2
  107. data/lib/google/ads/{googleads → google_ads}/v0/errors/errors_pb.rb +69 -63
  108. data/lib/google/ads/{googleads → google_ads}/v0/errors/feed_attribute_reference_error_pb.rb +2 -2
  109. data/lib/google/ads/{googleads → google_ads}/v0/errors/field_error_pb.rb +2 -2
  110. data/lib/google/ads/{googleads → google_ads}/v0/errors/field_mask_error_pb.rb +2 -2
  111. data/lib/google/ads/{googleads → google_ads}/v0/errors/function_error_pb.rb +2 -2
  112. data/lib/google/ads/{googleads → google_ads}/v0/errors/function_parsing_error_pb.rb +2 -2
  113. data/lib/google/ads/{googleads → google_ads}/v0/errors/header_error_pb.rb +2 -2
  114. data/lib/google/ads/{googleads → google_ads}/v0/errors/id_error_pb.rb +2 -2
  115. data/lib/google/ads/{googleads → google_ads}/v0/errors/image_error_pb.rb +2 -2
  116. data/lib/google/ads/{googleads → google_ads}/v0/errors/internal_error_pb.rb +2 -2
  117. data/lib/google/ads/{googleads → google_ads}/v0/errors/list_operation_error_pb.rb +2 -2
  118. data/lib/google/ads/{googleads → google_ads}/v0/errors/media_bundle_error_pb.rb +2 -2
  119. data/lib/google/ads/{googleads → google_ads}/v0/errors/media_error_pb.rb +2 -2
  120. data/lib/google/ads/{googleads → google_ads}/v0/errors/multiplier_error_pb.rb +2 -2
  121. data/lib/google/ads/{googleads → google_ads}/v0/errors/mutate_error_pb.rb +3 -2
  122. data/lib/google/ads/{googleads → google_ads}/v0/errors/new_resource_creation_error_pb.rb +2 -2
  123. data/lib/google/ads/{googleads → google_ads}/v0/errors/not_empty_error_pb.rb +2 -2
  124. data/lib/google/ads/{googleads → google_ads}/v0/errors/null_error_pb.rb +2 -2
  125. data/lib/google/ads/{googleads → google_ads}/v0/errors/operation_access_denied_error_pb.rb +2 -2
  126. data/lib/google/ads/{googleads → google_ads}/v0/errors/operator_error_pb.rb +2 -2
  127. data/lib/google/ads/{googleads → google_ads}/v0/errors/policy_finding_error_pb.rb +3 -2
  128. data/lib/google/ads/{googleads → google_ads}/v0/errors/query_error_pb.rb +2 -2
  129. data/lib/google/ads/{googleads → google_ads}/v0/errors/quota_error_pb.rb +2 -2
  130. data/lib/google/ads/{googleads → google_ads}/v0/errors/range_error_pb.rb +2 -2
  131. data/lib/google/ads/{googleads → google_ads}/v0/errors/recommendation_error_pb.rb +3 -2
  132. data/lib/google/ads/{googleads → google_ads}/v0/errors/region_code_error_pb.rb +2 -2
  133. data/lib/google/ads/{googleads → google_ads}/v0/errors/request_error_pb.rb +2 -2
  134. data/lib/google/ads/{googleads → google_ads}/v0/errors/resource_access_denied_error_pb.rb +2 -2
  135. data/lib/google/ads/{googleads → google_ads}/v0/errors/resource_count_limit_exceeded_error_pb.rb +2 -2
  136. data/lib/google/ads/{googleads → google_ads}/v0/errors/setting_error_pb.rb +2 -2
  137. data/lib/google/ads/{googleads → google_ads}/v0/errors/shared_criterion_error_pb.rb +2 -2
  138. data/lib/google/ads/{googleads → google_ads}/v0/errors/shared_set_error_pb.rb +2 -2
  139. data/lib/google/ads/{googleads → google_ads}/v0/errors/string_format_error_pb.rb +2 -2
  140. data/lib/google/ads/{googleads → google_ads}/v0/errors/string_length_error_pb.rb +2 -2
  141. data/lib/google/ads/{googleads → google_ads}/v0/errors/url_field_error_pb.rb +2 -2
  142. data/lib/google/ads/google_ads/v0/resources/account_budget_pb.rb +22 -0
  143. data/lib/google/ads/google_ads/v0/resources/account_budget_proposal_pb.rb +49 -0
  144. data/lib/google/ads/google_ads/v0/resources/ad_group_ad_pb.rb +38 -0
  145. data/lib/google/ads/{googleads → google_ads}/v0/resources/ad_group_bid_modifier_pb.rb +4 -4
  146. data/lib/google/ads/{googleads → google_ads}/v0/resources/ad_group_criterion_pb.rb +8 -8
  147. data/lib/google/ads/{googleads → google_ads}/v0/resources/ad_group_pb.rb +5 -5
  148. data/lib/google/ads/{googleads → google_ads}/v0/resources/ad_pb.rb +9 -5
  149. data/lib/google/ads/{googleads → google_ads}/v0/resources/bidding_strategy_pb.rb +4 -4
  150. data/lib/google/ads/google_ads/v0/resources/billing_setup_pb.rb +31 -0
  151. data/lib/google/ads/{googleads → google_ads}/v0/resources/campaign_bid_modifier_pb.rb +3 -3
  152. data/lib/google/ads/{googleads → google_ads}/v0/resources/campaign_budget_pb.rb +4 -4
  153. data/lib/google/ads/{googleads → google_ads}/v0/resources/campaign_criterion_pb.rb +4 -4
  154. data/lib/google/ads/{googleads → google_ads}/v0/resources/campaign_group_pb.rb +3 -3
  155. data/lib/google/ads/{googleads → google_ads}/v0/resources/campaign_pb.rb +11 -10
  156. data/lib/google/ads/{googleads → google_ads}/v0/resources/campaign_shared_set_pb.rb +3 -3
  157. data/lib/google/ads/google_ads/v0/resources/change_status_pb.rb +33 -0
  158. data/lib/google/ads/google_ads/v0/resources/conversion_action_pb.rb +64 -0
  159. data/lib/google/ads/{googleads → google_ads}/v0/resources/customer_pb.rb +2 -2
  160. data/lib/google/ads/{googleads → google_ads}/v0/resources/geo_target_constant_pb.rb +2 -2
  161. data/lib/google/ads/{googleads → google_ads}/v0/resources/google_ads_field_pb.rb +4 -4
  162. data/lib/google/ads/{googleads → google_ads}/v0/resources/keyword_view_pb.rb +2 -2
  163. data/lib/google/ads/{googleads → google_ads}/v0/resources/recommendation_pb.rb +6 -6
  164. data/lib/google/ads/{googleads → google_ads}/v0/resources/shared_criterion_pb.rb +4 -4
  165. data/lib/google/ads/{googleads → google_ads}/v0/resources/shared_set_pb.rb +4 -4
  166. data/lib/google/ads/google_ads/v0/resources/video_pb.rb +27 -0
  167. data/lib/google/ads/google_ads/v0/services/account_budget_proposal_service_client.rb +280 -0
  168. data/lib/google/ads/google_ads/v0/services/account_budget_proposal_service_client_config.json +36 -0
  169. data/lib/google/ads/google_ads/v0/services/account_budget_proposal_service_pb.rb +46 -0
  170. data/lib/google/ads/google_ads/v0/services/account_budget_proposal_service_services_pb.rb +63 -0
  171. data/lib/google/ads/{googleads → google_ads}/v0/services/ad_group_ad_service_client.rb +22 -22
  172. data/lib/google/ads/{googleads → google_ads}/v0/services/ad_group_ad_service_client_config.json +0 -0
  173. data/lib/google/ads/{googleads → google_ads}/v0/services/ad_group_ad_service_pb.rb +5 -3
  174. data/lib/google/ads/{googleads → google_ads}/v0/services/ad_group_ad_service_services_pb.rb +4 -4
  175. data/lib/google/ads/{googleads → google_ads}/v0/services/ad_group_bid_modifier_service_client.rb +22 -22
  176. data/lib/google/ads/{googleads → google_ads}/v0/services/ad_group_bid_modifier_service_client_config.json +0 -0
  177. data/lib/google/ads/{googleads → google_ads}/v0/services/ad_group_bid_modifier_service_pb.rb +3 -3
  178. data/lib/google/ads/{googleads → google_ads}/v0/services/ad_group_bid_modifier_service_services_pb.rb +4 -4
  179. data/lib/google/ads/{googleads → google_ads}/v0/services/ad_group_criterion_service_client.rb +22 -22
  180. data/lib/google/ads/{googleads → google_ads}/v0/services/ad_group_criterion_service_client_config.json +0 -0
  181. data/lib/google/ads/{googleads → google_ads}/v0/services/ad_group_criterion_service_pb.rb +3 -3
  182. data/lib/google/ads/{googleads → google_ads}/v0/services/ad_group_criterion_service_services_pb.rb +4 -4
  183. data/lib/google/ads/{googleads → google_ads}/v0/services/ad_group_service_client.rb +22 -22
  184. data/lib/google/ads/{googleads → google_ads}/v0/services/ad_group_service_client_config.json +0 -0
  185. data/lib/google/ads/{googleads → google_ads}/v0/services/ad_group_service_pb.rb +3 -3
  186. data/lib/google/ads/{googleads → google_ads}/v0/services/ad_group_service_services_pb.rb +4 -4
  187. data/lib/google/ads/{googleads → google_ads}/v0/services/bidding_strategy_service_client.rb +22 -22
  188. data/lib/google/ads/{googleads → google_ads}/v0/services/bidding_strategy_service_client_config.json +0 -0
  189. data/lib/google/ads/{googleads → google_ads}/v0/services/bidding_strategy_service_pb.rb +3 -3
  190. data/lib/google/ads/{googleads → google_ads}/v0/services/bidding_strategy_service_services_pb.rb +4 -4
  191. data/lib/google/ads/google_ads/v0/services/billing_setup_service_client.rb +276 -0
  192. data/lib/google/ads/google_ads/v0/services/billing_setup_service_client_config.json +36 -0
  193. data/lib/google/ads/google_ads/v0/services/billing_setup_service_pb.rb +43 -0
  194. data/lib/google/ads/google_ads/v0/services/billing_setup_service_services_pb.rb +59 -0
  195. data/lib/google/ads/{googleads → google_ads}/v0/services/campaign_bid_modifier_service_client.rb +22 -22
  196. data/lib/google/ads/{googleads → google_ads}/v0/services/campaign_bid_modifier_service_client_config.json +0 -0
  197. data/lib/google/ads/{googleads → google_ads}/v0/services/campaign_bid_modifier_service_pb.rb +3 -3
  198. data/lib/google/ads/{googleads → google_ads}/v0/services/campaign_bid_modifier_service_services_pb.rb +4 -4
  199. data/lib/google/ads/{googleads → google_ads}/v0/services/campaign_budget_service_client.rb +22 -22
  200. data/lib/google/ads/{googleads → google_ads}/v0/services/campaign_budget_service_client_config.json +0 -0
  201. data/lib/google/ads/{googleads → google_ads}/v0/services/campaign_budget_service_pb.rb +3 -3
  202. data/lib/google/ads/{googleads → google_ads}/v0/services/campaign_budget_service_services_pb.rb +4 -4
  203. data/lib/google/ads/{googleads → google_ads}/v0/services/campaign_criterion_service_client.rb +22 -22
  204. data/lib/google/ads/{googleads → google_ads}/v0/services/campaign_criterion_service_client_config.json +0 -0
  205. data/lib/google/ads/{googleads → google_ads}/v0/services/campaign_criterion_service_pb.rb +3 -3
  206. data/lib/google/ads/{googleads → google_ads}/v0/services/campaign_criterion_service_services_pb.rb +4 -4
  207. data/lib/google/ads/{googleads → google_ads}/v0/services/campaign_group_service_client.rb +22 -22
  208. data/lib/google/ads/{googleads → google_ads}/v0/services/campaign_group_service_client_config.json +0 -0
  209. data/lib/google/ads/{googleads → google_ads}/v0/services/campaign_group_service_pb.rb +3 -3
  210. data/lib/google/ads/{googleads → google_ads}/v0/services/campaign_group_service_services_pb.rb +4 -4
  211. data/lib/google/ads/{googleads → google_ads}/v0/services/campaign_service_client.rb +22 -22
  212. data/lib/google/ads/{googleads → google_ads}/v0/services/campaign_service_client_config.json +0 -0
  213. data/lib/google/ads/{googleads → google_ads}/v0/services/campaign_service_pb.rb +3 -3
  214. data/lib/google/ads/{googleads → google_ads}/v0/services/campaign_service_services_pb.rb +4 -4
  215. data/lib/google/ads/{googleads → google_ads}/v0/services/campaign_shared_set_service_client.rb +22 -22
  216. data/lib/google/ads/{googleads → google_ads}/v0/services/campaign_shared_set_service_client_config.json +0 -0
  217. data/lib/google/ads/{googleads → google_ads}/v0/services/campaign_shared_set_service_pb.rb +3 -3
  218. data/lib/google/ads/{googleads → google_ads}/v0/services/campaign_shared_set_service_services_pb.rb +4 -4
  219. data/lib/google/ads/google_ads/v0/services/change_status_service_client.rb +221 -0
  220. data/lib/google/ads/google_ads/v0/services/change_status_service_client_config.json +31 -0
  221. data/lib/google/ads/google_ads/v0/services/change_status_service_pb.rb +24 -0
  222. data/lib/google/ads/google_ads/v0/services/change_status_service_services_pb.rb +48 -0
  223. data/lib/google/ads/google_ads/v0/services/conversion_action_service_client.rb +268 -0
  224. data/lib/google/ads/google_ads/v0/services/conversion_action_service_client_config.json +36 -0
  225. data/lib/google/ads/google_ads/v0/services/conversion_action_service_pb.rb +47 -0
  226. data/lib/google/ads/google_ads/v0/services/conversion_action_service_services_pb.rb +51 -0
  227. data/lib/google/ads/{googleads → google_ads}/v0/services/credentials.rb +5 -5
  228. data/lib/google/ads/{googleads → google_ads}/v0/services/customer_service_client.rb +15 -15
  229. data/lib/google/ads/{googleads → google_ads}/v0/services/customer_service_client_config.json +0 -0
  230. data/lib/google/ads/{googleads → google_ads}/v0/services/customer_service_pb.rb +3 -3
  231. data/lib/google/ads/{googleads → google_ads}/v0/services/customer_service_services_pb.rb +4 -4
  232. data/lib/google/ads/{googleads → google_ads}/v0/services/geo_target_constant_service_client.rb +15 -15
  233. data/lib/google/ads/{googleads → google_ads}/v0/services/geo_target_constant_service_client_config.json +0 -0
  234. data/lib/google/ads/{googleads → google_ads}/v0/services/geo_target_constant_service_pb.rb +3 -3
  235. data/lib/google/ads/{googleads → google_ads}/v0/services/geo_target_constant_service_services_pb.rb +4 -4
  236. data/lib/google/ads/{googleads → google_ads}/v0/services/google_ads_field_service_client.rb +21 -21
  237. data/lib/google/ads/{googleads → google_ads}/v0/services/google_ads_field_service_client_config.json +0 -0
  238. data/lib/google/ads/{googleads → google_ads}/v0/services/google_ads_field_service_pb.rb +3 -3
  239. data/lib/google/ads/{googleads → google_ads}/v0/services/google_ads_field_service_services_pb.rb +4 -4
  240. data/lib/google/ads/{googleads → google_ads}/v0/services/google_ads_service_client.rb +15 -15
  241. data/lib/google/ads/{googleads → google_ads}/v0/services/google_ads_service_client_config.json +0 -0
  242. data/lib/google/ads/{googleads → google_ads}/v0/services/google_ads_service_pb.rb +35 -25
  243. data/lib/google/ads/{googleads → google_ads}/v0/services/google_ads_service_services_pb.rb +3 -3
  244. data/lib/google/ads/{googleads → google_ads}/v0/services/keyword_view_service_client.rb +15 -15
  245. data/lib/google/ads/{googleads → google_ads}/v0/services/keyword_view_service_client_config.json +0 -0
  246. data/lib/google/ads/{googleads → google_ads}/v0/services/keyword_view_service_pb.rb +3 -3
  247. data/lib/google/ads/{googleads → google_ads}/v0/services/keyword_view_service_services_pb.rb +4 -4
  248. data/lib/google/ads/{googleads → google_ads}/v0/services/recommendation_service_client.rb +22 -22
  249. data/lib/google/ads/{googleads → google_ads}/v0/services/recommendation_service_client_config.json +0 -0
  250. data/lib/google/ads/{googleads → google_ads}/v0/services/recommendation_service_pb.rb +5 -5
  251. data/lib/google/ads/{googleads → google_ads}/v0/services/recommendation_service_services_pb.rb +4 -4
  252. data/lib/google/ads/{googleads → google_ads}/v0/services/shared_criterion_service_client.rb +22 -22
  253. data/lib/google/ads/{googleads → google_ads}/v0/services/shared_criterion_service_client_config.json +0 -0
  254. data/lib/google/ads/{googleads → google_ads}/v0/services/shared_criterion_service_pb.rb +3 -3
  255. data/lib/google/ads/{googleads → google_ads}/v0/services/shared_criterion_service_services_pb.rb +4 -4
  256. data/lib/google/ads/{googleads → google_ads}/v0/services/shared_set_service_client.rb +22 -22
  257. data/lib/google/ads/{googleads → google_ads}/v0/services/shared_set_service_client_config.json +0 -0
  258. data/lib/google/ads/{googleads → google_ads}/v0/services/shared_set_service_pb.rb +3 -3
  259. data/lib/google/ads/{googleads → google_ads}/v0/services/shared_set_service_services_pb.rb +4 -4
  260. data/lib/google/ads/google_ads/v0/services/video_service_client.rb +221 -0
  261. data/lib/google/ads/google_ads/v0/services/video_service_client_config.json +31 -0
  262. data/lib/google/ads/google_ads/v0/services/video_service_pb.rb +24 -0
  263. data/lib/google/ads/google_ads/v0/services/video_service_services_pb.rb +48 -0
  264. data/lib/google/ads/{googleads → google_ads}/version.rb +2 -2
  265. data/lib/google/ads/{googleads → google_ads}/wrapper_util.rb +1 -1
  266. data/lib/google/ads/{googleads.rb → google_ads.rb} +2 -2
  267. metadata +266 -267
  268. data/lib/google/ads/googleads/v0/resources/ad_group_ad_pb.rb +0 -28
  269. data/lib/google/ads/googleads/v0/services/doc/google/ads/googleads/v0/common/ad_type_infos.rb +0 -120
  270. data/lib/google/ads/googleads/v0/services/doc/google/ads/googleads/v0/common/bidding.rb +0 -176
  271. data/lib/google/ads/googleads/v0/services/doc/google/ads/googleads/v0/common/criteria.rb +0 -225
  272. data/lib/google/ads/googleads/v0/services/doc/google/ads/googleads/v0/common/custom_parameter.rb +0 -33
  273. data/lib/google/ads/googleads/v0/services/doc/google/ads/googleads/v0/common/metrics.rb +0 -208
  274. data/lib/google/ads/googleads/v0/services/doc/google/ads/googleads/v0/resources/ad.rb +0 -79
  275. data/lib/google/ads/googleads/v0/services/doc/google/ads/googleads/v0/resources/ad_group.rb +0 -87
  276. data/lib/google/ads/googleads/v0/services/doc/google/ads/googleads/v0/resources/ad_group_ad.rb +0 -43
  277. data/lib/google/ads/googleads/v0/services/doc/google/ads/googleads/v0/resources/ad_group_bid_modifier.rb +0 -70
  278. data/lib/google/ads/googleads/v0/services/doc/google/ads/googleads/v0/resources/ad_group_criterion.rb +0 -148
  279. data/lib/google/ads/googleads/v0/services/doc/google/ads/googleads/v0/resources/bidding_strategy.rb +0 -73
  280. data/lib/google/ads/googleads/v0/services/doc/google/ads/googleads/v0/resources/campaign.rb +0 -223
  281. data/lib/google/ads/googleads/v0/services/doc/google/ads/googleads/v0/resources/campaign_bid_modifier.rb +0 -46
  282. data/lib/google/ads/googleads/v0/services/doc/google/ads/googleads/v0/resources/campaign_budget.rb +0 -88
  283. data/lib/google/ads/googleads/v0/services/doc/google/ads/googleads/v0/resources/campaign_criterion.rb +0 -66
  284. data/lib/google/ads/googleads/v0/services/doc/google/ads/googleads/v0/resources/campaign_group.rb +0 -49
  285. data/lib/google/ads/googleads/v0/services/doc/google/ads/googleads/v0/resources/campaign_shared_set.rb +0 -47
  286. data/lib/google/ads/googleads/v0/services/doc/google/ads/googleads/v0/resources/customer.rb +0 -57
  287. data/lib/google/ads/googleads/v0/services/doc/google/ads/googleads/v0/resources/geo_target_constant.rb +0 -44
  288. data/lib/google/ads/googleads/v0/services/doc/google/ads/googleads/v0/resources/google_ads_field.rb +0 -89
  289. data/lib/google/ads/googleads/v0/services/doc/google/ads/googleads/v0/resources/keyword_view.rb +0 -32
  290. data/lib/google/ads/googleads/v0/services/doc/google/ads/googleads/v0/resources/recommendation.rb +0 -223
  291. data/lib/google/ads/googleads/v0/services/doc/google/ads/googleads/v0/resources/shared_criterion.rb +0 -46
  292. data/lib/google/ads/googleads/v0/services/doc/google/ads/googleads/v0/resources/shared_set.rb +0 -56
  293. data/lib/google/ads/googleads/v0/services/doc/google/ads/googleads/v0/services/ad_group_ad_service.rb +0 -68
  294. data/lib/google/ads/googleads/v0/services/doc/google/ads/googleads/v0/services/ad_group_bid_modifier_service.rb +0 -71
  295. data/lib/google/ads/googleads/v0/services/doc/google/ads/googleads/v0/services/ad_group_criterion_service.rb +0 -69
  296. data/lib/google/ads/googleads/v0/services/doc/google/ads/googleads/v0/services/ad_group_service.rb +0 -68
  297. data/lib/google/ads/googleads/v0/services/doc/google/ads/googleads/v0/services/bidding_strategy_service.rb +0 -70
  298. data/lib/google/ads/googleads/v0/services/doc/google/ads/googleads/v0/services/campaign_bid_modifier_service.rb +0 -71
  299. data/lib/google/ads/googleads/v0/services/doc/google/ads/googleads/v0/services/campaign_budget_service.rb +0 -69
  300. data/lib/google/ads/googleads/v0/services/doc/google/ads/googleads/v0/services/campaign_criterion_service.rb +0 -69
  301. data/lib/google/ads/googleads/v0/services/doc/google/ads/googleads/v0/services/campaign_group_service.rb +0 -70
  302. data/lib/google/ads/googleads/v0/services/doc/google/ads/googleads/v0/services/campaign_service.rb +0 -69
  303. data/lib/google/ads/googleads/v0/services/doc/google/ads/googleads/v0/services/campaign_shared_set_service.rb +0 -64
  304. data/lib/google/ads/googleads/v0/services/doc/google/ads/googleads/v0/services/customer_service.rb +0 -29
  305. data/lib/google/ads/googleads/v0/services/doc/google/ads/googleads/v0/services/geo_target_constant_service.rb +0 -29
  306. data/lib/google/ads/googleads/v0/services/doc/google/ads/googleads/v0/services/google_ads_field_service.rb +0 -59
  307. data/lib/google/ads/googleads/v0/services/doc/google/ads/googleads/v0/services/google_ads_service.rb +0 -156
  308. data/lib/google/ads/googleads/v0/services/doc/google/ads/googleads/v0/services/keyword_view_service.rb +0 -29
  309. data/lib/google/ads/googleads/v0/services/doc/google/ads/googleads/v0/services/recommendation_service.rb +0 -112
  310. data/lib/google/ads/googleads/v0/services/doc/google/ads/googleads/v0/services/shared_criterion_service.rb +0 -64
  311. data/lib/google/ads/googleads/v0/services/doc/google/ads/googleads/v0/services/shared_set_service.rb +0 -69
  312. data/lib/google/ads/googleads/v0/services/doc/google/protobuf/any.rb +0 -124
  313. data/lib/google/ads/googleads/v0/services/doc/google/protobuf/field_mask.rb +0 -223
  314. data/lib/google/ads/googleads/v0/services/doc/google/protobuf/wrappers.rb +0 -89
  315. data/lib/google/ads/googleads/v0/services/doc/google/rpc/status.rb +0 -83
  316. data/lib/google/ads/googleads/v0/services/doc/overview.rb +0 -82
  317. data/lib/google/ads/googleads/v0/services.rb +0 -1163
@@ -0,0 +1,221 @@
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/change_status_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/change_status_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 fetch change statuses.
36
+ #
37
+ # @!attribute [r] change_status_service_stub
38
+ # @return [Google::Ads::GoogleAds::V0::Services::ChangeStatusService::Stub]
39
+ class ChangeStatusServiceClient
40
+ attr_reader :change_status_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
+ CHANGE_STATUS_PATH_TEMPLATE = Google::Gax::PathTemplate.new(
60
+ "customers/{customer}/changeStatus/{change_status}"
61
+ )
62
+
63
+ private_constant :CHANGE_STATUS_PATH_TEMPLATE
64
+
65
+ # Returns a fully-qualified change_status resource name string.
66
+ # @param customer [String]
67
+ # @param change_status [String]
68
+ # @return [String]
69
+ def self.change_status_path customer, change_status
70
+ CHANGE_STATUS_PATH_TEMPLATE.render(
71
+ :"customer" => customer,
72
+ :"change_status" => change_status
73
+ )
74
+ end
75
+
76
+ # @param credentials [Google::Auth::Credentials, String, Hash, GRPC::Core::Channel, GRPC::Core::ChannelCredentials, Proc]
77
+ # Provides the means for authenticating requests made by the client. This parameter can
78
+ # be many types.
79
+ # A `Google::Auth::Credentials` uses a the properties of its represented keyfile for
80
+ # authenticating requests made by this client.
81
+ # A `String` will be treated as the path to the keyfile to be used for the construction of
82
+ # credentials for this client.
83
+ # A `Hash` will be treated as the contents of a keyfile to be used for the construction of
84
+ # credentials for this client.
85
+ # A `GRPC::Core::Channel` will be used to make calls through.
86
+ # A `GRPC::Core::ChannelCredentials` for the setting up the RPC client. The channel credentials
87
+ # should already be composed with a `GRPC::Core::CallCredentials` object.
88
+ # A `Proc` will be used as an updater_proc for the Grpc channel. The proc transforms the
89
+ # metadata for requests, generally, to give OAuth credentials.
90
+ # @param scopes [Array<String>]
91
+ # The OAuth scopes for this service. This parameter is ignored if
92
+ # an updater_proc is supplied.
93
+ # @param client_config [Hash]
94
+ # A Hash for call options for each method. See
95
+ # Google::Gax#construct_settings for the structure of
96
+ # this data. Falls back to the default config if not specified
97
+ # or the specified config is missing data points.
98
+ # @param timeout [Numeric]
99
+ # The default timeout, in seconds, for calls made through this client.
100
+ # @param metadata [Hash]
101
+ # Default metadata to be sent with each request. This can be overridden on a per call basis.
102
+ # @param exception_transformer [Proc]
103
+ # An optional proc that intercepts any exceptions raised during an API call to inject
104
+ # custom error handling.
105
+ def initialize \
106
+ credentials: nil,
107
+ scopes: ALL_SCOPES,
108
+ client_config: {},
109
+ timeout: DEFAULT_TIMEOUT,
110
+ metadata: nil,
111
+ exception_transformer: nil,
112
+ lib_name: nil,
113
+ lib_version: ""
114
+ # These require statements are intentionally placed here to initialize
115
+ # the gRPC module only when it's required.
116
+ # See https://github.com/googleapis/toolkit/issues/446
117
+ require "google/gax/grpc"
118
+ require "google/ads/google_ads/v0/services/change_status_service_services_pb"
119
+
120
+ credentials ||= Google::Ads::GoogleAds::V0::Services::Credentials.default
121
+
122
+ if credentials.is_a?(String) || credentials.is_a?(Hash)
123
+ updater_proc = Google::Ads::GoogleAds::V0::Services::Credentials.new(credentials).updater_proc
124
+ end
125
+ if credentials.is_a?(GRPC::Core::Channel)
126
+ channel = credentials
127
+ end
128
+ if credentials.is_a?(GRPC::Core::ChannelCredentials)
129
+ chan_creds = credentials
130
+ end
131
+ if credentials.is_a?(Proc)
132
+ updater_proc = credentials
133
+ end
134
+ if credentials.is_a?(Google::Auth::Credentials)
135
+ updater_proc = credentials.updater_proc
136
+ end
137
+
138
+ package_version = Gem.loaded_specs['google-ads-googleads'].version.version
139
+
140
+ google_api_client = "gl-ruby/#{RUBY_VERSION}"
141
+ google_api_client << " #{lib_name}/#{lib_version}" if lib_name
142
+ google_api_client << " gapic/#{package_version} gax/#{Google::Gax::VERSION}"
143
+ google_api_client << " grpc/#{GRPC::VERSION}"
144
+ google_api_client.freeze
145
+
146
+ headers = { :"x-goog-api-client" => google_api_client }
147
+ headers.merge!(metadata) unless metadata.nil?
148
+ client_config_file = Pathname.new(__dir__).join(
149
+ "change_status_service_client_config.json"
150
+ )
151
+ defaults = client_config_file.open do |f|
152
+ Google::Gax.construct_settings(
153
+ "google.ads.googleads.v0.services.ChangeStatusService",
154
+ JSON.parse(f.read),
155
+ client_config,
156
+ Google::Gax::Grpc::STATUS_CODE_NAMES,
157
+ timeout,
158
+ errors: Google::Gax::Grpc::API_ERRORS,
159
+ metadata: headers
160
+ )
161
+ end
162
+
163
+ # Allow overriding the service path/port in subclasses.
164
+ service_path = self.class::SERVICE_ADDRESS
165
+ port = self.class::DEFAULT_SERVICE_PORT
166
+ interceptors = self.class::GRPC_INTERCEPTORS
167
+ @change_status_service_stub = Google::Gax::Grpc.create_stub(
168
+ service_path,
169
+ port,
170
+ chan_creds: chan_creds,
171
+ channel: channel,
172
+ updater_proc: updater_proc,
173
+ scopes: scopes,
174
+ interceptors: interceptors,
175
+ &Google::Ads::GoogleAds::V0::Services::ChangeStatusService::Stub.method(:new)
176
+ )
177
+
178
+ @get_change_status = Google::Gax.create_api_call(
179
+ @change_status_service_stub.method(:get_change_status),
180
+ defaults["get_change_status"],
181
+ exception_transformer: exception_transformer
182
+ )
183
+ end
184
+
185
+ # Service calls
186
+
187
+ # Returns the requested change status in full detail.
188
+ #
189
+ # @param resource_name [String]
190
+ # The resource name of the change status to fetch.
191
+ # @param options [Google::Gax::CallOptions]
192
+ # Overrides the default settings for this call, e.g, timeout,
193
+ # retries, etc.
194
+ # @yield [result, operation] Access the result along with the RPC operation
195
+ # @yieldparam result [Google::Ads::GoogleAds::V0::Resources::ChangeStatus]
196
+ # @yieldparam operation [GRPC::ActiveCall::Operation]
197
+ # @return [Google::Ads::GoogleAds::V0::Resources::ChangeStatus]
198
+ # @raise [Google::Gax::GaxError] if the RPC is aborted.
199
+ # @example
200
+ # require "google/ads/google_ads"
201
+ #
202
+ # change_status_service_client = Google::Ads::GoogleAds::ChangeStatus.new(version: :v0)
203
+ # formatted_resource_name = Google::Ads::GoogleAds::V0::Services::ChangeStatusServiceClient.change_status_path("[CUSTOMER]", "[CHANGE_STATUS]")
204
+ # response = change_status_service_client.get_change_status(formatted_resource_name)
205
+
206
+ def get_change_status \
207
+ resource_name,
208
+ options: nil,
209
+ &block
210
+ req = {
211
+ resource_name: resource_name
212
+ }.delete_if { |_, v| v.nil? }
213
+ req = Google::Gax::to_proto(req, Google::Ads::GoogleAds::V0::Services::GetChangeStatusRequest)
214
+ @get_change_status.call(req, options, &block)
215
+ end
216
+ end
217
+ end
218
+ end
219
+ end
220
+ end
221
+ end
@@ -0,0 +1,31 @@
1
+ {
2
+ "interfaces": {
3
+ "google.ads.googleads.v0.services.ChangeStatusService": {
4
+ "retry_codes": {
5
+ "idempotent": [
6
+ "DEADLINE_EXCEEDED",
7
+ "UNAVAILABLE"
8
+ ],
9
+ "non_idempotent": []
10
+ },
11
+ "retry_params": {
12
+ "default": {
13
+ "initial_retry_delay_millis": 100,
14
+ "retry_delay_multiplier": 1.3,
15
+ "max_retry_delay_millis": 60000,
16
+ "initial_rpc_timeout_millis": 20000,
17
+ "rpc_timeout_multiplier": 1.0,
18
+ "max_rpc_timeout_millis": 20000,
19
+ "total_timeout_millis": 600000
20
+ }
21
+ },
22
+ "methods": {
23
+ "GetChangeStatus": {
24
+ "timeout_millis": 60000,
25
+ "retry_codes_name": "idempotent",
26
+ "retry_params_name": "default"
27
+ }
28
+ }
29
+ }
30
+ }
31
+ }
@@ -0,0 +1,24 @@
1
+ # Generated by the protocol buffer compiler. DO NOT EDIT!
2
+ # source: google/ads/google_ads/v0/services/change_status_service.proto
3
+
4
+ require 'google/protobuf'
5
+
6
+ require 'google/ads/google_ads/v0/resources/change_status_pb'
7
+ require 'google/api/annotations_pb'
8
+ Google::Protobuf::DescriptorPool.generated_pool.build do
9
+ add_message "google.ads.googleads.v0.services.GetChangeStatusRequest" do
10
+ optional :resource_name, :string, 1
11
+ end
12
+ end
13
+
14
+ module Google
15
+ module Ads
16
+ module GoogleAds
17
+ module V0
18
+ module Services
19
+ GetChangeStatusRequest = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v0.services.GetChangeStatusRequest").msgclass
20
+ end
21
+ end
22
+ end
23
+ end
24
+ end
@@ -0,0 +1,48 @@
1
+ # Generated by the protocol buffer compiler. DO NOT EDIT!
2
+ # Source: google/ads/google_ads/v0/services/change_status_service.proto for package 'google.ads.googleads.v0.services'
3
+ # Original file comments:
4
+ # Copyright 2018 Google LLC.
5
+ #
6
+ # Licensed under the Apache License, Version 2.0 (the "License");
7
+ # you may not use this file except in compliance with the License.
8
+ # You may obtain a copy of the License at
9
+ #
10
+ # http://www.apache.org/licenses/LICENSE-2.0
11
+ #
12
+ # Unless required by applicable law or agreed to in writing, software
13
+ # distributed under the License is distributed on an "AS IS" BASIS,
14
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15
+ # See the License for the specific language governing permissions and
16
+ # limitations under the License.
17
+ #
18
+ #
19
+
20
+ require 'grpc'
21
+ require 'google/ads/google_ads/v0/services/change_status_service_pb'
22
+
23
+ module Google
24
+ module Ads
25
+ module GoogleAds
26
+ module V0
27
+ module Services
28
+ module ChangeStatusService
29
+ # Service to fetch change statuses.
30
+ class Service
31
+
32
+ include GRPC::GenericService
33
+
34
+ self.marshal_class_method = :encode
35
+ self.unmarshal_class_method = :decode
36
+ self.service_name = 'google.ads.googleads.v0.services.ChangeStatusService'
37
+
38
+ # Returns the requested change status in full detail.
39
+ rpc :GetChangeStatus, GetChangeStatusRequest, Google::Ads::GoogleAds::V0::Resources::ChangeStatus
40
+ end
41
+
42
+ Stub = Service.rpc_stub_class
43
+ end
44
+ end
45
+ end
46
+ end
47
+ end
48
+ end
@@ -0,0 +1,268 @@
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/conversion_action_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/conversion_action_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 conversion actions.
36
+ #
37
+ # @!attribute [r] conversion_action_service_stub
38
+ # @return [Google::Ads::GoogleAds::V0::Services::ConversionActionService::Stub]
39
+ class ConversionActionServiceClient
40
+ attr_reader :conversion_action_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
+ CONVERSION_ACTION_PATH_TEMPLATE = Google::Gax::PathTemplate.new(
60
+ "customers/{customer}/conversionActions/{conversion_action}"
61
+ )
62
+
63
+ private_constant :CONVERSION_ACTION_PATH_TEMPLATE
64
+
65
+ # Returns a fully-qualified conversion_action resource name string.
66
+ # @param customer [String]
67
+ # @param conversion_action [String]
68
+ # @return [String]
69
+ def self.conversion_action_path customer, conversion_action
70
+ CONVERSION_ACTION_PATH_TEMPLATE.render(
71
+ :"customer" => customer,
72
+ :"conversion_action" => conversion_action
73
+ )
74
+ end
75
+
76
+ # @param credentials [Google::Auth::Credentials, String, Hash, GRPC::Core::Channel, GRPC::Core::ChannelCredentials, Proc]
77
+ # Provides the means for authenticating requests made by the client. This parameter can
78
+ # be many types.
79
+ # A `Google::Auth::Credentials` uses a the properties of its represented keyfile for
80
+ # authenticating requests made by this client.
81
+ # A `String` will be treated as the path to the keyfile to be used for the construction of
82
+ # credentials for this client.
83
+ # A `Hash` will be treated as the contents of a keyfile to be used for the construction of
84
+ # credentials for this client.
85
+ # A `GRPC::Core::Channel` will be used to make calls through.
86
+ # A `GRPC::Core::ChannelCredentials` for the setting up the RPC client. The channel credentials
87
+ # should already be composed with a `GRPC::Core::CallCredentials` object.
88
+ # A `Proc` will be used as an updater_proc for the Grpc channel. The proc transforms the
89
+ # metadata for requests, generally, to give OAuth credentials.
90
+ # @param scopes [Array<String>]
91
+ # The OAuth scopes for this service. This parameter is ignored if
92
+ # an updater_proc is supplied.
93
+ # @param client_config [Hash]
94
+ # A Hash for call options for each method. See
95
+ # Google::Gax#construct_settings for the structure of
96
+ # this data. Falls back to the default config if not specified
97
+ # or the specified config is missing data points.
98
+ # @param timeout [Numeric]
99
+ # The default timeout, in seconds, for calls made through this client.
100
+ # @param metadata [Hash]
101
+ # Default metadata to be sent with each request. This can be overridden on a per call basis.
102
+ # @param exception_transformer [Proc]
103
+ # An optional proc that intercepts any exceptions raised during an API call to inject
104
+ # custom error handling.
105
+ def initialize \
106
+ credentials: nil,
107
+ scopes: ALL_SCOPES,
108
+ client_config: {},
109
+ timeout: DEFAULT_TIMEOUT,
110
+ metadata: nil,
111
+ exception_transformer: nil,
112
+ lib_name: nil,
113
+ lib_version: ""
114
+ # These require statements are intentionally placed here to initialize
115
+ # the gRPC module only when it's required.
116
+ # See https://github.com/googleapis/toolkit/issues/446
117
+ require "google/gax/grpc"
118
+ require "google/ads/google_ads/v0/services/conversion_action_service_services_pb"
119
+
120
+ credentials ||= Google::Ads::GoogleAds::V0::Services::Credentials.default
121
+
122
+ if credentials.is_a?(String) || credentials.is_a?(Hash)
123
+ updater_proc = Google::Ads::GoogleAds::V0::Services::Credentials.new(credentials).updater_proc
124
+ end
125
+ if credentials.is_a?(GRPC::Core::Channel)
126
+ channel = credentials
127
+ end
128
+ if credentials.is_a?(GRPC::Core::ChannelCredentials)
129
+ chan_creds = credentials
130
+ end
131
+ if credentials.is_a?(Proc)
132
+ updater_proc = credentials
133
+ end
134
+ if credentials.is_a?(Google::Auth::Credentials)
135
+ updater_proc = credentials.updater_proc
136
+ end
137
+
138
+ package_version = Gem.loaded_specs['google-ads-googleads'].version.version
139
+
140
+ google_api_client = "gl-ruby/#{RUBY_VERSION}"
141
+ google_api_client << " #{lib_name}/#{lib_version}" if lib_name
142
+ google_api_client << " gapic/#{package_version} gax/#{Google::Gax::VERSION}"
143
+ google_api_client << " grpc/#{GRPC::VERSION}"
144
+ google_api_client.freeze
145
+
146
+ headers = { :"x-goog-api-client" => google_api_client }
147
+ headers.merge!(metadata) unless metadata.nil?
148
+ client_config_file = Pathname.new(__dir__).join(
149
+ "conversion_action_service_client_config.json"
150
+ )
151
+ defaults = client_config_file.open do |f|
152
+ Google::Gax.construct_settings(
153
+ "google.ads.googleads.v0.services.ConversionActionService",
154
+ JSON.parse(f.read),
155
+ client_config,
156
+ Google::Gax::Grpc::STATUS_CODE_NAMES,
157
+ timeout,
158
+ errors: Google::Gax::Grpc::API_ERRORS,
159
+ metadata: headers
160
+ )
161
+ end
162
+
163
+ # Allow overriding the service path/port in subclasses.
164
+ service_path = self.class::SERVICE_ADDRESS
165
+ port = self.class::DEFAULT_SERVICE_PORT
166
+ interceptors = self.class::GRPC_INTERCEPTORS
167
+ @conversion_action_service_stub = Google::Gax::Grpc.create_stub(
168
+ service_path,
169
+ port,
170
+ chan_creds: chan_creds,
171
+ channel: channel,
172
+ updater_proc: updater_proc,
173
+ scopes: scopes,
174
+ interceptors: interceptors,
175
+ &Google::Ads::GoogleAds::V0::Services::ConversionActionService::Stub.method(:new)
176
+ )
177
+
178
+ @get_conversion_action = Google::Gax.create_api_call(
179
+ @conversion_action_service_stub.method(:get_conversion_action),
180
+ defaults["get_conversion_action"],
181
+ exception_transformer: exception_transformer
182
+ )
183
+ @mutate_conversion_actions = Google::Gax.create_api_call(
184
+ @conversion_action_service_stub.method(:mutate_conversion_actions),
185
+ defaults["mutate_conversion_actions"],
186
+ exception_transformer: exception_transformer
187
+ )
188
+ end
189
+
190
+ # Service calls
191
+
192
+ # Returns the requested conversion action.
193
+ #
194
+ # @param resource_name [String]
195
+ # The resource name of the conversion action to fetch.
196
+ # @param options [Google::Gax::CallOptions]
197
+ # Overrides the default settings for this call, e.g, timeout,
198
+ # retries, etc.
199
+ # @yield [result, operation] Access the result along with the RPC operation
200
+ # @yieldparam result [Google::Ads::GoogleAds::V0::Resources::ConversionAction]
201
+ # @yieldparam operation [GRPC::ActiveCall::Operation]
202
+ # @return [Google::Ads::GoogleAds::V0::Resources::ConversionAction]
203
+ # @raise [Google::Gax::GaxError] if the RPC is aborted.
204
+ # @example
205
+ # require "google/ads/google_ads"
206
+ #
207
+ # conversion_action_service_client = Google::Ads::GoogleAds::ConversionAction.new(version: :v0)
208
+ # formatted_resource_name = Google::Ads::GoogleAds::V0::Services::ConversionActionServiceClient.conversion_action_path("[CUSTOMER]", "[CONVERSION_ACTION]")
209
+ # response = conversion_action_service_client.get_conversion_action(formatted_resource_name)
210
+
211
+ def get_conversion_action \
212
+ resource_name,
213
+ options: nil,
214
+ &block
215
+ req = {
216
+ resource_name: resource_name
217
+ }.delete_if { |_, v| v.nil? }
218
+ req = Google::Gax::to_proto(req, Google::Ads::GoogleAds::V0::Services::GetConversionActionRequest)
219
+ @get_conversion_action.call(req, options, &block)
220
+ end
221
+
222
+ # Creates, updates or removes conversion actions. Operation statuses are
223
+ # returned.
224
+ #
225
+ # @param customer_id [String]
226
+ # The ID of the customer whose conversion actions are being modified.
227
+ # @param operations [Array<Google::Ads::GoogleAds::V0::Services::ConversionActionOperation | Hash>]
228
+ # The list of operations to perform on individual conversion actions.
229
+ # A hash of the same form as `Google::Ads::GoogleAds::V0::Services::ConversionActionOperation`
230
+ # can also be provided.
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::V0::Services::MutateConversionActionsResponse]
236
+ # @yieldparam operation [GRPC::ActiveCall::Operation]
237
+ # @return [Google::Ads::GoogleAds::V0::Services::MutateConversionActionsResponse]
238
+ # @raise [Google::Gax::GaxError] if the RPC is aborted.
239
+ # @example
240
+ # require "google/ads/google_ads"
241
+ #
242
+ # conversion_action_service_client = Google::Ads::GoogleAds::ConversionAction.new(version: :v0)
243
+ #
244
+ # # TODO: Initialize +customer_id+:
245
+ # customer_id = ''
246
+ #
247
+ # # TODO: Initialize +operations+:
248
+ # operations = []
249
+ # response = conversion_action_service_client.mutate_conversion_actions(customer_id, operations)
250
+
251
+ def mutate_conversion_actions \
252
+ customer_id,
253
+ operations,
254
+ options: nil,
255
+ &block
256
+ req = {
257
+ customer_id: customer_id,
258
+ operations: operations
259
+ }.delete_if { |_, v| v.nil? }
260
+ req = Google::Gax::to_proto(req, Google::Ads::GoogleAds::V0::Services::MutateConversionActionsRequest)
261
+ @mutate_conversion_actions.call(req, options, &block)
262
+ end
263
+ end
264
+ end
265
+ end
266
+ end
267
+ end
268
+ end
@@ -0,0 +1,36 @@
1
+ {
2
+ "interfaces": {
3
+ "google.ads.googleads.v0.services.ConversionActionService": {
4
+ "retry_codes": {
5
+ "idempotent": [
6
+ "DEADLINE_EXCEEDED",
7
+ "UNAVAILABLE"
8
+ ],
9
+ "non_idempotent": []
10
+ },
11
+ "retry_params": {
12
+ "default": {
13
+ "initial_retry_delay_millis": 100,
14
+ "retry_delay_multiplier": 1.3,
15
+ "max_retry_delay_millis": 60000,
16
+ "initial_rpc_timeout_millis": 20000,
17
+ "rpc_timeout_multiplier": 1.0,
18
+ "max_rpc_timeout_millis": 20000,
19
+ "total_timeout_millis": 600000
20
+ }
21
+ },
22
+ "methods": {
23
+ "GetConversionAction": {
24
+ "timeout_millis": 60000,
25
+ "retry_codes_name": "idempotent",
26
+ "retry_params_name": "default"
27
+ },
28
+ "MutateConversionActions": {
29
+ "timeout_millis": 60000,
30
+ "retry_codes_name": "non_idempotent",
31
+ "retry_params_name": "default"
32
+ }
33
+ }
34
+ }
35
+ }
36
+ }
@@ -0,0 +1,47 @@
1
+ # Generated by the protocol buffer compiler. DO NOT EDIT!
2
+ # source: google/ads/google_ads/v0/services/conversion_action_service.proto
3
+
4
+ require 'google/protobuf'
5
+
6
+ require 'google/ads/google_ads/v0/resources/conversion_action_pb'
7
+ require 'google/api/annotations_pb'
8
+ require 'google/protobuf/field_mask_pb'
9
+ Google::Protobuf::DescriptorPool.generated_pool.build do
10
+ add_message "google.ads.googleads.v0.services.GetConversionActionRequest" do
11
+ optional :resource_name, :string, 1
12
+ end
13
+ add_message "google.ads.googleads.v0.services.MutateConversionActionsRequest" do
14
+ optional :customer_id, :string, 1
15
+ repeated :operations, :message, 2, "google.ads.googleads.v0.services.ConversionActionOperation"
16
+ end
17
+ add_message "google.ads.googleads.v0.services.ConversionActionOperation" do
18
+ optional :update_mask, :message, 4, "google.protobuf.FieldMask"
19
+ oneof :operation do
20
+ optional :create, :message, 1, "google.ads.googleads.v0.resources.ConversionAction"
21
+ optional :update, :message, 2, "google.ads.googleads.v0.resources.ConversionAction"
22
+ optional :remove, :string, 3
23
+ end
24
+ end
25
+ add_message "google.ads.googleads.v0.services.MutateConversionActionsResponse" do
26
+ repeated :results, :message, 2, "google.ads.googleads.v0.services.MutateConversionActionResult"
27
+ end
28
+ add_message "google.ads.googleads.v0.services.MutateConversionActionResult" do
29
+ optional :resource_name, :string, 1
30
+ end
31
+ end
32
+
33
+ module Google
34
+ module Ads
35
+ module GoogleAds
36
+ module V0
37
+ module Services
38
+ GetConversionActionRequest = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v0.services.GetConversionActionRequest").msgclass
39
+ MutateConversionActionsRequest = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v0.services.MutateConversionActionsRequest").msgclass
40
+ ConversionActionOperation = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v0.services.ConversionActionOperation").msgclass
41
+ MutateConversionActionsResponse = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v0.services.MutateConversionActionsResponse").msgclass
42
+ MutateConversionActionResult = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v0.services.MutateConversionActionResult").msgclass
43
+ end
44
+ end
45
+ end
46
+ end
47
+ end