ChatMessage.php 4.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195
  1. <?php
  2. # Generated by the protocol buffer compiler. DO NOT EDIT!
  3. # source: common.proto
  4. namespace Common_pack;
  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>common_pack.ChatMessage</code>
  12. */
  13. class ChatMessage extends \Google\Protobuf\Internal\Message
  14. {
  15. /**
  16. * Generated from protobuf field <code>int32 id = 1;</code>
  17. */
  18. protected $id = 0;
  19. /**
  20. * Generated from protobuf field <code>string session_id = 2;</code>
  21. */
  22. protected $session_id = '';
  23. /**
  24. * Generated from protobuf field <code>string sender_id = 3;</code>
  25. */
  26. protected $sender_id = '';
  27. /**
  28. * Generated from protobuf field <code>string content = 4;</code>
  29. */
  30. protected $content = '';
  31. /**
  32. * Generated from protobuf field <code>string created_at = 5;</code>
  33. */
  34. protected $created_at = '';
  35. /**
  36. * Generated from protobuf field <code>string content_type = 6;</code>
  37. */
  38. protected $content_type = '';
  39. /**
  40. * Constructor.
  41. *
  42. * @param array $data {
  43. * Optional. Data for populating the Message object.
  44. *
  45. * @type int $id
  46. * @type string $session_id
  47. * @type string $sender_id
  48. * @type string $content
  49. * @type string $created_at
  50. * @type string $content_type
  51. * }
  52. */
  53. public function __construct($data = NULL) {
  54. \GPBMetadata\Common::initOnce();
  55. parent::__construct($data);
  56. }
  57. /**
  58. * Generated from protobuf field <code>int32 id = 1;</code>
  59. * @return int
  60. */
  61. public function getId()
  62. {
  63. return $this->id;
  64. }
  65. /**
  66. * Generated from protobuf field <code>int32 id = 1;</code>
  67. * @param int $var
  68. * @return $this
  69. */
  70. public function setId($var)
  71. {
  72. GPBUtil::checkInt32($var);
  73. $this->id = $var;
  74. return $this;
  75. }
  76. /**
  77. * Generated from protobuf field <code>string session_id = 2;</code>
  78. * @return string
  79. */
  80. public function getSessionId()
  81. {
  82. return $this->session_id;
  83. }
  84. /**
  85. * Generated from protobuf field <code>string session_id = 2;</code>
  86. * @param string $var
  87. * @return $this
  88. */
  89. public function setSessionId($var)
  90. {
  91. GPBUtil::checkString($var, True);
  92. $this->session_id = $var;
  93. return $this;
  94. }
  95. /**
  96. * Generated from protobuf field <code>string sender_id = 3;</code>
  97. * @return string
  98. */
  99. public function getSenderId()
  100. {
  101. return $this->sender_id;
  102. }
  103. /**
  104. * Generated from protobuf field <code>string sender_id = 3;</code>
  105. * @param string $var
  106. * @return $this
  107. */
  108. public function setSenderId($var)
  109. {
  110. GPBUtil::checkString($var, True);
  111. $this->sender_id = $var;
  112. return $this;
  113. }
  114. /**
  115. * Generated from protobuf field <code>string content = 4;</code>
  116. * @return string
  117. */
  118. public function getContent()
  119. {
  120. return $this->content;
  121. }
  122. /**
  123. * Generated from protobuf field <code>string content = 4;</code>
  124. * @param string $var
  125. * @return $this
  126. */
  127. public function setContent($var)
  128. {
  129. GPBUtil::checkString($var, True);
  130. $this->content = $var;
  131. return $this;
  132. }
  133. /**
  134. * Generated from protobuf field <code>string created_at = 5;</code>
  135. * @return string
  136. */
  137. public function getCreatedAt()
  138. {
  139. return $this->created_at;
  140. }
  141. /**
  142. * Generated from protobuf field <code>string created_at = 5;</code>
  143. * @param string $var
  144. * @return $this
  145. */
  146. public function setCreatedAt($var)
  147. {
  148. GPBUtil::checkString($var, True);
  149. $this->created_at = $var;
  150. return $this;
  151. }
  152. /**
  153. * Generated from protobuf field <code>string content_type = 6;</code>
  154. * @return string
  155. */
  156. public function getContentType()
  157. {
  158. return $this->content_type;
  159. }
  160. /**
  161. * Generated from protobuf field <code>string content_type = 6;</code>
  162. * @param string $var
  163. * @return $this
  164. */
  165. public function setContentType($var)
  166. {
  167. GPBUtil::checkString($var, True);
  168. $this->content_type = $var;
  169. return $this;
  170. }
  171. }