google-ads-googleads 0.5.0 → 0.6.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (138) hide show
  1. checksums.yaml +4 -4
  2. data/ChangeLog +3 -0
  3. data/lib/google/ads/google_ads/google_ads_client.rb +1 -1
  4. data/lib/google/ads/google_ads/path_lookup_util.rb +101 -0
  5. data/lib/google/ads/google_ads/proto_lookup_util.rb +113 -20
  6. data/lib/google/ads/google_ads/v0/common/ad_type_infos_pb.rb +17 -0
  7. data/lib/google/ads/google_ads/v0/common/criteria_pb.rb +60 -0
  8. data/lib/google/ads/google_ads/v0/common/metrics_pb.rb +1 -0
  9. data/lib/google/ads/google_ads/v0/common/tag_snippet_pb.rb +28 -0
  10. data/lib/google/ads/google_ads/v0/enums/account_budget_status_pb.rb +29 -0
  11. data/lib/google/ads/google_ads/v0/enums/ad_group_ad_rotation_mode_pb.rb +28 -0
  12. data/lib/google/ads/google_ads/v0/enums/ad_group_type_pb.rb +4 -0
  13. data/lib/google/ads/google_ads/v0/enums/ad_type_pb.rb +1 -0
  14. data/lib/google/ads/google_ads/v0/enums/advertising_channel_sub_type_pb.rb +3 -0
  15. data/lib/google/ads/google_ads/v0/enums/age_range_type_pb.rb +33 -0
  16. data/lib/google/ads/google_ads/v0/enums/call_conversion_reporting_state_pb.rb +29 -0
  17. data/lib/google/ads/google_ads/v0/enums/change_status_resource_type_pb.rb +31 -0
  18. data/lib/google/ads/google_ads/v0/enums/criterion_type_pb.rb +9 -0
  19. data/lib/google/ads/google_ads/v0/enums/display_ad_format_setting_pb.rb +29 -0
  20. data/lib/google/ads/google_ads/v0/enums/gender_type_pb.rb +29 -0
  21. data/lib/google/ads/google_ads/v0/enums/geo_target_constant_status_pb.rb +28 -0
  22. data/lib/google/ads/google_ads/v0/enums/income_range_type_pb.rb +33 -0
  23. data/lib/google/ads/google_ads/v0/enums/manager_link_status_pb.rb +31 -0
  24. data/lib/google/ads/google_ads/v0/enums/media_type_pb.rb +32 -0
  25. data/lib/google/ads/google_ads/v0/enums/mime_type_pb.rb +38 -0
  26. data/lib/google/ads/google_ads/v0/enums/parental_status_type_pb.rb +29 -0
  27. data/lib/google/ads/google_ads/v0/enums/proximity_radius_units_pb.rb +28 -0
  28. data/lib/google/ads/google_ads/v0/errors/billing_setup_error_pb.rb +41 -0
  29. data/lib/google/ads/google_ads/v0/errors/change_status_error_pb.rb +0 -1
  30. data/lib/google/ads/google_ads/v0/errors/criterion_error_pb.rb +1 -1
  31. data/lib/google/ads/google_ads/v0/errors/customer_client_link_error_pb.rb +33 -0
  32. data/lib/google/ads/google_ads/v0/errors/customer_error_pb.rb +27 -0
  33. data/lib/google/ads/google_ads/v0/errors/customer_manager_link_error_pb.rb +34 -0
  34. data/lib/google/ads/google_ads/v0/errors/errors_pb.rb +12 -2
  35. data/lib/google/ads/google_ads/v0/errors/field_error_pb.rb +1 -0
  36. data/lib/google/ads/google_ads/v0/errors/geo_target_constant_suggestion_error_pb.rb +30 -0
  37. data/lib/google/ads/google_ads/v0/errors/header_error_pb.rb +1 -1
  38. data/lib/google/ads/google_ads/v0/errors/media_file_error_pb.rb +49 -0
  39. data/lib/google/ads/google_ads/v0/errors/request_error_pb.rb +1 -0
  40. data/lib/google/ads/google_ads/v0/errors/resource_count_limit_exceeded_error_pb.rb +1 -0
  41. data/lib/google/ads/google_ads/v0/errors/url_field_error_pb.rb +2 -0
  42. data/lib/google/ads/google_ads/v0/resources/account_budget_pb.rb +54 -0
  43. data/lib/google/ads/google_ads/v0/resources/account_budget_proposal_pb.rb +9 -0
  44. data/lib/google/ads/google_ads/v0/resources/ad_group_audience_view_pb.rb +22 -0
  45. data/lib/google/ads/google_ads/v0/resources/ad_group_criterion_pb.rb +9 -0
  46. data/lib/google/ads/google_ads/v0/resources/ad_group_pb.rb +2 -0
  47. data/lib/google/ads/google_ads/v0/resources/age_range_view_pb.rb +22 -0
  48. data/lib/google/ads/google_ads/v0/resources/billing_setup_pb.rb +15 -5
  49. data/lib/google/ads/google_ads/v0/resources/campaign_criterion_pb.rb +9 -0
  50. data/lib/google/ads/google_ads/v0/resources/campaign_pb.rb +1 -0
  51. data/lib/google/ads/google_ads/v0/resources/change_status_pb.rb +2 -2
  52. data/lib/google/ads/google_ads/v0/resources/conversion_action_pb.rb +2 -10
  53. data/lib/google/ads/google_ads/v0/resources/customer_client_link_pb.rb +28 -0
  54. data/lib/google/ads/google_ads/v0/resources/customer_manager_link_pb.rb +27 -0
  55. data/lib/google/ads/google_ads/v0/resources/customer_pb.rb +7 -0
  56. data/lib/google/ads/google_ads/v0/resources/display_keyword_view_pb.rb +22 -0
  57. data/lib/google/ads/google_ads/v0/resources/gender_view_pb.rb +22 -0
  58. data/lib/google/ads/google_ads/v0/resources/geo_target_constant_pb.rb +2 -0
  59. data/lib/google/ads/google_ads/v0/resources/hotel_group_view_pb.rb +22 -0
  60. data/lib/google/ads/google_ads/v0/resources/managed_placement_view_pb.rb +22 -0
  61. data/lib/google/ads/google_ads/v0/resources/media_file_pb.rb +43 -0
  62. data/lib/google/ads/google_ads/v0/resources/parental_status_view_pb.rb +22 -0
  63. data/lib/google/ads/google_ads/v0/resources/product_group_view_pb.rb +22 -0
  64. data/lib/google/ads/google_ads/v0/resources/shared_criterion_pb.rb +3 -0
  65. data/lib/google/ads/google_ads/v0/resources/topic_constant_pb.rb +26 -0
  66. data/lib/google/ads/google_ads/v0/resources/topic_view_pb.rb +22 -0
  67. data/lib/google/ads/google_ads/v0/services/account_budget_service_client.rb +223 -0
  68. data/lib/google/ads/google_ads/v0/services/account_budget_service_client_config.json +31 -0
  69. data/lib/google/ads/google_ads/v0/services/account_budget_service_pb.rb +24 -0
  70. data/lib/google/ads/google_ads/v0/services/account_budget_service_services_pb.rb +50 -0
  71. data/lib/google/ads/google_ads/v0/services/ad_group_audience_view_service_client.rb +221 -0
  72. data/lib/google/ads/google_ads/v0/services/ad_group_audience_view_service_client_config.json +31 -0
  73. data/lib/google/ads/google_ads/v0/services/ad_group_audience_view_service_pb.rb +24 -0
  74. data/lib/google/ads/google_ads/v0/services/ad_group_audience_view_service_services_pb.rb +48 -0
  75. data/lib/google/ads/google_ads/v0/services/age_range_view_service_client.rb +221 -0
  76. data/lib/google/ads/google_ads/v0/services/age_range_view_service_client_config.json +31 -0
  77. data/lib/google/ads/google_ads/v0/services/age_range_view_service_pb.rb +24 -0
  78. data/lib/google/ads/google_ads/v0/services/age_range_view_service_services_pb.rb +48 -0
  79. data/lib/google/ads/google_ads/v0/services/billing_setup_service_client.rb +2 -3
  80. data/lib/google/ads/google_ads/v0/services/billing_setup_service_pb.rb +1 -0
  81. data/lib/google/ads/google_ads/v0/services/billing_setup_service_services_pb.rb +2 -3
  82. data/lib/google/ads/google_ads/v0/services/customer_client_link_service_client.rb +221 -0
  83. data/lib/google/ads/google_ads/v0/services/customer_client_link_service_client_config.json +31 -0
  84. data/lib/google/ads/google_ads/v0/services/customer_client_link_service_pb.rb +24 -0
  85. data/lib/google/ads/google_ads/v0/services/customer_client_link_service_services_pb.rb +48 -0
  86. data/lib/google/ads/google_ads/v0/services/customer_manager_link_service_client.rb +221 -0
  87. data/lib/google/ads/google_ads/v0/services/customer_manager_link_service_client_config.json +31 -0
  88. data/lib/google/ads/google_ads/v0/services/customer_manager_link_service_pb.rb +24 -0
  89. data/lib/google/ads/google_ads/v0/services/customer_manager_link_service_services_pb.rb +48 -0
  90. data/lib/google/ads/google_ads/v0/services/customer_service_client.rb +27 -0
  91. data/lib/google/ads/google_ads/v0/services/customer_service_client_config.json +5 -0
  92. data/lib/google/ads/google_ads/v0/services/customer_service_pb.rb +8 -0
  93. data/lib/google/ads/google_ads/v0/services/customer_service_services_pb.rb +3 -0
  94. data/lib/google/ads/google_ads/v0/services/display_keyword_view_service_client.rb +221 -0
  95. data/lib/google/ads/google_ads/v0/services/display_keyword_view_service_client_config.json +31 -0
  96. data/lib/google/ads/google_ads/v0/services/display_keyword_view_service_pb.rb +24 -0
  97. data/lib/google/ads/google_ads/v0/services/display_keyword_view_service_services_pb.rb +48 -0
  98. data/lib/google/ads/google_ads/v0/services/gender_view_service_client.rb +221 -0
  99. data/lib/google/ads/google_ads/v0/services/gender_view_service_client_config.json +31 -0
  100. data/lib/google/ads/google_ads/v0/services/gender_view_service_pb.rb +24 -0
  101. data/lib/google/ads/google_ads/v0/services/gender_view_service_services_pb.rb +48 -0
  102. data/lib/google/ads/google_ads/v0/services/geo_target_constant_service_client.rb +53 -0
  103. data/lib/google/ads/google_ads/v0/services/geo_target_constant_service_client_config.json +5 -0
  104. data/lib/google/ads/google_ads/v0/services/geo_target_constant_service_pb.rb +29 -0
  105. data/lib/google/ads/google_ads/v0/services/geo_target_constant_service_services_pb.rb +2 -0
  106. data/lib/google/ads/google_ads/v0/services/google_ads_service_pb.rb +24 -0
  107. data/lib/google/ads/google_ads/v0/services/hotel_group_view_service_client.rb +221 -0
  108. data/lib/google/ads/google_ads/v0/services/hotel_group_view_service_client_config.json +31 -0
  109. data/lib/google/ads/google_ads/v0/services/hotel_group_view_service_pb.rb +24 -0
  110. data/lib/google/ads/google_ads/v0/services/hotel_group_view_service_services_pb.rb +48 -0
  111. data/lib/google/ads/google_ads/v0/services/managed_placement_view_service_client.rb +221 -0
  112. data/lib/google/ads/google_ads/v0/services/managed_placement_view_service_client_config.json +31 -0
  113. data/lib/google/ads/google_ads/v0/services/managed_placement_view_service_pb.rb +24 -0
  114. data/lib/google/ads/google_ads/v0/services/managed_placement_view_service_services_pb.rb +48 -0
  115. data/lib/google/ads/google_ads/v0/services/media_file_service_client.rb +267 -0
  116. data/lib/google/ads/google_ads/v0/services/media_file_service_client_config.json +36 -0
  117. data/lib/google/ads/google_ads/v0/services/media_file_service_pb.rb +43 -0
  118. data/lib/google/ads/google_ads/v0/services/media_file_service_services_pb.rb +50 -0
  119. data/lib/google/ads/google_ads/v0/services/parental_status_view_service_client.rb +221 -0
  120. data/lib/google/ads/google_ads/v0/services/parental_status_view_service_client_config.json +31 -0
  121. data/lib/google/ads/google_ads/v0/services/parental_status_view_service_pb.rb +24 -0
  122. data/lib/google/ads/google_ads/v0/services/parental_status_view_service_services_pb.rb +48 -0
  123. data/lib/google/ads/google_ads/v0/services/product_group_view_service_client.rb +221 -0
  124. data/lib/google/ads/google_ads/v0/services/product_group_view_service_client_config.json +31 -0
  125. data/lib/google/ads/google_ads/v0/services/product_group_view_service_pb.rb +24 -0
  126. data/lib/google/ads/google_ads/v0/services/product_group_view_service_services_pb.rb +48 -0
  127. data/lib/google/ads/google_ads/v0/services/topic_constant_service_client.rb +219 -0
  128. data/lib/google/ads/google_ads/v0/services/topic_constant_service_client_config.json +31 -0
  129. data/lib/google/ads/google_ads/v0/services/topic_constant_service_pb.rb +24 -0
  130. data/lib/google/ads/google_ads/v0/services/topic_constant_service_services_pb.rb +48 -0
  131. data/lib/google/ads/google_ads/v0/services/topic_view_service_client.rb +221 -0
  132. data/lib/google/ads/google_ads/v0/services/topic_view_service_client_config.json +31 -0
  133. data/lib/google/ads/google_ads/v0/services/topic_view_service_pb.rb +24 -0
  134. data/lib/google/ads/google_ads/v0/services/topic_view_service_services_pb.rb +48 -0
  135. data/lib/google/ads/google_ads/version.rb +1 -1
  136. metadata +92 -4
  137. data/lib/google/ads/google_ads/v0/enums/resource_type_pb.rb +0 -32
  138. data/lib/google/ads/google_ads/v0/errors/media_error_pb.rb +0 -50
