smart_campaign_suggest_service.proto 9.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224
  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.v10.services;
  16. import "google/ads/googleads/v10/common/ad_type_infos.proto";
  17. import "google/ads/googleads/v10/common/criteria.proto";
  18. import "google/ads/googleads/v10/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.V10.Services";
  24. option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v10/services;services";
  25. option java_multiple_files = true;
  26. option java_outer_classname = "SmartCampaignSuggestServiceProto";
  27. option java_package = "com.google.ads.googleads.v10.services";
  28. option objc_class_prefix = "GAA";
  29. option php_namespace = "Google\\Ads\\GoogleAds\\V10\\Services";
  30. option ruby_package = "Google::Ads::GoogleAds::V10::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: "/v10/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: "/v10/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: "/v10/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.v10.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.v10.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.v10.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 ID of the Business Profile location.
  108. // The location ID can be fetched by Business Profile API with its form:
  109. // accounts/{accountId}/locations/{locationId}. The last {locationId}
  110. // component from the Business Profile API represents the
  111. // business_location_id. See the [Business Profile API]
  112. // (https://developers.google.com/my-business/reference/rest/v4/accounts.locations)
  113. int64 business_location_id = 2 [(google.api.field_behavior) = OPTIONAL];
  114. }
  115. // The geo target of the campaign, either a list of locations or
  116. // a single proximity shall be specified.
  117. oneof geo_target {
  118. // Optional. The targeting geo location by locations.
  119. LocationList location_list = 4 [(google.api.field_behavior) = OPTIONAL];
  120. // Optional. The targeting geo location by proximity.
  121. google.ads.googleads.v10.common.ProximityInfo proximity = 5 [(google.api.field_behavior) = OPTIONAL];
  122. }
  123. }
  124. // Response message for
  125. // [SmartCampaignSuggestService.SuggestSmartCampaignBudgets][]. Depending on
  126. // whether the system could suggest the options, either all of the options or
  127. // none of them might be returned.
  128. message SuggestSmartCampaignBudgetOptionsResponse {
  129. // Performance metrics for a given budget option.
  130. message Metrics {
  131. // The estimated min daily clicks.
  132. int64 min_daily_clicks = 1;
  133. // The estimated max daily clicks.
  134. int64 max_daily_clicks = 2;
  135. }
  136. // Smart Campaign budget option.
  137. message BudgetOption {
  138. // The amount of the budget, in the local currency for the account.
  139. // Amount is specified in micros, where one million is equivalent to one
  140. // currency unit.
  141. int64 daily_amount_micros = 1;
  142. // Metrics pertaining to the suggested budget, could be empty if there is
  143. // not enough information to derive the estimates.
  144. Metrics metrics = 2;
  145. }
  146. // Optional. The lowest budget option.
  147. optional BudgetOption low = 1 [(google.api.field_behavior) = OPTIONAL];
  148. // Optional. The recommended budget option.
  149. optional BudgetOption recommended = 2 [(google.api.field_behavior) = OPTIONAL];
  150. // Optional. The highest budget option.
  151. optional BudgetOption high = 3 [(google.api.field_behavior) = OPTIONAL];
  152. }
  153. // Request message for
  154. // [SmartCampaignSuggestService.SuggestSmartCampaignAd][google.ads.googleads.v10.services.SmartCampaignSuggestService.SuggestSmartCampaignAd].
  155. message SuggestSmartCampaignAdRequest {
  156. // Required. The ID of the customer.
  157. string customer_id = 1 [(google.api.field_behavior) = REQUIRED];
  158. // Required. Inputs used to suggest a Smart campaign ad.
  159. // Required fields: final_url, language_code, keyword_themes.
  160. // Optional but recommended fields to improve the quality of the suggestion:
  161. // business_setting and geo_target.
  162. SmartCampaignSuggestionInfo suggestion_info = 2 [(google.api.field_behavior) = REQUIRED];
  163. }
  164. // Response message for
  165. // [SmartCampaignSuggestService.SuggestSmartCampaignAd][google.ads.googleads.v10.services.SmartCampaignSuggestService.SuggestSmartCampaignAd].
  166. message SuggestSmartCampaignAdResponse {
  167. // Optional. Ad info includes 3 creative headlines and 2 creative descriptions.
  168. google.ads.googleads.v10.common.SmartCampaignAdInfo ad_info = 1 [(google.api.field_behavior) = OPTIONAL];
  169. }
  170. // Request message for
  171. // [SmartCampaignSuggestService.SuggestKeywordThemes][google.ads.googleads.v10.services.SmartCampaignSuggestService.SuggestKeywordThemes].
  172. message SuggestKeywordThemesRequest {
  173. // Required. The ID of the customer.
  174. string customer_id = 1 [(google.api.field_behavior) = REQUIRED];
  175. // Required. Information to get keyword theme suggestions.
  176. // Required fields:
  177. // * suggestion_info.final_url
  178. // * suggestion_info.language_code
  179. // * suggestion_info.geo_target
  180. //
  181. // Recommended fields:
  182. // * suggestion_info.business_setting
  183. SmartCampaignSuggestionInfo suggestion_info = 2 [(google.api.field_behavior) = REQUIRED];
  184. }
  185. // Response message for
  186. // [SmartCampaignSuggestService.SuggestKeywordThemes][google.ads.googleads.v10.services.SmartCampaignSuggestService.SuggestKeywordThemes].
  187. message SuggestKeywordThemesResponse {
  188. // Smart campaign keyword theme suggestions.
  189. repeated google.ads.googleads.v10.resources.KeywordThemeConstant keyword_themes = 1;
  190. }