ShopGoodItem.php 6.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287
  1. <?php
  2. # Generated by the protocol buffer compiler. DO NOT EDIT!
  3. # source: proto/game.proto
  4. namespace Uraus\Kku\Response;
  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.Response.ShopGoodItem</code>
  12. */
  13. class ShopGoodItem extends \Google\Protobuf\Internal\Message
  14. {
  15. /**
  16. * Generated from protobuf field <code>int64 id = 1;</code>
  17. */
  18. protected $id = 0;
  19. /**
  20. * 价格
  21. *
  22. * Generated from protobuf field <code>.uraus.kku.Common.Deduct coin = 2;</code>
  23. */
  24. protected $coin = null;
  25. /**
  26. * 商品
  27. *
  28. * Generated from protobuf field <code>.uraus.kku.Common.Reward item = 3;</code>
  29. */
  30. protected $item = null;
  31. /**
  32. * 分类
  33. *
  34. * Generated from protobuf field <code>string category = 4;</code>
  35. */
  36. protected $category = '';
  37. /**
  38. * 单次购买限制
  39. *
  40. * Generated from protobuf field <code>int64 limit = 5;</code>
  41. */
  42. protected $limit = 0;
  43. /**
  44. * 商品名字
  45. *
  46. * Generated from protobuf field <code>string name = 6;</code>
  47. */
  48. protected $name = '';
  49. /**
  50. * 商品描述
  51. *
  52. * Generated from protobuf field <code>string desc = 7;</code>
  53. */
  54. protected $desc = '';
  55. /**
  56. * Constructor.
  57. *
  58. * @param array $data {
  59. * Optional. Data for populating the Message object.
  60. *
  61. * @type int|string $id
  62. * @type \Uraus\Kku\Common\Deduct $coin
  63. * 价格
  64. * @type \Uraus\Kku\Common\Reward $item
  65. * 商品
  66. * @type string $category
  67. * 分类
  68. * @type int|string $limit
  69. * 单次购买限制
  70. * @type string $name
  71. * 商品名字
  72. * @type string $desc
  73. * 商品描述
  74. * }
  75. */
  76. public function __construct($data = NULL) {
  77. \GPBMetadata\Proto\Game::initOnce();
  78. parent::__construct($data);
  79. }
  80. /**
  81. * Generated from protobuf field <code>int64 id = 1;</code>
  82. * @return int|string
  83. */
  84. public function getId()
  85. {
  86. return $this->id;
  87. }
  88. /**
  89. * Generated from protobuf field <code>int64 id = 1;</code>
  90. * @param int|string $var
  91. * @return $this
  92. */
  93. public function setId($var)
  94. {
  95. GPBUtil::checkInt64($var);
  96. $this->id = $var;
  97. return $this;
  98. }
  99. /**
  100. * 价格
  101. *
  102. * Generated from protobuf field <code>.uraus.kku.Common.Deduct coin = 2;</code>
  103. * @return \Uraus\Kku\Common\Deduct
  104. */
  105. public function getCoin()
  106. {
  107. return isset($this->coin) ? $this->coin : null;
  108. }
  109. public function hasCoin()
  110. {
  111. return isset($this->coin);
  112. }
  113. public function clearCoin()
  114. {
  115. unset($this->coin);
  116. }
  117. /**
  118. * 价格
  119. *
  120. * Generated from protobuf field <code>.uraus.kku.Common.Deduct coin = 2;</code>
  121. * @param \Uraus\Kku\Common\Deduct $var
  122. * @return $this
  123. */
  124. public function setCoin($var)
  125. {
  126. GPBUtil::checkMessage($var, \Uraus\Kku\Common\Deduct::class);
  127. $this->coin = $var;
  128. return $this;
  129. }
  130. /**
  131. * 商品
  132. *
  133. * Generated from protobuf field <code>.uraus.kku.Common.Reward item = 3;</code>
  134. * @return \Uraus\Kku\Common\Reward
  135. */
  136. public function getItem()
  137. {
  138. return isset($this->item) ? $this->item : null;
  139. }
  140. public function hasItem()
  141. {
  142. return isset($this->item);
  143. }
  144. public function clearItem()
  145. {
  146. unset($this->item);
  147. }
  148. /**
  149. * 商品
  150. *
  151. * Generated from protobuf field <code>.uraus.kku.Common.Reward item = 3;</code>
  152. * @param \Uraus\Kku\Common\Reward $var
  153. * @return $this
  154. */
  155. public function setItem($var)
  156. {
  157. GPBUtil::checkMessage($var, \Uraus\Kku\Common\Reward::class);
  158. $this->item = $var;
  159. return $this;
  160. }
  161. /**
  162. * 分类
  163. *
  164. * Generated from protobuf field <code>string category = 4;</code>
  165. * @return string
  166. */
  167. public function getCategory()
  168. {
  169. return $this->category;
  170. }
  171. /**
  172. * 分类
  173. *
  174. * Generated from protobuf field <code>string category = 4;</code>
  175. * @param string $var
  176. * @return $this
  177. */
  178. public function setCategory($var)
  179. {
  180. GPBUtil::checkString($var, True);
  181. $this->category = $var;
  182. return $this;
  183. }
  184. /**
  185. * 单次购买限制
  186. *
  187. * Generated from protobuf field <code>int64 limit = 5;</code>
  188. * @return int|string
  189. */
  190. public function getLimit()
  191. {
  192. return $this->limit;
  193. }
  194. /**
  195. * 单次购买限制
  196. *
  197. * Generated from protobuf field <code>int64 limit = 5;</code>
  198. * @param int|string $var
  199. * @return $this
  200. */
  201. public function setLimit($var)
  202. {
  203. GPBUtil::checkInt64($var);
  204. $this->limit = $var;
  205. return $this;
  206. }
  207. /**
  208. * 商品名字
  209. *
  210. * Generated from protobuf field <code>string name = 6;</code>
  211. * @return string
  212. */
  213. public function getName()
  214. {
  215. return $this->name;
  216. }
  217. /**
  218. * 商品名字
  219. *
  220. * Generated from protobuf field <code>string name = 6;</code>
  221. * @param string $var
  222. * @return $this
  223. */
  224. public function setName($var)
  225. {
  226. GPBUtil::checkString($var, True);
  227. $this->name = $var;
  228. return $this;
  229. }
  230. /**
  231. * 商品描述
  232. *
  233. * Generated from protobuf field <code>string desc = 7;</code>
  234. * @return string
  235. */
  236. public function getDesc()
  237. {
  238. return $this->desc;
  239. }
  240. /**
  241. * 商品描述
  242. *
  243. * Generated from protobuf field <code>string desc = 7;</code>
  244. * @param string $var
  245. * @return $this
  246. */
  247. public function setDesc($var)
  248. {
  249. GPBUtil::checkString($var, True);
  250. $this->desc = $var;
  251. return $this;
  252. }
  253. }
  254. // Adding a class alias for backwards compatibility with the previous class name.
  255. class_alias(ShopGoodItem::class, \Uraus\Kku\Response_ShopGoodItem::class);