@@ -0,0 +1,28 @@
1
+ # Generated by the protocol buffer compiler. DO NOT EDIT!
2
+ # source: google/ads/google_ads/v0/resources/customer_client_link.proto
3
+
4
+ require 'google/protobuf'
5
+
6
+ require 'google/ads/google_ads/v0/enums/manager_link_status_pb'
7
+ require 'google/protobuf/wrappers_pb'
8
+ Google::Protobuf::DescriptorPool.generated_pool.build do
9
+ add_message "google.ads.googleads.v0.resources.CustomerClientLink" do
10
+ optional :resource_name, :string, 1
11
+ optional :client_customer, :message, 3, "google.protobuf.StringValue"
12
+ optional :manager_link_id, :message, 4, "google.protobuf.Int64Value"
13
+ optional :status, :enum, 5, "google.ads.googleads.v0.enums.ManagerLinkStatusEnum.ManagerLinkStatus"
14
+ optional :hidden, :message, 6, "google.protobuf.BoolValue"
15
+ end
16
+ end
17
+
18
+ module Google
19
+ module Ads
20
+ module GoogleAds
21
+ module V0
22
+ module Resources
23
+ CustomerClientLink = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v0.resources.CustomerClientLink").msgclass
24
+ end
25
+ end
26
+ end
27
+ end
28
+ end
@@ -0,0 +1,27 @@
1
+ # Generated by the protocol buffer compiler. DO NOT EDIT!
2
+ # source: google/ads/google_ads/v0/resources/customer_manager_link.proto
3
+
4
+ require 'google/protobuf'
5
+
6
+ require 'google/ads/google_ads/v0/enums/manager_link_status_pb'
7
+ require 'google/protobuf/wrappers_pb'
8
+ Google::Protobuf::DescriptorPool.generated_pool.build do
9
+ add_message "google.ads.googleads.v0.resources.CustomerManagerLink" do
10
+ optional :resource_name, :string, 1
11
+ optional :manager_customer, :message, 3, "google.protobuf.StringValue"
12
+ optional :manager_link_id, :message, 4, "google.protobuf.Int64Value"
13
+ optional :status, :enum, 5, "google.ads.googleads.v0.enums.ManagerLinkStatusEnum.ManagerLinkStatus"
14
+ end
15
+ end
16
+
17
+ module Google
18
+ module Ads
19
+ module GoogleAds
20
+ module V0
21
+ module Resources
22
+ CustomerManagerLink = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v0.resources.CustomerManagerLink").msgclass
23
+ end
24
+ end
25
+ end
26
+ end
27
+ end
@@ -14,6 +14,12 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
14
14
  optional :tracking_url_template, :message, 7, "google.protobuf.StringValue"
