search_ads360_service.proto 10 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254
  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.searchads360.v0.services;
  16. import "google/ads/searchads360/v0/common/metrics.proto";
  17. import "google/ads/searchads360/v0/common/segments.proto";
  18. import "google/ads/searchads360/v0/common/value.proto";
  19. import "google/ads/searchads360/v0/enums/summary_row_setting.proto";
  20. import "google/ads/searchads360/v0/resources/ad_group.proto";
  21. import "google/ads/searchads360/v0/resources/ad_group_bid_modifier.proto";
  22. import "google/ads/searchads360/v0/resources/ad_group_criterion.proto";
  23. import "google/ads/searchads360/v0/resources/bidding_strategy.proto";
  24. import "google/ads/searchads360/v0/resources/campaign.proto";
  25. import "google/ads/searchads360/v0/resources/campaign_budget.proto";
  26. import "google/ads/searchads360/v0/resources/campaign_criterion.proto";
  27. import "google/ads/searchads360/v0/resources/conversion_action.proto";
  28. import "google/ads/searchads360/v0/resources/customer.proto";
  29. import "google/ads/searchads360/v0/resources/customer_client.proto";
  30. import "google/ads/searchads360/v0/resources/customer_manager_link.proto";
  31. import "google/ads/searchads360/v0/resources/keyword_view.proto";
  32. import "google/ads/searchads360/v0/resources/product_group_view.proto";
  33. import "google/api/annotations.proto";
  34. import "google/api/client.proto";
  35. import "google/api/field_behavior.proto";
  36. import "google/protobuf/field_mask.proto";
  37. option csharp_namespace = "Google.Ads.SearchAds360.V0.Services";
  38. option go_package = "google.golang.org/genproto/googleapis/ads/searchads360/v0/services;services";
  39. option java_multiple_files = true;
  40. option java_outer_classname = "SearchAds360ServiceProto";
  41. option java_package = "com.google.ads.searchads360.v0.services";
  42. option objc_class_prefix = "GASA360";
  43. option php_namespace = "Google\\Ads\\SearchAds360\\V0\\Services";
  44. option ruby_package = "Google::Ads::SearchAds360::V0::Services";
  45. // Proto file describing the SearchAds360Service.
  46. // Service to fetch data and metrics across resources.
  47. service SearchAds360Service {
  48. option (google.api.default_host) = "searchads360.googleapis.com";
  49. option (google.api.oauth_scopes) = "https://www.googleapis.com/auth/doubleclicksearch";
  50. // Returns all rows that match the search query.
  51. //
  52. // List of thrown errors:
  53. // [AuthenticationError]()
  54. // [AuthorizationError]()
  55. // [HeaderError]()
  56. // [InternalError]()
  57. // [QueryError]()
  58. // [QuotaError]()
  59. // [RequestError]()
  60. rpc Search(SearchSearchAds360Request) returns (SearchSearchAds360Response) {
  61. option (google.api.http) = {
  62. post: "/v0/customers/{customer_id=*}/searchAds360:search"
  63. body: "*"
  64. };
  65. option (google.api.method_signature) = "customer_id,query";
  66. }
  67. // Returns all rows that match the search stream query.
  68. //
  69. // List of thrown errors:
  70. // [AuthenticationError]()
  71. // [AuthorizationError]()
  72. // [HeaderError]()
  73. // [InternalError]()
  74. // [QueryError]()
  75. // [QuotaError]()
  76. // [RequestError]()
  77. rpc SearchStream(SearchSearchAds360StreamRequest) returns (stream SearchSearchAds360StreamResponse) {
  78. option (google.api.http) = {
  79. post: "/v0/customers/{customer_id=*}/searchAds360:searchStream"
  80. body: "*"
  81. };
  82. option (google.api.method_signature) = "customer_id,query";
  83. }
  84. }
  85. // Request message for [SearchAds360Service.Search][google.ads.searchads360.v0.services.SearchAds360Service.Search].
  86. message SearchSearchAds360Request {
  87. // Required. The ID of the customer being queried.
  88. string customer_id = 1 [(google.api.field_behavior) = REQUIRED];
  89. // Required. The query string.
  90. string query = 2 [(google.api.field_behavior) = REQUIRED];
  91. // Token of the page to retrieve. If not specified, the first
  92. // page of results will be returned. Use the value obtained from
  93. // `next_page_token` in the previous response in order to request
  94. // the next page of results.
  95. string page_token = 3;
  96. // Number of elements to retrieve in a single page.
  97. // When too large a page is requested, the server may decide to
  98. // further limit the number of returned resources.
  99. int32 page_size = 4;
  100. // If true, the request is validated but not executed.
  101. bool validate_only = 5;
  102. // If true, the total number of results that match the query ignoring the
  103. // LIMIT clause will be included in the response.
  104. // Default is false.
  105. bool return_total_results_count = 7;
  106. // Determines whether a summary row will be returned. By default, summary row
  107. // is not returned. If requested, the summary row will be sent in a response
  108. // by itself after all other query results are returned.
  109. google.ads.searchads360.v0.enums.SummaryRowSettingEnum.SummaryRowSetting summary_row_setting = 8;
  110. }
  111. // Response message for [SearchAds360Service.Search][google.ads.searchads360.v0.services.SearchAds360Service.Search].
  112. message SearchSearchAds360Response {
  113. // The list of rows that matched the query.
  114. repeated SearchAds360Row results = 1;
  115. // Pagination token used to retrieve the next page of results.
  116. // Pass the content of this string as the `page_token` attribute of
  117. // the next request. `next_page_token` is not returned for the last
  118. // page.
  119. string next_page_token = 2;
  120. // Total number of results that match the query ignoring the LIMIT
  121. // clause.
  122. int64 total_results_count = 3;
  123. // FieldMask that represents what fields were requested by the user.
  124. google.protobuf.FieldMask field_mask = 5;
  125. // Summary row that contains summary of metrics in results.
  126. // Summary of metrics means aggregation of metrics across all results,
  127. // here aggregation could be sum, average, rate, etc.
  128. SearchAds360Row summary_row = 6;
  129. // The headers of the custom columns in the results.
  130. repeated CustomColumnHeader custom_column_headers = 7;
  131. }
  132. // Request message for [SearchAds360Service.SearchStream][google.ads.searchads360.v0.services.SearchAds360Service.SearchStream].
  133. message SearchSearchAds360StreamRequest {
  134. // Required. The ID of the customer being queried.
  135. string customer_id = 1 [(google.api.field_behavior) = REQUIRED];
  136. // Required. The query string.
  137. string query = 2 [(google.api.field_behavior) = REQUIRED];
  138. // The number of rows that are returned in each stream response batch.
  139. // When too large batch is requested, the server may decide to further limit
  140. // the number of returned rows.
  141. int32 batch_size = 4;
  142. // Determines whether a summary row will be returned. By default, summary row
  143. // is not returned. If requested, the summary row will be sent in a response
  144. // by itself after all other query results are returned.
  145. google.ads.searchads360.v0.enums.SummaryRowSettingEnum.SummaryRowSetting summary_row_setting = 3;
  146. }
  147. // Response message for [SearchAds360Service.SearchStream][google.ads.searchads360.v0.services.SearchAds360Service.SearchStream].
  148. message SearchSearchAds360StreamResponse {
  149. // The list of rows that matched the query.
  150. repeated SearchAds360Row results = 1;
  151. // FieldMask that represents what fields were requested by the user.
  152. google.protobuf.FieldMask field_mask = 2;
  153. // Summary row that contains summary of metrics in results.
  154. // Summary of metrics means aggregation of metrics across all results,
  155. // here aggregation could be sum, average, rate, etc.
  156. SearchAds360Row summary_row = 3;
  157. // The headers of the custom columns in the results.
  158. repeated CustomColumnHeader custom_column_headers = 5;
  159. // The unique id of the request that is used for debugging purposes.
  160. string request_id = 4;
  161. }
  162. // A returned row from the query.
  163. message SearchAds360Row {
  164. // The ad group referenced in the query.
  165. google.ads.searchads360.v0.resources.AdGroup ad_group = 3;
  166. // The bid modifier referenced in the query.
  167. google.ads.searchads360.v0.resources.AdGroupBidModifier ad_group_bid_modifier = 24;
  168. // The criterion referenced in the query.
  169. google.ads.searchads360.v0.resources.AdGroupCriterion ad_group_criterion = 17;
  170. // The bidding strategy referenced in the query.
  171. google.ads.searchads360.v0.resources.BiddingStrategy bidding_strategy = 18;
  172. // The campaign budget referenced in the query.
  173. google.ads.searchads360.v0.resources.CampaignBudget campaign_budget = 19;
  174. // The campaign referenced in the query.
  175. google.ads.searchads360.v0.resources.Campaign campaign = 2;
  176. // The campaign criterion referenced in the query.
  177. google.ads.searchads360.v0.resources.CampaignCriterion campaign_criterion = 20;
  178. // The conversion action referenced in the query.
  179. google.ads.searchads360.v0.resources.ConversionAction conversion_action = 103;
  180. // The customer referenced in the query.
  181. google.ads.searchads360.v0.resources.Customer customer = 1;
  182. // The CustomerManagerLink referenced in the query.
  183. google.ads.searchads360.v0.resources.CustomerManagerLink customer_manager_link = 61;
  184. // The CustomerClient referenced in the query.
  185. google.ads.searchads360.v0.resources.CustomerClient customer_client = 70;
  186. // The keyword view referenced in the query.
  187. google.ads.searchads360.v0.resources.KeywordView keyword_view = 21;
  188. // The product group view referenced in the query.
  189. google.ads.searchads360.v0.resources.ProductGroupView product_group_view = 54;
  190. // The metrics.
  191. google.ads.searchads360.v0.common.Metrics metrics = 4;
  192. // The segments.
  193. google.ads.searchads360.v0.common.Segments segments = 102;
  194. // The custom columns.
  195. repeated google.ads.searchads360.v0.common.Value custom_columns = 156;
  196. }
  197. // Message for custom column header.
  198. message CustomColumnHeader {
  199. // The custom column ID.
  200. int64 id = 1;
  201. // The user defined name of the custom column.
  202. string name = 2;
  203. // True when the custom column references metrics.
  204. bool references_metrics = 3;
  205. }