smart_campaign_suggest_service.proto 9.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240
  1. // Copyright 2022 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. // http://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. syntax = "proto3";
  15. package google.ads.googleads.v12.services;
  16. import "google/ads/googleads/v12/common/ad_type_infos.proto";
  17. import "google/ads/googleads/v12/common/criteria.proto";
  18. import "google/ads/googleads/v12/resources/keyword_theme_constant.proto";
  19. import "google/api/annotations.proto";
  20. import "google/api/client.proto";
  21. import "google/api/field_behavior.proto";
  22. import "google/api/resource.proto";
  23. option csharp_namespace = "Google.Ads.GoogleAds.V12.Services";
  24. option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v12/services;services";
  25. option java_multiple_files = true;
  26. option java_outer_classname = "SmartCampaignSuggestServiceProto";
  27. option java_package = "com.google.ads.googleads.v12.services";
  28. option objc_class_prefix = "GAA";
  29. option php_namespace = "Google\\Ads\\GoogleAds\\V12\\Services";
  30. option ruby_package = "Google::Ads::GoogleAds::V12::Services";
  31. // Service to get suggestions for Smart Campaigns.
  32. service SmartCampaignSuggestService {
  33. option (google.api.default_host) = "googleads.googleapis.com";
  34. option (google.api.oauth_scopes) = "https://www.googleapis.com/auth/adwords";
  35. // Returns BudgetOption suggestions.
  36. rpc SuggestSmartCampaignBudgetOptions(SuggestSmartCampaignBudgetOptionsRequest) returns (SuggestSmartCampaignBudgetOptionsResponse) {
  37. option (google.api.http) = {
  38. post: "/v12/customers/{customer_id=*}:suggestSmartCampaignBudgetOptions"
  39. body: "*"
  40. };
  41. }
  42. // Suggests a Smart campaign ad compatible with the Ad family of resources,
  43. // based on data points such as targeting and the business to advertise.
  44. rpc SuggestSmartCampaignAd(SuggestSmartCampaignAdRequest) returns (SuggestSmartCampaignAdResponse) {
  45. option (google.api.http) = {
  46. post: "/v12/customers/{customer_id=*}:suggestSmartCampaignAd"
  47. body: "*"
  48. };
  49. }
  50. // Suggests keyword themes to advertise on.
  51. rpc SuggestKeywordThemes(SuggestKeywordThemesRequest) returns (SuggestKeywordThemesResponse) {
  52. option (google.api.http) = {
  53. post: "/v12/customers/{customer_id=*}:suggestKeywordThemes"
  54. body: "*"
  55. };
  56. }
  57. }
  58. // Request message for
  59. // [SmartCampaignSuggestService.SuggestSmartCampaignBudgets][].
  60. message SuggestSmartCampaignBudgetOptionsRequest {
  61. // Required. The ID of the customer whose budget options are to be suggested.
  62. string customer_id = 1 [(google.api.field_behavior) = REQUIRED];
  63. // Required. For first time campaign creation use SuggestionInfo, for
  64. // subsequent updates on BudgetOptions based on an already created campaign
  65. // use that campaign.
  66. oneof suggestion_data {
  67. // Required. The resource name of the campaign to get suggestion for.
  68. string campaign = 2 [
  69. (google.api.field_behavior) = REQUIRED,
  70. (google.api.resource_reference) = {
  71. type: "googleads.googleapis.com/Campaign"
  72. }
  73. ];
  74. // Required. Information needed to get budget options
  75. SmartCampaignSuggestionInfo suggestion_info = 3 [(google.api.field_behavior) = REQUIRED];
  76. }
  77. }
  78. // Information needed to get suggestion for Smart Campaign. More information
  79. // provided will help the system to derive better suggestions.
  80. message SmartCampaignSuggestionInfo {
  81. // A list of locations.
  82. message LocationList {
  83. // Required. Locations.
  84. repeated google.ads.googleads.v12.common.LocationInfo locations = 1 [(google.api.field_behavior) = REQUIRED];
  85. }
  86. // A context that describes a business.
  87. message BusinessContext {
  88. // Optional. The name of the business.
  89. string business_name = 1 [(google.api.field_behavior) = OPTIONAL];
  90. }
  91. // Optional. Landing page URL of the campaign.
  92. string final_url = 1 [(google.api.field_behavior) = OPTIONAL];
  93. // Optional. The two letter advertising language for the Smart campaign to be
  94. // constructed, default to 'en' if not set.
  95. string language_code = 3 [(google.api.field_behavior) = OPTIONAL];
  96. // Optional. The business ad schedule.
  97. repeated google.ads.googleads.v12.common.AdScheduleInfo ad_schedules = 6 [(google.api.field_behavior) = OPTIONAL];
  98. // Optional. Smart campaign keyword themes. This field may greatly improve suggestion
  99. // accuracy and we recommend always setting it if possible.
  100. repeated google.ads.googleads.v12.common.KeywordThemeInfo keyword_themes = 7 [(google.api.field_behavior) = OPTIONAL];
  101. // The business settings to consider when generating suggestions.
  102. // Settings are automatically extracted from the business when provided.
  103. // Otherwise, these settings must be specified explicitly.
  104. oneof business_setting {
  105. // Optional. Context describing the business to advertise.
  106. BusinessContext business_context = 8 [(google.api.field_behavior) = OPTIONAL];
  107. // Optional. The resource name of a Business Profile location.
  108. // Business Profile location resource names can be fetched through the
  109. // Business Profile API and adhere to the following format:
  110. // `locations/{locationId}`.
  111. //
  112. // See the [Business Profile API]
  113. // (https://developers.google.com/my-business/reference/businessinformation/rest/v1/accounts.locations)
  114. // for additional details.
  115. string business_profile_location = 9 [(google.api.field_behavior) = OPTIONAL];
  116. }
  117. // The geo target of the campaign, either a list of locations or
  118. // a single proximity shall be specified.
  119. oneof geo_target {
  120. // Optional. The targeting geo location by locations.
  121. LocationList location_list = 4 [(google.api.field_behavior) = OPTIONAL];
  122. // Optional. The targeting geo location by proximity.
  123. google.ads.googleads.v12.common.ProximityInfo proximity = 5 [(google.api.field_behavior) = OPTIONAL];
  124. }
  125. }
  126. // Response message for
  127. // [SmartCampaignSuggestService.SuggestSmartCampaignBudgets][]. Depending on
  128. // whether the system could suggest the options, either all of the options or
  129. // none of them might be returned.
  130. message SuggestSmartCampaignBudgetOptionsResponse {
  131. // Performance metrics for a given budget option.
  132. message Metrics {
  133. // The estimated min daily clicks.
  134. int64 min_daily_clicks = 1;
  135. // The estimated max daily clicks.
  136. int64 max_daily_clicks = 2;
  137. }
  138. // Smart Campaign budget option.
  139. message BudgetOption {
  140. // The amount of the budget, in the local currency for the account.
  141. // Amount is specified in micros, where one million is equivalent to one
  142. // currency unit.
  143. int64 daily_amount_micros = 1;
  144. // Metrics pertaining to the suggested budget, could be empty if there is
  145. // not enough information to derive the estimates.
  146. Metrics metrics = 2;
  147. }
  148. // Optional. The lowest budget option.
  149. optional BudgetOption low = 1 [(google.api.field_behavior) = OPTIONAL];
  150. // Optional. The recommended budget option.
  151. optional BudgetOption recommended = 2 [(google.api.field_behavior) = OPTIONAL];
  152. // Optional. The highest budget option.
  153. optional BudgetOption high = 3 [(google.api.field_behavior) = OPTIONAL];
  154. }
  155. // Request message for
  156. // [SmartCampaignSuggestService.SuggestSmartCampaignAd][google.ads.googleads.v12.services.SmartCampaignSuggestService.SuggestSmartCampaignAd].
  157. message SuggestSmartCampaignAdRequest {
  158. // Required. The ID of the customer.
  159. string customer_id = 1 [(google.api.field_behavior) = REQUIRED];
  160. // Required. Inputs used to suggest a Smart campaign ad.
  161. // Required fields: final_url, language_code, keyword_themes.
  162. // Optional but recommended fields to improve the quality of the suggestion:
  163. // business_setting and geo_target.
  164. SmartCampaignSuggestionInfo suggestion_info = 2 [(google.api.field_behavior) = REQUIRED];
  165. }
  166. // Response message for
  167. // [SmartCampaignSuggestService.SuggestSmartCampaignAd][google.ads.googleads.v12.services.SmartCampaignSuggestService.SuggestSmartCampaignAd].
  168. message SuggestSmartCampaignAdResponse {
  169. // Optional. Ad info includes 3 creative headlines and 2 creative descriptions.
  170. google.ads.googleads.v12.common.SmartCampaignAdInfo ad_info = 1 [(google.api.field_behavior) = OPTIONAL];
  171. }
  172. // Request message for
  173. // [SmartCampaignSuggestService.SuggestKeywordThemes][google.ads.googleads.v12.services.SmartCampaignSuggestService.SuggestKeywordThemes].
  174. message SuggestKeywordThemesRequest {
  175. // Required. The ID of the customer.
  176. string customer_id = 1 [(google.api.field_behavior) = REQUIRED];
  177. // Required. Information to get keyword theme suggestions.
  178. // Required fields:
  179. //
  180. // * suggestion_info.final_url
  181. // * suggestion_info.language_code
  182. // * suggestion_info.geo_target
  183. //
  184. // Recommended fields:
  185. //
  186. // * suggestion_info.business_setting
  187. SmartCampaignSuggestionInfo suggestion_info = 2 [(google.api.field_behavior) = REQUIRED];
  188. }
  189. // Response message for
  190. // [SmartCampaignSuggestService.SuggestKeywordThemes][google.ads.googleads.v12.services.SmartCampaignSuggestService.SuggestKeywordThemes].
  191. message SuggestKeywordThemesResponse {
  192. // A Smart campaign keyword theme suggestion.
  193. message KeywordTheme {
  194. // A keyword theme.
  195. oneof keyword_theme {
  196. // A Smart campaign keyword theme constant.
  197. google.ads.googleads.v12.resources.KeywordThemeConstant keyword_theme_constant = 1;
  198. // A free-form text keyword theme.
  199. string free_form_keyword_theme = 2;
  200. }
  201. }
  202. // Smart campaign keyword theme suggestions.
  203. repeated KeywordTheme keyword_themes = 2;
  204. }