15
15
  optional :auto_tagging_enabled, :message, 8, "google.protobuf.BoolValue"
16
16
  optional :has_partners_badge, :message, 9, "google.protobuf.BoolValue"
17
+ optional :call_reporting_setting, :message, 10, "google.ads.googleads.v0.resources.CallReportingSetting"
18
+ end
19
+ add_message "google.ads.googleads.v0.resources.CallReportingSetting" do
20
+ optional :call_reporting_enabled, :message, 1, "google.protobuf.BoolValue"
21
+ optional :call_conversion_reporting_enabled, :message, 2, "google.protobuf.BoolValue"
22
+ optional :call_conversion_action, :message, 9, "google.protobuf.StringValue"
17
23
  end
18
24
  end
19
25
 
@@ -23,6 +29,7 @@ module Google
23
29
  module V0
24
30
  module Resources
25
31
  Customer = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v0.resources.Customer").msgclass
32
+ CallReportingSetting = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v0.resources.CallReportingSetting").msgclass
26
33
  end
27
34
  end
28
35
  end
@@ -0,0 +1,22 @@
1
+ # Generated by the protocol buffer compiler. DO NOT EDIT!
2
+ # source: google/ads/google_ads/v0/resources/display_keyword_view.proto
3
+
4
+ require 'google/protobuf'
5
+
6
+ Google::Protobuf::DescriptorPool.generated_pool.build do
7
+ add_message "google.ads.googleads.v0.resources.DisplayKeywordView" do
8
+ optional :resource_name, :string, 1
9
+ end
10
+ end
11
+
12
+ module Google
13
+ module Ads
14
+ module GoogleAds
15
+ module V0
16
+ module Resources
17
+ DisplayKeywordView = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v0.resources.DisplayKeywordView").msgclass
18
+ end
19
+ end
20
+ end
21
+ end
22
+ end
@@ -0,0 +1,22 @@
1
+ # Generated by the protocol buffer compiler. DO NOT EDIT!
2
+ # source: google/ads/google_ads/v0/resources/gender_view.proto
3
+
4
+ require 'google/protobuf'
5
+
6
+ Google::Protobuf::DescriptorPool.generated_pool.build do
7
+ add_message "google.ads.googleads.v0.resources.GenderView" do
8
+ optional :resource_name, :string, 1
9
+ end
10
+ end
11
+
12
+ module Google
13
+ module Ads
14
+ module GoogleAds
15
+ module V0
16
+ module Resources
17
+ GenderView = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v0.resources.GenderView").msgclass
18
+ end
19
+ end
20
+ end
21
+ end
22
+ end
@@ -3,6 +3,7 @@
3
3
 
