PageRenderTime 38ms CodeModel.GetById 9ms RepoModel.GetById 0ms app.codeStats 0ms

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

https://gitlab.com/remyvianne/krowkaramel
PHP | 191 lines | 61 code | 19 blank | 111 comment | 0 complexity | 3babbc556ef6e8471b216060628640ea MD5 | raw file
  1. <?php
  2. # Generated by the protocol buffer compiler. DO NOT EDIT!
  3. # source: google/ads/googleads/v9/services/keyword_plan_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 keyword historical metrics.
  10. *
  11. * Generated from protobuf message <code>google.ads.googleads.v9.services.KeywordPlanKeywordHistoricalMetrics</code>
  12. */
  13. class KeywordPlanKeywordHistoricalMetrics extends \Google\Protobuf\Internal\Message
  14. {
  15. /**
  16. * The text of the query associated with one or more ad_group_keywords in the
  17. * plan.
  18. * Note that we de-dupe your keywords list, eliminating close variants before
  19. * returning the plan's keywords as text. For example, if your plan originally
  20. * contained the keywords 'car' and 'cars', the returned search query will
  21. * only contain 'cars'.
  22. * Starting V5, the list of de-duped queries will be included in
  23. * close_variants field.
  24. *
  25. * Generated from protobuf field <code>optional string search_query = 4;</code>
  26. */
  27. protected $search_query = null;
  28. /**
  29. * The list of close variant queries for search_query whose search results
  30. * are combined into the search_query.
  31. *
  32. * Generated from protobuf field <code>repeated string close_variants = 3;</code>
  33. */
  34. private $close_variants;
  35. /**
  36. * The historical metrics for the query associated with one or more
  37. * ad_group_keywords in the plan.
  38. *
  39. * Generated from protobuf field <code>.google.ads.googleads.v9.common.KeywordPlanHistoricalMetrics keyword_metrics = 2;</code>
  40. */
  41. protected $keyword_metrics = null;
  42. /**
  43. * Constructor.
  44. *
  45. * @param array $data {
  46. * Optional. Data for populating the Message object.
  47. *
  48. * @type string $search_query
  49. * The text of the query associated with one or more ad_group_keywords in the
  50. * plan.
  51. * Note that we de-dupe your keywords list, eliminating close variants before
  52. * returning the plan's keywords as text. For example, if your plan originally
  53. * contained the keywords 'car' and 'cars', the returned search query will
  54. * only contain 'cars'.
  55. * Starting V5, the list of de-duped queries will be included in
  56. * close_variants field.
  57. * @type string[]|\Google\Protobuf\Internal\RepeatedField $close_variants
  58. * The list of close variant queries for search_query whose search results
  59. * are combined into the search_query.
  60. * @type \Google\Ads\GoogleAds\V9\Common\KeywordPlanHistoricalMetrics $keyword_metrics
  61. * The historical metrics for the query associated with one or more
  62. * ad_group_keywords in the plan.
  63. * }
  64. */
  65. public function __construct($data = NULL) {
  66. \GPBMetadata\Google\Ads\GoogleAds\V9\Services\KeywordPlanService::initOnce();
  67. parent::__construct($data);
  68. }
  69. /**
  70. * The text of the query associated with one or more ad_group_keywords in the
  71. * plan.
  72. * Note that we de-dupe your keywords list, eliminating close variants before
  73. * returning the plan's keywords as text. For example, if your plan originally
  74. * contained the keywords 'car' and 'cars', the returned search query will
  75. * only contain 'cars'.
  76. * Starting V5, the list of de-duped queries will be included in
  77. * close_variants field.
  78. *
  79. * Generated from protobuf field <code>optional string search_query = 4;</code>
  80. * @return string
  81. */
  82. public function getSearchQuery()
  83. {
  84. return isset($this->search_query) ? $this->search_query : '';
  85. }
  86. public function hasSearchQuery()
  87. {
  88. return isset($this->search_query);
  89. }
  90. public function clearSearchQuery()
  91. {
  92. unset($this->search_query);
  93. }
  94. /**
  95. * The text of the query associated with one or more ad_group_keywords in the
  96. * plan.
  97. * Note that we de-dupe your keywords list, eliminating close variants before
  98. * returning the plan's keywords as text. For example, if your plan originally
  99. * contained the keywords 'car' and 'cars', the returned search query will
  100. * only contain 'cars'.
  101. * Starting V5, the list of de-duped queries will be included in
  102. * close_variants field.
  103. *
  104. * Generated from protobuf field <code>optional string search_query = 4;</code>
  105. * @param string $var
  106. * @return $this
  107. */
  108. public function setSearchQuery($var)
  109. {
  110. GPBUtil::checkString($var, True);
  111. $this->search_query = $var;
  112. return $this;
  113. }
  114. /**
  115. * The list of close variant queries for search_query whose search results
  116. * are combined into the search_query.
  117. *
  118. * Generated from protobuf field <code>repeated string close_variants = 3;</code>
  119. * @return \Google\Protobuf\Internal\RepeatedField
  120. */
  121. public function getCloseVariants()
  122. {
  123. return $this->close_variants;
  124. }
  125. /**
  126. * The list of close variant queries for search_query whose search results
  127. * are combined into the search_query.
  128. *
  129. * Generated from protobuf field <code>repeated string close_variants = 3;</code>
  130. * @param string[]|\Google\Protobuf\Internal\RepeatedField $var
  131. * @return $this
  132. */
  133. public function setCloseVariants($var)
  134. {
  135. $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING);
  136. $this->close_variants = $arr;
  137. return $this;
  138. }
  139. /**
  140. * The historical metrics for the query associated with one or more
  141. * ad_group_keywords in the plan.
  142. *
  143. * Generated from protobuf field <code>.google.ads.googleads.v9.common.KeywordPlanHistoricalMetrics keyword_metrics = 2;</code>
  144. * @return \Google\Ads\GoogleAds\V9\Common\KeywordPlanHistoricalMetrics|null
  145. */
  146. public function getKeywordMetrics()
  147. {
  148. return $this->keyword_metrics;
  149. }
  150. public function hasKeywordMetrics()
  151. {
  152. return isset($this->keyword_metrics);
  153. }
  154. public function clearKeywordMetrics()
  155. {
  156. unset($this->keyword_metrics);
  157. }
  158. /**
  159. * The historical metrics for the query associated with one or more
  160. * ad_group_keywords in the plan.
  161. *
  162. * Generated from protobuf field <code>.google.ads.googleads.v9.common.KeywordPlanHistoricalMetrics keyword_metrics = 2;</code>
  163. * @param \Google\Ads\GoogleAds\V9\Common\KeywordPlanHistoricalMetrics $var
  164. * @return $this
  165. */
  166. public function setKeywordMetrics($var)
  167. {
  168. GPBUtil::checkMessage($var, \Google\Ads\GoogleAds\V9\Common\KeywordPlanHistoricalMetrics::class);
  169. $this->keyword_metrics = $var;
  170. return $this;
  171. }
  172. }