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

https://gitlab.com/remyvianne/krowkaramel · PHP · 263 lines · 99 code · 29 blank · 135 comment · 0 complexity · 1cbab417e25ae4138a6199007db3e028 MD5 · raw file

  1. <?php
  2. # Generated by the protocol buffer compiler. DO NOT EDIT!
  3. # source: google/ads/googleads/v9/services/geo_target_constant_service.proto
  4. namespace Google\Ads\GoogleAds\V9\Services;
  5. use Google\Protobuf\Internal\GPBType;
  6. use Google\Protobuf\Internal\RepeatedField;
  7. use Google\Protobuf\Internal\GPBUtil;
  8. /**
  9. * A geo target constant suggestion.
  10. *
  11. * Generated from protobuf message <code>google.ads.googleads.v9.services.GeoTargetConstantSuggestion</code>
  12. */
  13. class GeoTargetConstantSuggestion extends \Google\Protobuf\Internal\Message
  14. {
  15. /**
  16. * The language this GeoTargetConstantSuggestion is currently translated to.
  17. * It affects the name of geo target fields. For example, if locale=en, then
  18. * name=Spain. If locale=es, then name=España. The default locale will be
  19. * returned if no translation exists for the locale in the request.
  20. *
  21. * Generated from protobuf field <code>optional string locale = 6;</code>
  22. */
  23. protected $locale = null;
  24. /**
  25. * Approximate user population that will be targeted, rounded to the
  26. * nearest 100.
  27. *
  28. * Generated from protobuf field <code>optional int64 reach = 7;</code>
  29. */
  30. protected $reach = null;
  31. /**
  32. * If the request searched by location name, this is the location name that
  33. * matched the geo target.
  34. *
  35. * Generated from protobuf field <code>optional string search_term = 8;</code>
  36. */
  37. protected $search_term = null;
  38. /**
  39. * The GeoTargetConstant result.
  40. *
  41. * Generated from protobuf field <code>.google.ads.googleads.v9.resources.GeoTargetConstant geo_target_constant = 4;</code>
  42. */
  43. protected $geo_target_constant = null;
  44. /**
  45. * The list of parents of the geo target constant.
  46. *
  47. * Generated from protobuf field <code>repeated .google.ads.googleads.v9.resources.GeoTargetConstant geo_target_constant_parents = 5;</code>
  48. */
  49. private $geo_target_constant_parents;
  50. /**
  51. * Constructor.
  52. *
  53. * @param array $data {
  54. * Optional. Data for populating the Message object.
  55. *
  56. * @type string $locale
  57. * The language this GeoTargetConstantSuggestion is currently translated to.
  58. * It affects the name of geo target fields. For example, if locale=en, then
  59. * name=Spain. If locale=es, then name=España. The default locale will be
  60. * returned if no translation exists for the locale in the request.
  61. * @type int|string $reach
  62. * Approximate user population that will be targeted, rounded to the
  63. * nearest 100.
  64. * @type string $search_term
  65. * If the request searched by location name, this is the location name that
  66. * matched the geo target.
  67. * @type \Google\Ads\GoogleAds\V9\Resources\GeoTargetConstant $geo_target_constant
  68. * The GeoTargetConstant result.
  69. * @type \Google\Ads\GoogleAds\V9\Resources\GeoTargetConstant[]|\Google\Protobuf\Internal\RepeatedField $geo_target_constant_parents
  70. * The list of parents of the geo target constant.
  71. * }
  72. */
  73. public function __construct($data = NULL) {
  74. \GPBMetadata\Google\Ads\GoogleAds\V9\Services\GeoTargetConstantService::initOnce();
  75. parent::__construct($data);
  76. }
  77. /**
  78. * The language this GeoTargetConstantSuggestion is currently translated to.
  79. * It affects the name of geo target fields. For example, if locale=en, then
  80. * name=Spain. If locale=es, then name=España. The default locale will be
  81. * returned if no translation exists for the locale in the request.
  82. *
  83. * Generated from protobuf field <code>optional string locale = 6;</code>
  84. * @return string
  85. */
  86. public function getLocale()
  87. {
  88. return isset($this->locale) ? $this->locale : '';
  89. }
  90. public function hasLocale()
  91. {
  92. return isset($this->locale);
  93. }
  94. public function clearLocale()
  95. {
  96. unset($this->locale);
  97. }
  98. /**
  99. * The language this GeoTargetConstantSuggestion is currently translated to.
  100. * It affects the name of geo target fields. For example, if locale=en, then
  101. * name=Spain. If locale=es, then name=España. The default locale will be
  102. * returned if no translation exists for the locale in the request.
  103. *
  104. * Generated from protobuf field <code>optional string locale = 6;</code>
  105. * @param string $var
  106. * @return $this
  107. */
  108. public function setLocale($var)
  109. {
  110. GPBUtil::checkString($var, True);
  111. $this->locale = $var;
  112. return $this;
  113. }
  114. /**
  115. * Approximate user population that will be targeted, rounded to the
  116. * nearest 100.
  117. *
  118. * Generated from protobuf field <code>optional int64 reach = 7;</code>
  119. * @return int|string
  120. */
  121. public function getReach()
  122. {
  123. return isset($this->reach) ? $this->reach : 0;
  124. }
  125. public function hasReach()
  126. {
  127. return isset($this->reach);
  128. }
  129. public function clearReach()
  130. {
  131. unset($this->reach);
  132. }
  133. /**
  134. * Approximate user population that will be targeted, rounded to the
  135. * nearest 100.
  136. *
  137. * Generated from protobuf field <code>optional int64 reach = 7;</code>
  138. * @param int|string $var
  139. * @return $this
  140. */
  141. public function setReach($var)
  142. {
  143. GPBUtil::checkInt64($var);
  144. $this->reach = $var;
  145. return $this;
  146. }
  147. /**
  148. * If the request searched by location name, this is the location name that
  149. * matched the geo target.
  150. *
  151. * Generated from protobuf field <code>optional string search_term = 8;</code>
  152. * @return string
  153. */
  154. public function getSearchTerm()
  155. {
  156. return isset($this->search_term) ? $this->search_term : '';
  157. }
  158. public function hasSearchTerm()
  159. {
  160. return isset($this->search_term);
  161. }
  162. public function clearSearchTerm()
  163. {
  164. unset($this->search_term);
  165. }
  166. /**
  167. * If the request searched by location name, this is the location name that
  168. * matched the geo target.
  169. *
  170. * Generated from protobuf field <code>optional string search_term = 8;</code>
  171. * @param string $var
  172. * @return $this
  173. */
  174. public function setSearchTerm($var)
  175. {
  176. GPBUtil::checkString($var, True);
  177. $this->search_term = $var;
  178. return $this;
  179. }
  180. /**
  181. * The GeoTargetConstant result.
  182. *
  183. * Generated from protobuf field <code>.google.ads.googleads.v9.resources.GeoTargetConstant geo_target_constant = 4;</code>
  184. * @return \Google\Ads\GoogleAds\V9\Resources\GeoTargetConstant|null
  185. */
  186. public function getGeoTargetConstant()
  187. {
  188. return $this->geo_target_constant;
  189. }
  190. public function hasGeoTargetConstant()
  191. {
  192. return isset($this->geo_target_constant);
  193. }
  194. public function clearGeoTargetConstant()
  195. {
  196. unset($this->geo_target_constant);
  197. }
  198. /**
  199. * The GeoTargetConstant result.
  200. *
  201. * Generated from protobuf field <code>.google.ads.googleads.v9.resources.GeoTargetConstant geo_target_constant = 4;</code>
  202. * @param \Google\Ads\GoogleAds\V9\Resources\GeoTargetConstant $var
  203. * @return $this
  204. */
  205. public function setGeoTargetConstant($var)
  206. {
  207. GPBUtil::checkMessage($var, \Google\Ads\GoogleAds\V9\Resources\GeoTargetConstant::class);
  208. $this->geo_target_constant = $var;
  209. return $this;
  210. }
  211. /**
  212. * The list of parents of the geo target constant.
  213. *
  214. * Generated from protobuf field <code>repeated .google.ads.googleads.v9.resources.GeoTargetConstant geo_target_constant_parents = 5;</code>
  215. * @return \Google\Protobuf\Internal\RepeatedField
  216. */
  217. public function getGeoTargetConstantParents()
  218. {
  219. return $this->geo_target_constant_parents;
  220. }
  221. /**
  222. * The list of parents of the geo target constant.
  223. *
  224. * Generated from protobuf field <code>repeated .google.ads.googleads.v9.resources.GeoTargetConstant geo_target_constant_parents = 5;</code>
  225. * @param \Google\Ads\GoogleAds\V9\Resources\GeoTargetConstant[]|\Google\Protobuf\Internal\RepeatedField $var
  226. * @return $this
  227. */
  228. public function setGeoTargetConstantParents($var)
  229. {
  230. $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Ads\GoogleAds\V9\Resources\GeoTargetConstant::class);
  231. $this->geo_target_constant_parents = $arr;
  232. return $this;
  233. }
  234. }