Item.php 3.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169
  1. <?php
  2. # Generated by the protocol buffer compiler. DO NOT EDIT!
  3. # source: tulip.proto
  4. namespace Mint\Tulip\V1\SearchResponse;
  5. use Google\Protobuf\Internal\GPBType;
  6. use Google\Protobuf\Internal\RepeatedField;
  7. use Google\Protobuf\Internal\GPBUtil;
  8. /**
  9. * Generated from protobuf message <code>mint.tulip.v1.SearchResponse.Item</code>
  10. */
  11. class Item extends \Google\Protobuf\Internal\Message
  12. {
  13. /**
  14. * Generated from protobuf field <code>float rank = 1;</code>
  15. */
  16. protected $rank = 0.0;
  17. /**
  18. * Generated from protobuf field <code>string highlight = 2;</code>
  19. */
  20. protected $highlight = '';
  21. /**
  22. * Generated from protobuf field <code>int32 book = 3;</code>
  23. */
  24. protected $book = 0;
  25. /**
  26. * Generated from protobuf field <code>int32 paragraph = 4;</code>
  27. */
  28. protected $paragraph = 0;
  29. /**
  30. * Generated from protobuf field <code>string content = 5;</code>
  31. */
  32. protected $content = '';
  33. /**
  34. * Constructor.
  35. *
  36. * @param array $data {
  37. * Optional. Data for populating the Message object.
  38. *
  39. * @type float $rank
  40. * @type string $highlight
  41. * @type int $book
  42. * @type int $paragraph
  43. * @type string $content
  44. * }
  45. */
  46. public function __construct($data = NULL) {
  47. \GPBMetadata\Tulip::initOnce();
  48. parent::__construct($data);
  49. }
  50. /**
  51. * Generated from protobuf field <code>float rank = 1;</code>
  52. * @return float
  53. */
  54. public function getRank()
  55. {
  56. return $this->rank;
  57. }
  58. /**
  59. * Generated from protobuf field <code>float rank = 1;</code>
  60. * @param float $var
  61. * @return $this
  62. */
  63. public function setRank($var)
  64. {
  65. GPBUtil::checkFloat($var);
  66. $this->rank = $var;
  67. return $this;
  68. }
  69. /**
  70. * Generated from protobuf field <code>string highlight = 2;</code>
  71. * @return string
  72. */
  73. public function getHighlight()
  74. {
  75. return $this->highlight;
  76. }
  77. /**
  78. * Generated from protobuf field <code>string highlight = 2;</code>
  79. * @param string $var
  80. * @return $this
  81. */
  82. public function setHighlight($var)
  83. {
  84. GPBUtil::checkString($var, True);
  85. $this->highlight = $var;
  86. return $this;
  87. }
  88. /**
  89. * Generated from protobuf field <code>int32 book = 3;</code>
  90. * @return int
  91. */
  92. public function getBook()
  93. {
  94. return $this->book;
  95. }
  96. /**
  97. * Generated from protobuf field <code>int32 book = 3;</code>
  98. * @param int $var
  99. * @return $this
  100. */
  101. public function setBook($var)
  102. {
  103. GPBUtil::checkInt32($var);
  104. $this->book = $var;
  105. return $this;
  106. }
  107. /**
  108. * Generated from protobuf field <code>int32 paragraph = 4;</code>
  109. * @return int
  110. */
  111. public function getParagraph()
  112. {
  113. return $this->paragraph;
  114. }
  115. /**
  116. * Generated from protobuf field <code>int32 paragraph = 4;</code>
  117. * @param int $var
  118. * @return $this
  119. */
  120. public function setParagraph($var)
  121. {
  122. GPBUtil::checkInt32($var);
  123. $this->paragraph = $var;
  124. return $this;
  125. }
  126. /**
  127. * Generated from protobuf field <code>string content = 5;</code>
  128. * @return string
  129. */
  130. public function getContent()
  131. {
  132. return $this->content;
  133. }
  134. /**
  135. * Generated from protobuf field <code>string content = 5;</code>
  136. * @param string $var
  137. * @return $this
  138. */
  139. public function setContent($var)
  140. {
  141. GPBUtil::checkString($var, True);
  142. $this->content = $var;
  143. return $this;
  144. }
  145. }
  146. // Adding a class alias for backwards compatibility with the previous class name.
  147. class_alias(Item::class, \Mint\Tulip\V1\SearchResponse_Item::class);