user_lists.proto 12 KB

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