SearchRequest.php 3.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151
  1. <?php
  2. # Generated by the protocol buffer compiler. DO NOT EDIT!
  3. # source: tulip.proto
  4. namespace Mint\Tulip\V1;
  5. use Google\Protobuf\Internal\GPBType;
  6. use Google\Protobuf\Internal\RepeatedField;
  7. use Google\Protobuf\Internal\GPBUtil;
  8. /**
  9. * ----------------------------------------------------------------------------
  10. *
  11. * Generated from protobuf message <code>mint.tulip.v1.SearchRequest</code>
  12. */
  13. class SearchRequest extends \Google\Protobuf\Internal\Message
  14. {
  15. /**
  16. * Generated from protobuf field <code>repeated string keywords = 1;</code>
  17. */
  18. private $keywords;
  19. /**
  20. * Generated from protobuf field <code>repeated int32 books = 2;</code>
  21. */
  22. private $books;
  23. /**
  24. * Generated from protobuf field <code>string match_mode = 3;</code>
  25. */
  26. protected $match_mode = '';
  27. /**
  28. * Generated from protobuf field <code>optional .mint.tulip.v1.SearchRequest.Page page = 99;</code>
  29. */
  30. protected $page = null;
  31. /**
  32. * Constructor.
  33. *
  34. * @param array $data {
  35. * Optional. Data for populating the Message object.
  36. *
  37. * @type array<string>|\Google\Protobuf\Internal\RepeatedField $keywords
  38. * @type array<int>|\Google\Protobuf\Internal\RepeatedField $books
  39. * @type string $match_mode
  40. * @type \Mint\Tulip\V1\SearchRequest\Page $page
  41. * }
  42. */
  43. public function __construct($data = NULL) {
  44. \GPBMetadata\Tulip::initOnce();
  45. parent::__construct($data);
  46. }
  47. /**
  48. * Generated from protobuf field <code>repeated string keywords = 1;</code>
  49. * @return \Google\Protobuf\Internal\RepeatedField
  50. */
  51. public function getKeywords()
  52. {
  53. return $this->keywords;
  54. }
  55. /**
  56. * Generated from protobuf field <code>repeated string keywords = 1;</code>
  57. * @param array<string>|\Google\Protobuf\Internal\RepeatedField $var
  58. * @return $this
  59. */
  60. public function setKeywords($var)
  61. {
  62. $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING);
  63. $this->keywords = $arr;
  64. return $this;
  65. }
  66. /**
  67. * Generated from protobuf field <code>repeated int32 books = 2;</code>
  68. * @return \Google\Protobuf\Internal\RepeatedField
  69. */
  70. public function getBooks()
  71. {
  72. return $this->books;
  73. }
  74. /**
  75. * Generated from protobuf field <code>repeated int32 books = 2;</code>
  76. * @param array<int>|\Google\Protobuf\Internal\RepeatedField $var
  77. * @return $this
  78. */
  79. public function setBooks($var)
  80. {
  81. $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::INT32);
  82. $this->books = $arr;
  83. return $this;
  84. }
  85. /**
  86. * Generated from protobuf field <code>string match_mode = 3;</code>
  87. * @return string
  88. */
  89. public function getMatchMode()
  90. {
  91. return $this->match_mode;
  92. }
  93. /**
  94. * Generated from protobuf field <code>string match_mode = 3;</code>
  95. * @param string $var
  96. * @return $this
  97. */
  98. public function setMatchMode($var)
  99. {
  100. GPBUtil::checkString($var, True);
  101. $this->match_mode = $var;
  102. return $this;
  103. }
  104. /**
  105. * Generated from protobuf field <code>optional .mint.tulip.v1.SearchRequest.Page page = 99;</code>
  106. * @return \Mint\Tulip\V1\SearchRequest\Page|null
  107. */
  108. public function getPage()
  109. {
  110. return $this->page;
  111. }
  112. public function hasPage()
  113. {
  114. return isset($this->page);
  115. }
  116. public function clearPage()
  117. {
  118. unset($this->page);
  119. }
  120. /**
  121. * Generated from protobuf field <code>optional .mint.tulip.v1.SearchRequest.Page page = 99;</code>
  122. * @param \Mint\Tulip\V1\SearchRequest\Page $var
  123. * @return $this
  124. */
  125. public function setPage($var)
  126. {
  127. GPBUtil::checkMessage($var, \Mint\Tulip\V1\SearchRequest\Page::class);
  128. $this->page = $var;
  129. return $this;
  130. }
  131. }