DataLand.php 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584
  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.DataLand</code>
  12. */
  13. class DataLand 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>int64 index = 2;</code>
  25. */
  26. protected $index = 0;
  27. /**
  28. *是否需要 除草
  29. *
  30. * Generated from protobuf field <code>bool need_weed = 3;</code>
  31. */
  32. protected $need_weed = false;
  33. /**
  34. *是否需要 除虫
  35. *
  36. * Generated from protobuf field <code>bool need_pest_control = 4;</code>
  37. */
  38. protected $need_pest_control = false;
  39. /**
  40. *是否需要 浇水
  41. *
  42. * Generated from protobuf field <code>bool need_watering = 5;</code>
  43. */
  44. protected $need_watering = false;
  45. /**
  46. *土地的等级
  47. *
  48. * Generated from protobuf field <code>int64 level = 6;</code>
  49. */
  50. protected $level = 0;
  51. /**
  52. * 土地阶段
  53. *
  54. * Generated from protobuf field <code>.uraus.kku.Common.LAND_STATUS status = 7;</code>
  55. */
  56. protected $status = 0;
  57. /**
  58. * 是否可以施肥
  59. *
  60. * Generated from protobuf field <code>bool can_fertilization = 8;</code>
  61. */
  62. protected $can_fertilization = false;
  63. /**
  64. * 降级时间,时间戳
  65. *
  66. * Generated from protobuf field <code>int64 downgrade_time = 9;</code>
  67. */
  68. protected $downgrade_time = 0;
  69. /**
  70. * 种子 start
  71. * 种子种下的时间
  72. *
  73. * Generated from protobuf field <code>int64 seed_planting_times = 30;</code>
  74. */
  75. protected $seed_planting_times = 0;
  76. /**
  77. * 种子ID
  78. *
  79. * Generated from protobuf field <code>int64 seed_id = 31;</code>
  80. */
  81. protected $seed_id = 0;
  82. /**
  83. * 果实ID
  84. *
  85. * Generated from protobuf field <code>int64 fruit_id = 32;</code>
  86. */
  87. protected $fruit_id = 0;
  88. /**
  89. * 植株ID
  90. *
  91. * Generated from protobuf field <code>int64 plant_id = 33;</code>
  92. */
  93. protected $plant_id = 0;
  94. /**
  95. * 种子状态
  96. *
  97. * Generated from protobuf field <code>.uraus.kku.Common.SEED_STATUS seed_status = 34;</code>
  98. */
  99. protected $seed_status = 0;
  100. /**
  101. * 当前阶段开始时间
  102. *
  103. * Generated from protobuf field <code>int64 stage_start_times = 35;</code>
  104. */
  105. protected $stage_start_times = 0;
  106. /**
  107. * 当前阶段结束时间
  108. *
  109. * Generated from protobuf field <code>int64 stage_next_times = 36;</code>
  110. */
  111. protected $stage_next_times = 0;
  112. /**
  113. * Constructor.
  114. *
  115. * @param array $data {
  116. * Optional. Data for populating the Message object.
  117. *
  118. * @type int|string $id
  119. * 土地ID
  120. * @type int|string $index
  121. * 土地索引(几号地块)
  122. * @type bool $need_weed
  123. * 是否需要 除草
  124. * @type bool $need_pest_control
  125. * 是否需要 除虫
  126. * @type bool $need_watering
  127. * 是否需要 浇水
  128. * @type int|string $level
  129. * 土地的等级
  130. * @type int $status
  131. * 土地阶段
  132. * @type bool $can_fertilization
  133. * 是否可以施肥
  134. * @type int|string $downgrade_time
  135. * 降级时间,时间戳
  136. * @type int|string $seed_planting_times
  137. * 种子 start
  138. * 种子种下的时间
  139. * @type int|string $seed_id
  140. * 种子ID
  141. * @type int|string $fruit_id
  142. * 果实ID
  143. * @type int|string $plant_id
  144. * 植株ID
  145. * @type int $seed_status
  146. * 种子状态
  147. * @type int|string $stage_start_times
  148. * 当前阶段开始时间
  149. * @type int|string $stage_next_times
  150. * 当前阶段结束时间
  151. * }
  152. */
  153. public function __construct($data = NULL) {
  154. \GPBMetadata\Proto\Game::initOnce();
  155. parent::__construct($data);
  156. }
  157. /**
  158. *土地ID
  159. *
  160. * Generated from protobuf field <code>int64 id = 1;</code>
  161. * @return int|string
  162. */
  163. public function getId()
  164. {
  165. return $this->id;
  166. }
  167. /**
  168. *土地ID
  169. *
  170. * Generated from protobuf field <code>int64 id = 1;</code>
  171. * @param int|string $var
  172. * @return $this
  173. */
  174. public function setId($var)
  175. {
  176. GPBUtil::checkInt64($var);
  177. $this->id = $var;
  178. return $this;
  179. }
  180. /**
  181. * 土地索引(几号地块)
  182. *
  183. * Generated from protobuf field <code>int64 index = 2;</code>
  184. * @return int|string
  185. */
  186. public function getIndex()
  187. {
  188. return $this->index;
  189. }
  190. /**
  191. * 土地索引(几号地块)
  192. *
  193. * Generated from protobuf field <code>int64 index = 2;</code>
  194. * @param int|string $var
  195. * @return $this
  196. */
  197. public function setIndex($var)
  198. {
  199. GPBUtil::checkInt64($var);
  200. $this->index = $var;
  201. return $this;
  202. }
  203. /**
  204. *是否需要 除草
  205. *
  206. * Generated from protobuf field <code>bool need_weed = 3;</code>
  207. * @return bool
  208. */
  209. public function getNeedWeed()
  210. {
  211. return $this->need_weed;
  212. }
  213. /**
  214. *是否需要 除草
  215. *
  216. * Generated from protobuf field <code>bool need_weed = 3;</code>
  217. * @param bool $var
  218. * @return $this
  219. */
  220. public function setNeedWeed($var)
  221. {
  222. GPBUtil::checkBool($var);
  223. $this->need_weed = $var;
  224. return $this;
  225. }
  226. /**
  227. *是否需要 除虫
  228. *
  229. * Generated from protobuf field <code>bool need_pest_control = 4;</code>
  230. * @return bool
  231. */
  232. public function getNeedPestControl()
  233. {
  234. return $this->need_pest_control;
  235. }
  236. /**
  237. *是否需要 除虫
  238. *
  239. * Generated from protobuf field <code>bool need_pest_control = 4;</code>
  240. * @param bool $var
  241. * @return $this
  242. */
  243. public function setNeedPestControl($var)
  244. {
  245. GPBUtil::checkBool($var);
  246. $this->need_pest_control = $var;
  247. return $this;
  248. }
  249. /**
  250. *是否需要 浇水
  251. *
  252. * Generated from protobuf field <code>bool need_watering = 5;</code>
  253. * @return bool
  254. */
  255. public function getNeedWatering()
  256. {
  257. return $this->need_watering;
  258. }
  259. /**
  260. *是否需要 浇水
  261. *
  262. * Generated from protobuf field <code>bool need_watering = 5;</code>
  263. * @param bool $var
  264. * @return $this
  265. */
  266. public function setNeedWatering($var)
  267. {
  268. GPBUtil::checkBool($var);
  269. $this->need_watering = $var;
  270. return $this;
  271. }
  272. /**
  273. *土地的等级
  274. *
  275. * Generated from protobuf field <code>int64 level = 6;</code>
  276. * @return int|string
  277. */
  278. public function getLevel()
  279. {
  280. return $this->level;
  281. }
  282. /**
  283. *土地的等级
  284. *
  285. * Generated from protobuf field <code>int64 level = 6;</code>
  286. * @param int|string $var
  287. * @return $this
  288. */
  289. public function setLevel($var)
  290. {
  291. GPBUtil::checkInt64($var);
  292. $this->level = $var;
  293. return $this;
  294. }
  295. /**
  296. * 土地阶段
  297. *
  298. * Generated from protobuf field <code>.uraus.kku.Common.LAND_STATUS status = 7;</code>
  299. * @return int
  300. */
  301. public function getStatus()
  302. {
  303. return $this->status;
  304. }
  305. /**
  306. * 土地阶段
  307. *
  308. * Generated from protobuf field <code>.uraus.kku.Common.LAND_STATUS status = 7;</code>
  309. * @param int $var
  310. * @return $this
  311. */
  312. public function setStatus($var)
  313. {
  314. GPBUtil::checkEnum($var, \Uraus\Kku\Common\LAND_STATUS::class);
  315. $this->status = $var;
  316. return $this;
  317. }
  318. /**
  319. * 是否可以施肥
  320. *
  321. * Generated from protobuf field <code>bool can_fertilization = 8;</code>
  322. * @return bool
  323. */
  324. public function getCanFertilization()
  325. {
  326. return $this->can_fertilization;
  327. }
  328. /**
  329. * 是否可以施肥
  330. *
  331. * Generated from protobuf field <code>bool can_fertilization = 8;</code>
  332. * @param bool $var
  333. * @return $this
  334. */
  335. public function setCanFertilization($var)
  336. {
  337. GPBUtil::checkBool($var);
  338. $this->can_fertilization = $var;
  339. return $this;
  340. }
  341. /**
  342. * 降级时间,时间戳
  343. *
  344. * Generated from protobuf field <code>int64 downgrade_time = 9;</code>
  345. * @return int|string
  346. */
  347. public function getDowngradeTime()
  348. {
  349. return $this->downgrade_time;
  350. }
  351. /**
  352. * 降级时间,时间戳
  353. *
  354. * Generated from protobuf field <code>int64 downgrade_time = 9;</code>
  355. * @param int|string $var
  356. * @return $this
  357. */
  358. public function setDowngradeTime($var)
  359. {
  360. GPBUtil::checkInt64($var);
  361. $this->downgrade_time = $var;
  362. return $this;
  363. }
  364. /**
  365. * 种子 start
  366. * 种子种下的时间
  367. *
  368. * Generated from protobuf field <code>int64 seed_planting_times = 30;</code>
  369. * @return int|string
  370. */
  371. public function getSeedPlantingTimes()
  372. {
  373. return $this->seed_planting_times;
  374. }
  375. /**
  376. * 种子 start
  377. * 种子种下的时间
  378. *
  379. * Generated from protobuf field <code>int64 seed_planting_times = 30;</code>
  380. * @param int|string $var
  381. * @return $this
  382. */
  383. public function setSeedPlantingTimes($var)
  384. {
  385. GPBUtil::checkInt64($var);
  386. $this->seed_planting_times = $var;
  387. return $this;
  388. }
  389. /**
  390. * 种子ID
  391. *
  392. * Generated from protobuf field <code>int64 seed_id = 31;</code>
  393. * @return int|string
  394. */
  395. public function getSeedId()
  396. {
  397. return $this->seed_id;
  398. }
  399. /**
  400. * 种子ID
  401. *
  402. * Generated from protobuf field <code>int64 seed_id = 31;</code>
  403. * @param int|string $var
  404. * @return $this
  405. */
  406. public function setSeedId($var)
  407. {
  408. GPBUtil::checkInt64($var);
  409. $this->seed_id = $var;
  410. return $this;
  411. }
  412. /**
  413. * 果实ID
  414. *
  415. * Generated from protobuf field <code>int64 fruit_id = 32;</code>
  416. * @return int|string
  417. */
  418. public function getFruitId()
  419. {
  420. return $this->fruit_id;
  421. }
  422. /**
  423. * 果实ID
  424. *
  425. * Generated from protobuf field <code>int64 fruit_id = 32;</code>
  426. * @param int|string $var
  427. * @return $this
  428. */
  429. public function setFruitId($var)
  430. {
  431. GPBUtil::checkInt64($var);
  432. $this->fruit_id = $var;
  433. return $this;
  434. }
  435. /**
  436. * 植株ID
  437. *
  438. * Generated from protobuf field <code>int64 plant_id = 33;</code>
  439. * @return int|string
  440. */
  441. public function getPlantId()
  442. {
  443. return $this->plant_id;
  444. }
  445. /**
  446. * 植株ID
  447. *
  448. * Generated from protobuf field <code>int64 plant_id = 33;</code>
  449. * @param int|string $var
  450. * @return $this
  451. */
  452. public function setPlantId($var)
  453. {
  454. GPBUtil::checkInt64($var);
  455. $this->plant_id = $var;
  456. return $this;
  457. }
  458. /**
  459. * 种子状态
  460. *
  461. * Generated from protobuf field <code>.uraus.kku.Common.SEED_STATUS seed_status = 34;</code>
  462. * @return int
  463. */
  464. public function getSeedStatus()
  465. {
  466. return $this->seed_status;
  467. }
  468. /**
  469. * 种子状态
  470. *
  471. * Generated from protobuf field <code>.uraus.kku.Common.SEED_STATUS seed_status = 34;</code>
  472. * @param int $var
  473. * @return $this
  474. */
  475. public function setSeedStatus($var)
  476. {
  477. GPBUtil::checkEnum($var, \Uraus\Kku\Common\SEED_STATUS::class);
  478. $this->seed_status = $var;
  479. return $this;
  480. }
  481. /**
  482. * 当前阶段开始时间
  483. *
  484. * Generated from protobuf field <code>int64 stage_start_times = 35;</code>
  485. * @return int|string
  486. */
  487. public function getStageStartTimes()
  488. {
  489. return $this->stage_start_times;
  490. }
  491. /**
  492. * 当前阶段开始时间
  493. *
  494. * Generated from protobuf field <code>int64 stage_start_times = 35;</code>
  495. * @param int|string $var
  496. * @return $this
  497. */
  498. public function setStageStartTimes($var)
  499. {
  500. GPBUtil::checkInt64($var);
  501. $this->stage_start_times = $var;
  502. return $this;
  503. }
  504. /**
  505. * 当前阶段结束时间
  506. *
  507. * Generated from protobuf field <code>int64 stage_next_times = 36;</code>
  508. * @return int|string
  509. */
  510. public function getStageNextTimes()
  511. {
  512. return $this->stage_next_times;
  513. }
  514. /**
  515. * 当前阶段结束时间
  516. *
  517. * Generated from protobuf field <code>int64 stage_next_times = 36;</code>
  518. * @param int|string $var
  519. * @return $this
  520. */
  521. public function setStageNextTimes($var)
  522. {
  523. GPBUtil::checkInt64($var);
  524. $this->stage_next_times = $var;
  525. return $this;
  526. }
  527. }
  528. // Adding a class alias for backwards compatibility with the previous class name.
  529. class_alias(DataLand::class, \Uraus\Kku\Common_DataLand::class);