4
4
  require 'google/protobuf'
5
5
 
6
+ require 'google/ads/google_ads/v0/enums/geo_target_constant_status_pb'
6
7
  require 'google/protobuf/wrappers_pb'
7
8
  Google::Protobuf::DescriptorPool.generated_pool.build do
8
9
  add_message "google.ads.googleads.v0.resources.GeoTargetConstant" do
@@ -11,6 +12,7 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
11
12
  optional :name, :message, 4, "google.protobuf.StringValue"
12
13
  optional :country_code, :message, 5, "google.protobuf.StringValue"
13
14
  optional :target_type, :message, 6, "google.protobuf.StringValue"
15
+ optional :status, :enum, 7, "google.ads.googleads.v0.enums.GeoTargetConstantStatusEnum.GeoTargetConstantStatus"
14
16
  end
15
17
  end
16
18
 
@@ -0,0 +1,22 @@
1
+ # Generated by the protocol buffer compiler. DO NOT EDIT!
2
+ # source: google/ads/google_ads/v0/resources/hotel_group_view.proto
3
+
4
+ require 'google/protobuf'
5
+
6
+ Google::Protobuf::DescriptorPool.generated_pool.build do
7
+ add_message "google.ads.googleads.v0.resources.HotelGroupView" do
8
+ optional :resource_name, :string, 1
9
+ end
10
+ end
11
+
12
+ module Google
13
+ module Ads
14
+ module GoogleAds
15
+ module V0
16
+ module Resources
17
+ HotelGroupView = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v0.resources.HotelGroupView").msgclass
18
+ end
19
+ end
20
+ end
21
+ end
22
+ end
@@ -0,0 +1,22 @@
1
+ # Generated by the protocol buffer compiler. DO NOT EDIT!
2
+ # source: google/ads/google_ads/v0/resources/managed_placement_view.proto
3
+
4
+ require 'google/protobuf'
5
+
6
+ Google::Protobuf::DescriptorPool.generated_pool.build do
7
+ add_message "google.ads.googleads.v0.resources.ManagedPlacementView" do
8
+ optional :resource_name, :string, 1
9
+ end
10
+ end
11
+
12
+ module Google
13
+ module Ads
14
+ module GoogleAds
15
+ module V0
16
+ module Resources
17
+ ManagedPlacementView = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v0.resources.ManagedPlacementView").msgclass
18
+ end
19
+ end
20
+ end
21
+ end
22
+ end
@@ -0,0 +1,43 @@
1
+ # Generated by the protocol buffer compiler. DO NOT EDIT!
2
+ # source: google/ads/google_ads/v0/resources/media_file.proto
3
+
4
+ require 'google/protobuf'
5
+
6
+ require 'google/ads/google_ads/v0/enums/media_type_pb'
7
+ require 'google/ads/google_ads/v0/enums/mime_type_pb'
8
+ require 'google/protobuf/wrappers_pb'
9
+ Google::Protobuf::DescriptorPool.generated_pool.build do
10
+ add_message "google.ads.googleads.v0.resources.MediaFile" do
11
+ optional :resource_name, :string, 1
12
+ optional :id, :message, 2, "google.protobuf.Int64Value"
13
+ optional :type, :enum, 5, "google.ads.googleads.v0.enums.MediaTypeEnum.MediaType"
14
+ optional :mime_type, :enum, 6, "google.ads.googleads.v0.enums.MimeTypeEnum.MimeType"
15
+ optional :source_url, :message, 7, "google.protobuf.StringValue"
16
+ optional :name, :message, 8, "google.protobuf.StringValue"
17
+ optional :file_size, :message, 9, "google.protobuf.Int64Value"
18
+ oneof :mediatype do
19
+ optional :image, :message, 3, "google.ads.googleads.v0.resources.MediaImage"
20
+ optional :media_bundle, :message, 4, "google.ads.googleads.v0.resources.MediaBundle"
21
+ end
22
+ end
23
+ add_message "google.ads.googleads.v0.resources.MediaImage" do
24
+ optional :data, :message, 1, "google.protobuf.BytesValue"
25
+ end
26
+ add_message "google.ads.googleads.v0.resources.MediaBundle" do
27
+ optional :data, :message, 1, "google.protobuf.BytesValue"
28
+ end
29
+ end
30
+
31
+ module Google
32
+ module Ads
33
+ module GoogleAds
34
+ module V0
35
+ module Resources
36
+ MediaFile = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v0.resources.MediaFile").msgclass
37
+ MediaImage = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v0.resources.MediaImage").msgclass
38
+ MediaBundle = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v0.resources.MediaBundle").msgclass
39
+ end
40
+ end
41
+ end
42
+ end
43
+ end
@@ -0,0 +1,22 @@
1
+ # Generated by the protocol buffer compiler. DO NOT EDIT!
2
+ # source: google/ads/google_ads/v0/resources/parental_status_view.proto
3
+
4
+ require 'google/protobuf'
5
+
6
+ Google::Protobuf::DescriptorPool.generated_pool.build do
7
+ add_message "google.ads.googleads.v0.resources.ParentalStatusView" do
8
+ optional :resource_name, :string, 1
9
+ end
10
+ end
11
+
12
+ module Google
13
+ module Ads
14
+ module GoogleAds
15
+ module V0
16
+ module Resources
17
+ ParentalStatusView = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v0.resources.ParentalStatusView").msgclass
18
+ end
19
+ end
20
+ end
21
+ end
22
+ end
@@ -0,0 +1,22 @@
1
+ # Generated by the protocol buffer compiler. DO NOT EDIT!
2
+ # source: google/ads/google_ads/v0/resources/product_group_view.proto
3
+
4
+ require 'google/protobuf'
5
+
6
+ Google::Protobuf::DescriptorPool.generated_pool.build do
7
+ add_message "google.ads.googleads.v0.resources.ProductGroupView" do
8
+ optional :resource_name, :string, 1
9
+ end
10
+ end
11
+
12
+ module Google
13
+ module Ads
14
+ module GoogleAds
15
+ module V0
16
+ module Resources
17
+ ProductGroupView = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v0.resources.ProductGroupView").msgclass
18
+ end
19
+ end
20
+ end
21
+ end
22
+ end
@@ -14,6 +14,9 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
14
14
  optional :type, :enum, 4, "google.ads.googleads.v0.enums.CriterionTypeEnum.CriterionType"
