user_lists.proto 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290
  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.common;
  16. import "google/ads/googleads/v10/enums/customer_match_upload_key_type.proto";
  17. import "google/ads/googleads/v10/enums/user_list_combined_rule_operator.proto";
  18. import "google/ads/googleads/v10/enums/user_list_crm_data_source_type.proto";
  19. import "google/ads/googleads/v10/enums/user_list_date_rule_item_operator.proto";
  20. import "google/ads/googleads/v10/enums/user_list_logical_rule_operator.proto";
  21. import "google/ads/googleads/v10/enums/user_list_number_rule_item_operator.proto";
  22. import "google/ads/googleads/v10/enums/user_list_prepopulation_status.proto";
  23. import "google/ads/googleads/v10/enums/user_list_rule_type.proto";
  24. import "google/ads/googleads/v10/enums/user_list_string_rule_item_operator.proto";
  25. option csharp_namespace = "Google.Ads.GoogleAds.V10.Common";
  26. option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v10/common;common";
  27. option java_multiple_files = true;
  28. option java_outer_classname = "UserListsProto";
  29. option java_package = "com.google.ads.googleads.v10.common";
  30. option objc_class_prefix = "GAA";
  31. option php_namespace = "Google\\Ads\\GoogleAds\\V10\\Common";
  32. option ruby_package = "Google::Ads::GoogleAds::V10::Common";
  33. // Proto file describing user list types.
  34. // SimilarUserList is a list of users which are similar to users from another
  35. // UserList. These lists are read-only and automatically created by Google.
  36. message SimilarUserListInfo {
  37. // Seed UserList from which this list is derived.
  38. optional string seed_user_list = 2;
  39. }
  40. // UserList of CRM users provided by the advertiser.
  41. message CrmBasedUserListInfo {
  42. // A string that uniquely identifies a mobile application from which the data
  43. // was collected.
  44. // For iOS, the ID string is the 9 digit string that appears at the end of an
  45. // App Store URL (e.g., "476943146" for "Flood-It! 2" whose App Store link is
  46. // http://itunes.apple.com/us/app/flood-it!-2/id476943146).
  47. // For Android, the ID string is the application's package name
  48. // (e.g., "com.labpixies.colordrips" for "Color Drips" given Google Play link
  49. // https://play.google.com/store/apps/details?id=com.labpixies.colordrips).
  50. // Required when creating CrmBasedUserList for uploading mobile advertising
  51. // IDs.
  52. optional string app_id = 4;
  53. // Matching key type of the list.
  54. // Mixed data types are not allowed on the same list.
  55. // This field is required for an ADD operation.
  56. google.ads.googleads.v10.enums.CustomerMatchUploadKeyTypeEnum.CustomerMatchUploadKeyType upload_key_type = 2;
  57. // Data source of the list. Default value is FIRST_PARTY.
  58. // Only customers on the allow-list can create third-party sourced CRM lists.
  59. google.ads.googleads.v10.enums.UserListCrmDataSourceTypeEnum.UserListCrmDataSourceType data_source_type = 3;
  60. }
  61. // A client defined rule based on custom parameters sent by web sites or
  62. // uploaded by the advertiser.
  63. message UserListRuleInfo {
  64. // Rule type is used to determine how to group rule items.
  65. //
  66. // The default is OR of ANDs (disjunctive normal form).
  67. // That is, rule items will be ANDed together within rule item groups and the
  68. // groups themselves will be ORed together.
  69. //
  70. // Currently AND of ORs (conjunctive normal form) is only supported for
  71. // ExpressionRuleUserList.
  72. google.ads.googleads.v10.enums.UserListRuleTypeEnum.UserListRuleType rule_type = 1;
  73. // List of rule item groups that defines this rule.
  74. // Rule item groups are grouped together based on rule_type.
  75. repeated UserListRuleItemGroupInfo rule_item_groups = 2;
  76. }
  77. // A group of rule items.
  78. message UserListRuleItemGroupInfo {
  79. // Rule items that will be grouped together based on rule_type.
  80. repeated UserListRuleItemInfo rule_items = 1;
  81. }
  82. // An atomic rule item.
  83. message UserListRuleItemInfo {
  84. // Rule variable name. It should match the corresponding key name fired
  85. // by the pixel.
  86. // A name must begin with US-ascii letters or underscore or UTF8 code that is
  87. // greater than 127 and consist of US-ascii letters or digits or underscore or
  88. // UTF8 code that is greater than 127.
  89. // For websites, there are two built-in variable URL (name = 'url__') and
  90. // referrer URL (name = 'ref_url__').
  91. // This field must be populated when creating a new rule item.
  92. optional string name = 5;
  93. // An atomic rule item.
  94. oneof rule_item {
  95. // An atomic rule item composed of a number operation.
  96. UserListNumberRuleItemInfo number_rule_item = 2;
  97. // An atomic rule item composed of a string operation.
  98. UserListStringRuleItemInfo string_rule_item = 3;
  99. // An atomic rule item composed of a date operation.
  100. UserListDateRuleItemInfo date_rule_item = 4;
  101. }
  102. }
  103. // A rule item composed of a date operation.
  104. message UserListDateRuleItemInfo {
  105. // Date comparison operator.
  106. // This field is required and must be populated when creating new date
  107. // rule item.
  108. google.ads.googleads.v10.enums.UserListDateRuleItemOperatorEnum.UserListDateRuleItemOperator operator = 1;
  109. // String representing date value to be compared with the rule variable.
  110. // Supported date format is YYYY-MM-DD.
  111. // Times are reported in the customer's time zone.
  112. optional string value = 4;
  113. // The relative date value of the right hand side denoted by number of days
  114. // offset from now. The value field will override this field when both are
  115. // present.
  116. optional int64 offset_in_days = 5;
  117. }
  118. // A rule item composed of a number operation.
  119. message UserListNumberRuleItemInfo {
  120. // Number comparison operator.
  121. // This field is required and must be populated when creating a new number
  122. // rule item.
  123. google.ads.googleads.v10.enums.UserListNumberRuleItemOperatorEnum.UserListNumberRuleItemOperator operator = 1;
  124. // Number value to be compared with the variable.
  125. // This field is required and must be populated when creating a new number
  126. // rule item.
  127. optional double value = 3;
  128. }
  129. // A rule item composed of a string operation.
  130. message UserListStringRuleItemInfo {
  131. // String comparison operator.
  132. // This field is required and must be populated when creating a new string
  133. // rule item.
  134. google.ads.googleads.v10.enums.UserListStringRuleItemOperatorEnum.UserListStringRuleItemOperator operator = 1;
  135. // The right hand side of the string rule item. For URLs or referrer URLs,
  136. // the value can not contain illegal URL chars such as newlines, quotes,
  137. // tabs, or parentheses. This field is required and must be populated when
  138. // creating a new string rule item.
  139. optional string value = 3;
  140. }
  141. // User lists defined by combining two rules, left operand and right operand.
  142. // There are two operators: AND where left operand and right operand have to be
  143. // true; AND_NOT where left operand is true but right operand is false.
  144. message CombinedRuleUserListInfo {
  145. // Left operand of the combined rule.
  146. // This field is required and must be populated when creating new combined
  147. // rule based user list.
  148. UserListRuleInfo left_operand = 1;
  149. // Right operand of the combined rule.
  150. // This field is required and must be populated when creating new combined
  151. // rule based user list.
  152. UserListRuleInfo right_operand = 2;
  153. // Operator to connect the two operands.
  154. //
  155. // Required for creating a combined rule user list.
  156. google.ads.googleads.v10.enums.UserListCombinedRuleOperatorEnum.UserListCombinedRuleOperator rule_operator = 3;
  157. }
  158. // Visitors of a page during specific dates.
  159. message DateSpecificRuleUserListInfo {
  160. // Boolean rule that defines visitor of a page.
  161. //
  162. // Required for creating a date specific rule user list.
  163. UserListRuleInfo rule = 1;
  164. // Start date of users visit. If set to 2000-01-01, then the list includes all
  165. // users before end_date. The date's format should be YYYY-MM-DD.
  166. //
  167. // Required for creating a data specific rule user list.
  168. optional string start_date = 4;
  169. // Last date of users visit. If set to 2037-12-30, then the list includes all
  170. // users after start_date. The date's format should be YYYY-MM-DD.
  171. //
  172. // Required for creating a data specific rule user list.
  173. optional string end_date = 5;
  174. }
  175. // Visitors of a page. The page visit is defined by one boolean rule expression.
  176. message ExpressionRuleUserListInfo {
  177. // Boolean rule that defines this user list. The rule consists of a list of
  178. // rule item groups and each rule item group consists of a list of rule items.
  179. // All the rule item groups are ORed or ANDed together for evaluation based on
  180. // rule.rule_type.
  181. //
  182. // Required for creating an expression rule user list.
  183. UserListRuleInfo rule = 1;
  184. }
  185. // Representation of a userlist that is generated by a rule.
  186. message RuleBasedUserListInfo {
  187. // The status of pre-population. The field is default to NONE if not set which
  188. // means the previous users will not be considered. If set to REQUESTED, past
  189. // site visitors or app users who match the list definition will be included
  190. // in the list (works on the Display Network only). This will only
  191. // add past users from within the last 30 days, depending on the
  192. // list's membership duration and the date when the remarketing tag is added.
  193. // The status will be updated to FINISHED once request is processed, or FAILED
  194. // if the request fails.
  195. google.ads.googleads.v10.enums.UserListPrepopulationStatusEnum.UserListPrepopulationStatus prepopulation_status = 1;
  196. // Subtypes of rule based user lists.
  197. oneof rule_based_user_list {
  198. // User lists defined by combining two rules.
  199. // There are two operators: AND, where the left and right operands have to
  200. // be true; AND_NOT where left operand is true but right operand is false.
  201. CombinedRuleUserListInfo combined_rule_user_list = 2;
  202. // Visitors of a page during specific dates. The visiting periods are
  203. // defined as follows:
  204. // Between start_date (inclusive) and end_date (inclusive);
  205. // Before end_date (exclusive) with start_date = 2000-01-01;
  206. // After start_date (exclusive) with end_date = 2037-12-30.
  207. DateSpecificRuleUserListInfo date_specific_rule_user_list = 3;
  208. // Visitors of a page. The page visit is defined by one boolean rule
  209. // expression.
  210. ExpressionRuleUserListInfo expression_rule_user_list = 4;
  211. }
  212. }
  213. // Represents a user list that is a custom combination of user lists.
  214. message LogicalUserListInfo {
  215. // Logical list rules that define this user list. The rules are defined as a
  216. // logical operator (ALL/ANY/NONE) and a list of user lists. All the rules are
  217. // ANDed when they are evaluated.
  218. //
  219. // Required for creating a logical user list.
  220. repeated UserListLogicalRuleInfo rules = 1;
  221. }
  222. // A user list logical rule. A rule has a logical operator (and/or/not) and a
  223. // list of user lists as operands.
  224. message UserListLogicalRuleInfo {
  225. // The logical operator of the rule.
  226. google.ads.googleads.v10.enums.UserListLogicalRuleOperatorEnum.UserListLogicalRuleOperator operator = 1;
  227. // The list of operands of the rule.
  228. repeated LogicalUserListOperandInfo rule_operands = 2;
  229. }
  230. // Operand of logical user list that consists of a user list.
  231. message LogicalUserListOperandInfo {
  232. // Resource name of a user list as an operand.
  233. optional string user_list = 2;
  234. }
  235. // User list targeting as a collection of conversions or remarketing actions.
  236. message BasicUserListInfo {
  237. // Actions associated with this user list.
  238. repeated UserListActionInfo actions = 1;
  239. }
  240. // Represents an action type used for building remarketing user lists.
  241. message UserListActionInfo {
  242. // Subtypes of user list action.
  243. oneof user_list_action {
  244. // A conversion action that's not generated from remarketing.
  245. string conversion_action = 3;
  246. // A remarketing action.
  247. string remarketing_action = 4;
  248. }
  249. }