/wp-content/plugins/google-listings-and-ads/vendor/googleads/google-ads-php/src/Google/Ads/GoogleAds/V9/Common/UserAttribute.php

https://gitlab.com/remyvianne/krowkaramel · PHP · 346 lines · 113 code · 33 blank · 200 comment · 0 complexity · 0ed1cc1664eb20c028bc166a8e94fc84 MD5 · raw file

  1. <?php
  2. # Generated by the protocol buffer compiler. DO NOT EDIT!
  3. # source: google/ads/googleads/v9/common/offline_user_data.proto
  4. namespace Google\Ads\GoogleAds\V9\Common;
  5. use Google\Protobuf\Internal\GPBType;
  6. use Google\Protobuf\Internal\RepeatedField;
  7. use Google\Protobuf\Internal\GPBUtil;
  8. /**
  9. * User attribute, can only be used with CUSTOMER_MATCH_WITH_ATTRIBUTES job
  10. * type.
  11. *
  12. * Generated from protobuf message <code>google.ads.googleads.v9.common.UserAttribute</code>
  13. */
  14. class UserAttribute extends \Google\Protobuf\Internal\Message
  15. {
  16. /**
  17. * Advertiser defined lifetime value for the user.
  18. *
  19. * Generated from protobuf field <code>optional int64 lifetime_value_micros = 1;</code>
  20. */
  21. protected $lifetime_value_micros = null;
  22. /**
  23. * Advertiser defined lifetime value bucket for the user. The valid range for
  24. * a lifetime value bucket is from 1 (low) to 10 (high), except for remove
  25. * operation where 0 will also be accepted.
  26. *
  27. * Generated from protobuf field <code>optional int32 lifetime_value_bucket = 2;</code>
  28. */
  29. protected $lifetime_value_bucket = null;
  30. /**
  31. * Timestamp of the last purchase made by the user.
  32. * The format is YYYY-MM-DD HH:MM:SS[+/-HH:MM], where [+/-HH:MM] is an
  33. * optional timezone offset from UTC. If the offset is absent, the API will
  34. * use the account's timezone as default.
  35. *
  36. * Generated from protobuf field <code>string last_purchase_date_time = 3;</code>
  37. */
  38. protected $last_purchase_date_time = '';
  39. /**
  40. * Advertiser defined average number of purchases that are made by the user in
  41. * a 30 day period.
  42. *
  43. * Generated from protobuf field <code>int32 average_purchase_count = 4;</code>
  44. */
  45. protected $average_purchase_count = 0;
  46. /**
  47. * Advertiser defined average purchase value in micros for the user.
  48. *
  49. * Generated from protobuf field <code>int64 average_purchase_value_micros = 5;</code>
  50. */
  51. protected $average_purchase_value_micros = 0;
  52. /**
  53. * Timestamp when the user was acquired.
  54. * The format is YYYY-MM-DD HH:MM:SS[+/-HH:MM], where [+/-HH:MM] is an
  55. * optional timezone offset from UTC. If the offset is absent, the API will
  56. * use the account's timezone as default.
  57. *
  58. * Generated from protobuf field <code>string acquisition_date_time = 6;</code>
  59. */
  60. protected $acquisition_date_time = '';
  61. /**
  62. * The shopping loyalty related data. Shopping utilizes this data to provide
  63. * users with a better experience. Accessible only to merchants on the
  64. * allow-list with users’ consent.
  65. *
  66. * Generated from protobuf field <code>optional .google.ads.googleads.v9.common.ShoppingLoyalty shopping_loyalty = 7;</code>
  67. */
  68. protected $shopping_loyalty = null;
  69. /**
  70. * Constructor.
  71. *
  72. * @param array $data {
  73. * Optional. Data for populating the Message object.
  74. *
  75. * @type int|string $lifetime_value_micros
  76. * Advertiser defined lifetime value for the user.
  77. * @type int $lifetime_value_bucket
  78. * Advertiser defined lifetime value bucket for the user. The valid range for
  79. * a lifetime value bucket is from 1 (low) to 10 (high), except for remove
  80. * operation where 0 will also be accepted.
  81. * @type string $last_purchase_date_time
  82. * Timestamp of the last purchase made by the user.
  83. * The format is YYYY-MM-DD HH:MM:SS[+/-HH:MM], where [+/-HH:MM] is an
  84. * optional timezone offset from UTC. If the offset is absent, the API will
  85. * use the account's timezone as default.
  86. * @type int $average_purchase_count
  87. * Advertiser defined average number of purchases that are made by the user in
  88. * a 30 day period.
  89. * @type int|string $average_purchase_value_micros
  90. * Advertiser defined average purchase value in micros for the user.
  91. * @type string $acquisition_date_time
  92. * Timestamp when the user was acquired.
  93. * The format is YYYY-MM-DD HH:MM:SS[+/-HH:MM], where [+/-HH:MM] is an
  94. * optional timezone offset from UTC. If the offset is absent, the API will
  95. * use the account's timezone as default.
  96. * @type \Google\Ads\GoogleAds\V9\Common\ShoppingLoyalty $shopping_loyalty
  97. * The shopping loyalty related data. Shopping utilizes this data to provide
  98. * users with a better experience. Accessible only to merchants on the
  99. * allow-list with users’ consent.
  100. * }
  101. */
  102. public function __construct($data = NULL) {
  103. \GPBMetadata\Google\Ads\GoogleAds\V9\Common\OfflineUserData::initOnce();
  104. parent::__construct($data);
  105. }
  106. /**
  107. * Advertiser defined lifetime value for the user.
  108. *
  109. * Generated from protobuf field <code>optional int64 lifetime_value_micros = 1;</code>
  110. * @return int|string
  111. */
  112. public function getLifetimeValueMicros()
  113. {
  114. return isset($this->lifetime_value_micros) ? $this->lifetime_value_micros : 0;
  115. }
  116. public function hasLifetimeValueMicros()
  117. {
  118. return isset($this->lifetime_value_micros);
  119. }
  120. public function clearLifetimeValueMicros()
  121. {
  122. unset($this->lifetime_value_micros);
  123. }
  124. /**
  125. * Advertiser defined lifetime value for the user.
  126. *
  127. * Generated from protobuf field <code>optional int64 lifetime_value_micros = 1;</code>
  128. * @param int|string $var
  129. * @return $this
  130. */
  131. public function setLifetimeValueMicros($var)
  132. {
  133. GPBUtil::checkInt64($var);
  134. $this->lifetime_value_micros = $var;
  135. return $this;
  136. }
  137. /**
  138. * Advertiser defined lifetime value bucket for the user. The valid range for
  139. * a lifetime value bucket is from 1 (low) to 10 (high), except for remove
  140. * operation where 0 will also be accepted.
  141. *
  142. * Generated from protobuf field <code>optional int32 lifetime_value_bucket = 2;</code>
  143. * @return int
  144. */
  145. public function getLifetimeValueBucket()
  146. {
  147. return isset($this->lifetime_value_bucket) ? $this->lifetime_value_bucket : 0;
  148. }
  149. public function hasLifetimeValueBucket()
  150. {
  151. return isset($this->lifetime_value_bucket);
  152. }
  153. public function clearLifetimeValueBucket()
  154. {
  155. unset($this->lifetime_value_bucket);
  156. }
  157. /**
  158. * Advertiser defined lifetime value bucket for the user. The valid range for
  159. * a lifetime value bucket is from 1 (low) to 10 (high), except for remove
  160. * operation where 0 will also be accepted.
  161. *
  162. * Generated from protobuf field <code>optional int32 lifetime_value_bucket = 2;</code>
  163. * @param int $var
  164. * @return $this
  165. */
  166. public function setLifetimeValueBucket($var)
  167. {
  168. GPBUtil::checkInt32($var);
  169. $this->lifetime_value_bucket = $var;
  170. return $this;
  171. }
  172. /**
  173. * Timestamp of the last purchase made by the user.
  174. * The format is YYYY-MM-DD HH:MM:SS[+/-HH:MM], where [+/-HH:MM] is an
  175. * optional timezone offset from UTC. If the offset is absent, the API will
  176. * use the account's timezone as default.
  177. *
  178. * Generated from protobuf field <code>string last_purchase_date_time = 3;</code>
  179. * @return string
  180. */
  181. public function getLastPurchaseDateTime()
  182. {
  183. return $this->last_purchase_date_time;
  184. }
  185. /**
  186. * Timestamp of the last purchase made by the user.
  187. * The format is YYYY-MM-DD HH:MM:SS[+/-HH:MM], where [+/-HH:MM] is an
  188. * optional timezone offset from UTC. If the offset is absent, the API will
  189. * use the account's timezone as default.
  190. *
  191. * Generated from protobuf field <code>string last_purchase_date_time = 3;</code>
  192. * @param string $var
  193. * @return $this
  194. */
  195. public function setLastPurchaseDateTime($var)
  196. {
  197. GPBUtil::checkString($var, True);
  198. $this->last_purchase_date_time = $var;
  199. return $this;
  200. }
  201. /**
  202. * Advertiser defined average number of purchases that are made by the user in
  203. * a 30 day period.
  204. *
  205. * Generated from protobuf field <code>int32 average_purchase_count = 4;</code>
  206. * @return int
  207. */
  208. public function getAveragePurchaseCount()
  209. {
  210. return $this->average_purchase_count;
  211. }
  212. /**
  213. * Advertiser defined average number of purchases that are made by the user in
  214. * a 30 day period.
  215. *
  216. * Generated from protobuf field <code>int32 average_purchase_count = 4;</code>
  217. * @param int $var
  218. * @return $this
  219. */
  220. public function setAveragePurchaseCount($var)
  221. {
  222. GPBUtil::checkInt32($var);
  223. $this->average_purchase_count = $var;
  224. return $this;
  225. }
  226. /**
  227. * Advertiser defined average purchase value in micros for the user.
  228. *
  229. * Generated from protobuf field <code>int64 average_purchase_value_micros = 5;</code>
  230. * @return int|string
  231. */
  232. public function getAveragePurchaseValueMicros()
  233. {
  234. return $this->average_purchase_value_micros;
  235. }
  236. /**
  237. * Advertiser defined average purchase value in micros for the user.
  238. *
  239. * Generated from protobuf field <code>int64 average_purchase_value_micros = 5;</code>
  240. * @param int|string $var
  241. * @return $this
  242. */
  243. public function setAveragePurchaseValueMicros($var)
  244. {
  245. GPBUtil::checkInt64($var);
  246. $this->average_purchase_value_micros = $var;
  247. return $this;
  248. }
  249. /**
  250. * Timestamp when the user was acquired.
  251. * The format is YYYY-MM-DD HH:MM:SS[+/-HH:MM], where [+/-HH:MM] is an
  252. * optional timezone offset from UTC. If the offset is absent, the API will
  253. * use the account's timezone as default.
  254. *
  255. * Generated from protobuf field <code>string acquisition_date_time = 6;</code>
  256. * @return string
  257. */
  258. public function getAcquisitionDateTime()
  259. {
  260. return $this->acquisition_date_time;
  261. }
  262. /**
  263. * Timestamp when the user was acquired.
  264. * The format is YYYY-MM-DD HH:MM:SS[+/-HH:MM], where [+/-HH:MM] is an
  265. * optional timezone offset from UTC. If the offset is absent, the API will
  266. * use the account's timezone as default.
  267. *
  268. * Generated from protobuf field <code>string acquisition_date_time = 6;</code>
  269. * @param string $var
  270. * @return $this
  271. */
  272. public function setAcquisitionDateTime($var)
  273. {
  274. GPBUtil::checkString($var, True);
  275. $this->acquisition_date_time = $var;
  276. return $this;
  277. }
  278. /**
  279. * The shopping loyalty related data. Shopping utilizes this data to provide
  280. * users with a better experience. Accessible only to merchants on the
  281. * allow-list with users’ consent.
  282. *
  283. * Generated from protobuf field <code>optional .google.ads.googleads.v9.common.ShoppingLoyalty shopping_loyalty = 7;</code>
  284. * @return \Google\Ads\GoogleAds\V9\Common\ShoppingLoyalty|null
  285. */
  286. public function getShoppingLoyalty()
  287. {
  288. return $this->shopping_loyalty;
  289. }
  290. public function hasShoppingLoyalty()
  291. {
  292. return isset($this->shopping_loyalty);
  293. }
  294. public function clearShoppingLoyalty()
  295. {
  296. unset($this->shopping_loyalty);
  297. }
  298. /**
  299. * The shopping loyalty related data. Shopping utilizes this data to provide
  300. * users with a better experience. Accessible only to merchants on the
  301. * allow-list with users’ consent.
  302. *
  303. * Generated from protobuf field <code>optional .google.ads.googleads.v9.common.ShoppingLoyalty shopping_loyalty = 7;</code>
  304. * @param \Google\Ads\GoogleAds\V9\Common\ShoppingLoyalty $var
  305. * @return $this
  306. */
  307. public function setShoppingLoyalty($var)
  308. {
  309. GPBUtil::checkMessage($var, \Google\Ads\GoogleAds\V9\Common\ShoppingLoyalty::class);
  310. $this->shopping_loyalty = $var;
  311. return $this;
  312. }
  313. }