15
15
  oneof :criterion do
16
16
  optional :keyword, :message, 3, "google.ads.googleads.v0.common.KeywordInfo"
17
+ optional :youtube_video, :message, 5, "google.ads.googleads.v0.common.YouTubeVideoInfo"
18
+ optional :youtube_channel, :message, 6, "google.ads.googleads.v0.common.YouTubeChannelInfo"
19
+ optional :placement, :message, 7, "google.ads.googleads.v0.common.PlacementInfo"
17
20
  end
18
21
  end
19
22
  end
@@ -0,0 +1,26 @@
1
+ # Generated by the protocol buffer compiler. DO NOT EDIT!
2
+ # source: google/ads/google_ads/v0/resources/topic_constant.proto
3
+
4
+ require 'google/protobuf'
5
+
6
+ require 'google/protobuf/wrappers_pb'
7
+ Google::Protobuf::DescriptorPool.generated_pool.build do
8
+ add_message "google.ads.googleads.v0.resources.TopicConstant" do
9
+ optional :resource_name, :string, 1
10
+ optional :id, :message, 2, "google.protobuf.Int64Value"
11
+ optional :topic_constant_parent, :message, 3, "google.protobuf.StringValue"
12
+ repeated :path, :message, 4, "google.protobuf.StringValue"
13
+ end
14
+ end
15
+
16
+ module Google
17
+ module Ads
18
+ module GoogleAds
19
+ module V0
20
+ module Resources
21
+ TopicConstant = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v0.resources.TopicConstant").msgclass
22
+ end
23
+ end
24
+ end
25
+ end
26
+ end
@@ -0,0 +1,22 @@
1
+ # Generated by the protocol buffer compiler. DO NOT EDIT!
2
+ # source: google/ads/google_ads/v0/resources/topic_view.proto
3
+
4
+ require 'google/protobuf'
5
+
6
+ Google::Protobuf::DescriptorPool.generated_pool.build do
7
+ add_message "google.ads.googleads.v0.resources.TopicView" do
8
+ optional :resource_name, :string, 1
9
+ end
10
+ end
11
+
12
+ module Google
13
+ module Ads
14
+ module GoogleAds
15
+ module V0
16
+ module Resources
17
+ TopicView = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v0.resources.TopicView").msgclass
18
+ end
19
+ end
20
+ end
21
+ end
22
+ end
@@ -0,0 +1,223 @@
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/account_budget_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/account_budget_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
+ # A service for fetching an account-level budget.
36
+ #
37
+ # Account-level budgets are mutated by creating proposal resources.
38
+ #
39
+ # @!attribute [r] account_budget_service_stub
40
+ # @return [Google::Ads::GoogleAds::V0::Services::AccountBudgetService::Stub]
41
+ class AccountBudgetServiceClient
42
+ attr_reader :account_budget_service_stub
43
+
44
+ # The default address of the service.
45
+ SERVICE_ADDRESS = "googleads.googleapis.com".freeze
46
+
47
+ # The default port of the service.
48
+ DEFAULT_SERVICE_PORT = 443
49
+
50
+ # The default set of gRPC interceptors.
51
+ GRPC_INTERCEPTORS = []
52
+
53
+ DEFAULT_TIMEOUT = 30
54
+
55
+ # The scopes needed to make gRPC calls to all of the methods defined in
56
+ # this service.
57
+ ALL_SCOPES = [
58
+ ].freeze
59
+
60
+
61
+ ACCOUNT_BUDGET_PATH_TEMPLATE = Google::Gax::PathTemplate.new(
62
+ "customers/{customer}/accountBudgets/{account_budget}"
63
+ )
64
+
65
+ private_constant :ACCOUNT_BUDGET_PATH_TEMPLATE
66
+
67
+ # Returns a fully-qualified account_budget resource name string.
68
+ # @param customer [String]
69
+ # @param account_budget [String]
70
+ # @return [String]
71
+ def self.account_budget_path customer, account_budget
72
+ ACCOUNT_BUDGET_PATH_TEMPLATE.render(
73
+ :"customer" => customer,
74
+ :"account_budget" => account_budget
75
+ )
76
+ end
77
+
78
+ # @param credentials [Google::Auth::Credentials, String, Hash, GRPC::Core::Channel, GRPC::Core::ChannelCredentials, Proc]
79
+ # Provides the means for authenticating requests made by the client. This parameter can
80
+ # be many types.
81
+ # A `Google::Auth::Credentials` uses a the properties of its represented keyfile for
82
+ # authenticating requests made by this client.
83
+ # A `String` will be treated as the path to the keyfile to be used for the construction of
84
+ # credentials for this client.
85
+ # A `Hash` will be treated as the contents of a keyfile to be used for the construction of
86
+ # credentials for this client.
87
+ # A `GRPC::Core::Channel` will be used to make calls through.
88
+ # A `GRPC::Core::ChannelCredentials` for the setting up the RPC client. The channel credentials
89
+ # should already be composed with a `GRPC::Core::CallCredentials` object.
90
+ # A `Proc` will be used as an updater_proc for the Grpc channel. The proc transforms the
91
+ # metadata for requests, generally, to give OAuth credentials.
92
+ # @param scopes [Array<String>]
93
+ # The OAuth scopes for this service. This parameter is ignored if
94
+ # an updater_proc is supplied.
95
+ # @param client_config [Hash]
96
+ # A Hash for call options for each method. See
97
+ # Google::Gax#construct_settings for the structure of
98
+ # this data. Falls back to the default config if not specified
99
+ # or the specified config is missing data points.
100
+ # @param timeout [Numeric]
101
+ # The default timeout, in seconds, for calls made through this client.
102
+ # @param metadata [Hash]
103
+ # Default metadata to be sent with each request. This can be overridden on a per call basis.
104
+ # @param exception_transformer [Proc]
105
+ # An optional proc that intercepts any exceptions raised during an API call to inject
106
+ # custom error handling.
107
+ def initialize \
108
+ credentials: nil,
109
+ scopes: ALL_SCOPES,
110
+ client_config: {},
111
+ timeout: DEFAULT_TIMEOUT,
112
+ metadata: nil,
113
+ exception_transformer: nil,
114
+ lib_name: nil,
115
+ lib_version: ""
116
+ # These require statements are intentionally placed here to initialize
117
+ # the gRPC module only when it's required.
118
+ # See https://github.com/googleapis/toolkit/issues/446
119
+ require "google/gax/grpc"
120
+ require "google/ads/google_ads/v0/services/account_budget_service_services_pb"
121
+
122
+ credentials ||= Google::Ads::GoogleAds::V0::Services::Credentials.default
123
+
124
+ if credentials.is_a?(String) || credentials.is_a?(Hash)
125
+ updater_proc = Google::Ads::GoogleAds::V0::Services::Credentials.new(credentials).updater_proc
126
+ end
127
+ if credentials.is_a?(GRPC::Core::Channel)
128
+ channel = credentials
129
+ end
130
+ if credentials.is_a?(GRPC::Core::ChannelCredentials)
131
+ chan_creds = credentials
132
+ end
133
+ if credentials.is_a?(Proc)
134
+ updater_proc = credentials
135
+ end
136
+ if credentials.is_a?(Google::Auth::Credentials)
137
+ updater_proc = credentials.updater_proc
138
+ end
139
+
140
+ package_version = Gem.loaded_specs['google-ads-googleads'].version.version
141
+
142
+ google_api_client = "gl-ruby/#{RUBY_VERSION}"
143
+ google_api_client << " #{lib_name}/#{lib_version}" if lib_name
144
+ google_api_client << " gapic/#{package_version} gax/#{Google::Gax::VERSION}"
145
+ google_api_client << " grpc/#{GRPC::VERSION}"
146
+ google_api_client.freeze
147
+
148
+ headers = { :"x-goog-api-client" => google_api_client }
149
+ headers.merge!(metadata) unless metadata.nil?
150
+ client_config_file = Pathname.new(__dir__).join(
151
+ "account_budget_service_client_config.json"
152
+ )
153
+ defaults = client_config_file.open do |f|
154
+ Google::Gax.construct_settings(
155
+ "google.ads.googleads.v0.services.AccountBudgetService",
156
+ JSON.parse(f.read),
157
+ client_config,
158
+ Google::Gax::Grpc::STATUS_CODE_NAMES,
159
+ timeout,
160
+ errors: Google::Gax::Grpc::API_ERRORS,
161
+ metadata: headers
162
+ )
163
+ end
164
+
165
+ # Allow overriding the service path/port in subclasses.
166
+ service_path = self.class::SERVICE_ADDRESS
167
+ port = self.class::DEFAULT_SERVICE_PORT
168
+ interceptors = self.class::GRPC_INTERCEPTORS
169
+ @account_budget_service_stub = Google::Gax::Grpc.create_stub(
170
+ service_path,
171
+ port,
172
+ chan_creds: chan_creds,
173
+ channel: channel,
174
+ updater_proc: updater_proc,
175
+ scopes: scopes,
176
+ interceptors: interceptors,
177
+ &Google::Ads::GoogleAds::V0::Services::AccountBudgetService::Stub.method(:new)
178
+ )
179
+
180
+ @get_account_budget = Google::Gax.create_api_call(
181
+ @account_budget_service_stub.method(:get_account_budget),
182
+ defaults["get_account_budget"],
183
+ exception_transformer: exception_transformer
184
+ )
185
+ end
186
+
187
+ # Service calls
188
+
189
+ # Returns an account-level budget in full detail.
190
+ #
191
+ # @param resource_name [String]
192
+ # The resource name of the account-level budget to fetch.
193
+ # @param options [Google::Gax::CallOptions]
194
+ # Overrides the default settings for this call, e.g, timeout,
195
+ # retries, etc.
196
+ # @yield [result, operation] Access the result along with the RPC operation
197
+ # @yieldparam result [Google::Ads::GoogleAds::V0::Resources::AccountBudget]
198
+ # @yieldparam operation [GRPC::ActiveCall::Operation]
199
+ # @return [Google::Ads::GoogleAds::V0::Resources::AccountBudget]
200
+ # @raise [Google::Gax::GaxError] if the RPC is aborted.
201
+ # @example
202
+ # require "google/ads/google_ads"
203
+ #
204
+ # account_budget_service_client = Google::Ads::GoogleAds::AccountBudget.new(version: :v0)
205
+ # formatted_resource_name = Google::Ads::GoogleAds::V0::Services::AccountBudgetServiceClient.account_budget_path("[CUSTOMER]", "[ACCOUNT_BUDGET]")
206
+ # response = account_budget_service_client.get_account_budget(formatted_resource_name)
207
+
208
+ def get_account_budget \
209
+ resource_name,
210
+ options: nil,
211
+ &block
212
+ req = {
213
+ resource_name: resource_name
214
+ }.delete_if { |_, v| v.nil? }
215
+ req = Google::Gax::to_proto(req, Google::Ads::GoogleAds::V0::Services::GetAccountBudgetRequest)
216
+ @get_account_budget.call(req, options, &block)
217
+ end
218
+ end
219
+ end
220
+ end
221
+ end
222
+ end
223
+ end