DataPetSimple.php 4.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240
  1. <?php
  2. # Generated by the protocol buffer compiler. DO NOT EDIT!
  3. # source: proto/game.proto
  4. namespace Uraus\Kku\Common;
  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>uraus.kku.Common.DataPetSimple</code>
  12. */
  13. class DataPetSimple extends \Google\Protobuf\Internal\Message
  14. {
  15. /**
  16. * 宠物唯一id
  17. *
  18. * Generated from protobuf field <code>int64 id = 1;</code>
  19. */
  20. protected $id = 0;
  21. /**
  22. *宠物名称
  23. *
  24. * Generated from protobuf field <code>string name = 3;</code>
  25. */
  26. protected $name = '';
  27. /**
  28. *宠物等级
  29. *
  30. * Generated from protobuf field <code>int64 level = 4;</code>
  31. */
  32. protected $level = 0;
  33. /**
  34. *宠物经验值
  35. *
  36. * Generated from protobuf field <code>int64 exp = 5;</code>
  37. */
  38. protected $exp = 0;
  39. /**
  40. *宠物体力
  41. *
  42. * Generated from protobuf field <code>int64 power = 6;</code>
  43. */
  44. protected $power = 0;
  45. /**
  46. * 宠物状态
  47. *
  48. * Generated from protobuf field <code>int64 status = 10;</code>
  49. */
  50. protected $status = 0;
  51. /**
  52. * Constructor.
  53. *
  54. * @param array $data {
  55. * Optional. Data for populating the Message object.
  56. *
  57. * @type int|string $id
  58. * 宠物唯一id
  59. * @type string $name
  60. * 宠物名称
  61. * @type int|string $level
  62. * 宠物等级
  63. * @type int|string $exp
  64. * 宠物经验值
  65. * @type int|string $power
  66. * 宠物体力
  67. * @type int|string $status
  68. * 宠物状态
  69. * }
  70. */
  71. public function __construct($data = NULL) {
  72. \GPBMetadata\Proto\Game::initOnce();
  73. parent::__construct($data);
  74. }
  75. /**
  76. * 宠物唯一id
  77. *
  78. * Generated from protobuf field <code>int64 id = 1;</code>
  79. * @return int|string
  80. */
  81. public function getId()
  82. {
  83. return $this->id;
  84. }
  85. /**
  86. * 宠物唯一id
  87. *
  88. * Generated from protobuf field <code>int64 id = 1;</code>
  89. * @param int|string $var
  90. * @return $this
  91. */
  92. public function setId($var)
  93. {
  94. GPBUtil::checkInt64($var);
  95. $this->id = $var;
  96. return $this;
  97. }
  98. /**
  99. *宠物名称
  100. *
  101. * Generated from protobuf field <code>string name = 3;</code>
  102. * @return string
  103. */
  104. public function getName()
  105. {
  106. return $this->name;
  107. }
  108. /**
  109. *宠物名称
  110. *
  111. * Generated from protobuf field <code>string name = 3;</code>
  112. * @param string $var
  113. * @return $this
  114. */
  115. public function setName($var)
  116. {
  117. GPBUtil::checkString($var, True);
  118. $this->name = $var;
  119. return $this;
  120. }
  121. /**
  122. *宠物等级
  123. *
  124. * Generated from protobuf field <code>int64 level = 4;</code>
  125. * @return int|string
  126. */
  127. public function getLevel()
  128. {
  129. return $this->level;
  130. }
  131. /**
  132. *宠物等级
  133. *
  134. * Generated from protobuf field <code>int64 level = 4;</code>
  135. * @param int|string $var
  136. * @return $this
  137. */
  138. public function setLevel($var)
  139. {
  140. GPBUtil::checkInt64($var);
  141. $this->level = $var;
  142. return $this;
  143. }
  144. /**
  145. *宠物经验值
  146. *
  147. * Generated from protobuf field <code>int64 exp = 5;</code>
  148. * @return int|string
  149. */
  150. public function getExp()
  151. {
  152. return $this->exp;
  153. }
  154. /**
  155. *宠物经验值
  156. *
  157. * Generated from protobuf field <code>int64 exp = 5;</code>
  158. * @param int|string $var
  159. * @return $this
  160. */
  161. public function setExp($var)
  162. {
  163. GPBUtil::checkInt64($var);
  164. $this->exp = $var;
  165. return $this;
  166. }
  167. /**
  168. *宠物体力
  169. *
  170. * Generated from protobuf field <code>int64 power = 6;</code>
  171. * @return int|string
  172. */
  173. public function getPower()
  174. {
  175. return $this->power;
  176. }
  177. /**
  178. *宠物体力
  179. *
  180. * Generated from protobuf field <code>int64 power = 6;</code>
  181. * @param int|string $var
  182. * @return $this
  183. */
  184. public function setPower($var)
  185. {
  186. GPBUtil::checkInt64($var);
  187. $this->power = $var;
  188. return $this;
  189. }
  190. /**
  191. * 宠物状态
  192. *
  193. * Generated from protobuf field <code>int64 status = 10;</code>
  194. * @return int|string
  195. */
  196. public function getStatus()
  197. {
  198. return $this->status;
  199. }
  200. /**
  201. * 宠物状态
  202. *
  203. * Generated from protobuf field <code>int64 status = 10;</code>
  204. * @param int|string $var
  205. * @return $this
  206. */
  207. public function setStatus($var)
  208. {
  209. GPBUtil::checkInt64($var);
  210. $this->status = $var;
  211. return $this;
  212. }
  213. }
  214. // Adding a class alias for backwards compatibility with the previous class name.
  215. class_alias(DataPetSimple::class, \Uraus\Kku\Common_DataPetSimple::class);