1// Copyright 2023 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 15syntax = "proto3"; 16 17package google.ads.googleads.v15.common; 18 19import "google/ads/googleads/v15/enums/customer_match_upload_key_type.proto"; 20import "google/ads/googleads/v15/enums/lookalike_expansion_level.proto"; 21import "google/ads/googleads/v15/enums/user_list_crm_data_source_type.proto"; 22import "google/ads/googleads/v15/enums/user_list_date_rule_item_operator.proto"; 23import "google/ads/googleads/v15/enums/user_list_flexible_rule_operator.proto"; 24import "google/ads/googleads/v15/enums/user_list_logical_rule_operator.proto"; 25import "google/ads/googleads/v15/enums/user_list_number_rule_item_operator.proto"; 26import "google/ads/googleads/v15/enums/user_list_prepopulation_status.proto"; 27import "google/ads/googleads/v15/enums/user_list_rule_type.proto"; 28import "google/ads/googleads/v15/enums/user_list_string_rule_item_operator.proto"; 29 30option csharp_namespace = "Google.Ads.GoogleAds.V15.Common"; 31option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v15/common;common"; 32option java_multiple_files = true; 33option java_outer_classname = "UserListsProto"; 34option java_package = "com.google.ads.googleads.v15.common"; 35option objc_class_prefix = "GAA"; 36option php_namespace = "Google\\Ads\\GoogleAds\\V15\\Common"; 37option ruby_package = "Google::Ads::GoogleAds::V15::Common"; 38 39// Proto file describing user list types. 40 41// LookalikeUserlist, composed of users similar to those 42// of a configurable seed (set of UserLists) 43message LookalikeUserListInfo { 44 // Seed UserList ID from which this list is derived, provided by user. 45 repeated int64 seed_user_list_ids = 1; 46 47 // Expansion level, reflecting the size of the lookalike audience 48 google.ads.googleads.v15.enums.LookalikeExpansionLevelEnum 49 .LookalikeExpansionLevel expansion_level = 2; 50 51 // Countries targeted by the Lookalike. Two-letter country code as defined by 52 // ISO-3166 53 repeated string country_codes = 3; 54} 55 56// SimilarUserList is a list of users which are similar to users from another 57// UserList. These lists are read-only and automatically created by Google. 58message SimilarUserListInfo { 59 // Seed UserList from which this list is derived. 60 optional string seed_user_list = 2; 61} 62 63// UserList of CRM users provided by the advertiser. 64message CrmBasedUserListInfo { 65 // A string that uniquely identifies a mobile application from which the data 66 // was collected. 67 // For iOS, the ID string is the 9 digit string that appears at the end of an 68 // App Store URL (for example, "476943146" for "Flood-It! 2" whose App Store 69 // link is http://itunes.apple.com/us/app/flood-it!-2/id476943146). For 70 // Android, the ID string is the application's package name (for example, 71 // "com.labpixies.colordrips" for "Color Drips" given Google Play link 72 // https://play.google.com/store/apps/details?id=com.labpixies.colordrips). 73 // Required when creating CrmBasedUserList for uploading mobile advertising 74 // IDs. 75 optional string app_id = 4; 76 77 // Matching key type of the list. 78 // Mixed data types are not allowed on the same list. 79 // This field is required for an ADD operation. 80 google.ads.googleads.v15.enums.CustomerMatchUploadKeyTypeEnum 81 .CustomerMatchUploadKeyType upload_key_type = 2; 82 83 // Data source of the list. Default value is FIRST_PARTY. 84 // Only customers on the allow-list can create third-party sourced CRM lists. 85 google.ads.googleads.v15.enums.UserListCrmDataSourceTypeEnum 86 .UserListCrmDataSourceType data_source_type = 3; 87} 88 89// A client defined rule based on custom parameters sent by web sites or 90// uploaded by the advertiser. 91message UserListRuleInfo { 92 // Rule type is used to determine how to group rule items. 93 // 94 // The default is OR of ANDs (disjunctive normal form). 95 // That is, rule items will be ANDed together within rule item groups and the 96 // groups themselves will be ORed together. 97 // 98 // OR of ANDs is the only supported type for FlexibleRuleUserList. 99 google.ads.googleads.v15.enums.UserListRuleTypeEnum.UserListRuleType 100 rule_type = 1; 101 102 // List of rule item groups that defines this rule. 103 // Rule item groups are grouped together based on rule_type. 104 repeated UserListRuleItemGroupInfo rule_item_groups = 2; 105} 106 107// A group of rule items. 108message UserListRuleItemGroupInfo { 109 // Rule items that will be grouped together based on rule_type. 110 repeated UserListRuleItemInfo rule_items = 1; 111} 112 113// An atomic rule item. 114message UserListRuleItemInfo { 115 // Rule variable name. It should match the corresponding key name fired 116 // by the pixel. 117 // A name must begin with US-ascii letters or underscore or UTF8 code that is 118 // greater than 127 and consist of US-ascii letters or digits or underscore or 119 // UTF8 code that is greater than 127. 120 // For websites, there are two built-in variable URL (name = 'url__') and 121 // referrer URL (name = 'ref_url__'). 122 // This field must be populated when creating a new rule item. 123 optional string name = 5; 124 125 // An atomic rule item. 126 oneof rule_item { 127 // An atomic rule item composed of a number operation. 128 UserListNumberRuleItemInfo number_rule_item = 2; 129 130 // An atomic rule item composed of a string operation. 131 UserListStringRuleItemInfo string_rule_item = 3; 132 133 // An atomic rule item composed of a date operation. 134 UserListDateRuleItemInfo date_rule_item = 4; 135 } 136} 137 138// A rule item composed of a date operation. 139message UserListDateRuleItemInfo { 140 // Date comparison operator. 141 // This field is required and must be populated when creating new date 142 // rule item. 143 google.ads.googleads.v15.enums.UserListDateRuleItemOperatorEnum 144 .UserListDateRuleItemOperator 145 operator = 1; 146 147 // String representing date value to be compared with the rule variable. 148 // Supported date format is YYYY-MM-DD. 149 // Times are reported in the customer's time zone. 150 optional string value = 4; 151 152 // The relative date value of the right hand side denoted by number of days 153 // offset from now. The value field will override this field when both are 154 // present. 155 optional int64 offset_in_days = 5; 156} 157 158// A rule item composed of a number operation. 159message UserListNumberRuleItemInfo { 160 // Number comparison operator. 161 // This field is required and must be populated when creating a new number 162 // rule item. 163 google.ads.googleads.v15.enums.UserListNumberRuleItemOperatorEnum 164 .UserListNumberRuleItemOperator 165 operator = 1; 166 167 // Number value to be compared with the variable. 168 // This field is required and must be populated when creating a new number 169 // rule item. 170 optional double value = 3; 171} 172 173// A rule item composed of a string operation. 174message UserListStringRuleItemInfo { 175 // String comparison operator. 176 // This field is required and must be populated when creating a new string 177 // rule item. 178 google.ads.googleads.v15.enums.UserListStringRuleItemOperatorEnum 179 .UserListStringRuleItemOperator 180 operator = 1; 181 182 // The right hand side of the string rule item. For URLs or referrer URLs, 183 // the value can not contain illegal URL chars such as newlines, quotes, 184 // tabs, or parentheses. This field is required and must be populated when 185 // creating a new string rule item. 186 optional string value = 3; 187} 188 189// Flexible rule that wraps the common rule and a lookback window. 190message FlexibleRuleOperandInfo { 191 // List of rule item groups that defines this rule. 192 // Rule item groups are grouped together. 193 UserListRuleInfo rule = 1; 194 195 // Lookback window for this rule in days. From now until X days ago. 196 optional int64 lookback_window_days = 2; 197} 198 199// Flexible rule representation of visitors with one or multiple actions. The 200// flexible user list is defined by two lists of operands – inclusive_operands 201// and exclusive_operands; each operand represents a set of users based on 202// actions they took in a given timeframe. These lists of operands are combined 203// with the AND_NOT operator, so that users represented by the inclusive 204// operands are included in the user list, minus the users represented by the 205// exclusive operands. 206message FlexibleRuleUserListInfo { 207 // Operator that defines how the inclusive operands are combined. 208 google.ads.googleads.v15.enums.UserListFlexibleRuleOperatorEnum 209 .UserListFlexibleRuleOperator inclusive_rule_operator = 1; 210 211 // Rules representing users that should be included in the user list. These 212 // are located on the left side of the AND_NOT operator, and joined together 213 // by either AND/OR as specified by the inclusive_rule_operator. 214 repeated FlexibleRuleOperandInfo inclusive_operands = 2; 215 216 // Rules representing users that should be excluded from the user list. These 217 // are located on the right side of the AND_NOT operator, and joined together 218 // by OR. 219 repeated FlexibleRuleOperandInfo exclusive_operands = 3; 220} 221 222// Representation of a userlist that is generated by a rule. 223message RuleBasedUserListInfo { 224 // The status of pre-population. The field is default to NONE if not set which 225 // means the previous users will not be considered. If set to REQUESTED, past 226 // site visitors or app users who match the list definition will be included 227 // in the list (works on the Display Network only). This will only 228 // add past users from within the last 30 days, depending on the 229 // list's membership duration and the date when the remarketing tag is added. 230 // The status will be updated to FINISHED once request is processed, or FAILED 231 // if the request fails. 232 google.ads.googleads.v15.enums.UserListPrepopulationStatusEnum 233 .UserListPrepopulationStatus prepopulation_status = 1; 234 235 // Flexible rule representation of visitors with one or multiple actions. The 236 // flexible user list is defined by two lists of operands – inclusive_operands 237 // and exclusive_operands; each operand represents a set of users based on 238 // actions they took in a given timeframe. These lists of operands are 239 // combined with the AND_NOT operator, so that users represented by the 240 // inclusive operands are included in the user list, minus the users 241 // represented by the exclusive operands. 242 FlexibleRuleUserListInfo flexible_rule_user_list = 5; 243} 244 245// Represents a user list that is a custom combination of user lists. 246message LogicalUserListInfo { 247 // Logical list rules that define this user list. The rules are defined as a 248 // logical operator (ALL/ANY/NONE) and a list of user lists. All the rules are 249 // ANDed when they are evaluated. 250 // 251 // Required for creating a logical user list. 252 repeated UserListLogicalRuleInfo rules = 1; 253} 254 255// A user list logical rule. A rule has a logical operator (and/or/not) and a 256// list of user lists as operands. 257message UserListLogicalRuleInfo { 258 // The logical operator of the rule. 259 google.ads.googleads.v15.enums.UserListLogicalRuleOperatorEnum 260 .UserListLogicalRuleOperator 261 operator = 1; 262 263 // The list of operands of the rule. 264 repeated LogicalUserListOperandInfo rule_operands = 2; 265} 266 267// Operand of logical user list that consists of a user list. 268message LogicalUserListOperandInfo { 269 // Resource name of a user list as an operand. 270 optional string user_list = 2; 271} 272 273// User list targeting as a collection of conversions or remarketing actions. 274message BasicUserListInfo { 275 // Actions associated with this user list. 276 repeated UserListActionInfo actions = 1; 277} 278 279// Represents an action type used for building remarketing user lists. 280message UserListActionInfo { 281 // Subtypes of user list action. 282 oneof user_list_action { 283 // A conversion action that's not generated from remarketing. 284 string conversion_action = 3; 285 286 // A remarketing action. 287 string remarketing_action = 4; 288 } 289} 290