/proto/market.proto.php

https://github.com/nidhinj/android-market-api-php · PHP · 1377 lines · 1249 code · 91 blank · 37 comment · 196 complexity · 14322b31ce756f96109ca314e2cba443 MD5 · raw file

  1. <?php
  2. // Please include the below file before market.proto.php
  3. //require('protocolbuffers.inc.php');
  4. // enum AppsRequest.OrderType
  5. class AppsRequest_OrderType {
  6. const NONE = 0;
  7. const POPULAR = 1;
  8. const NEWEST = 2;
  9. const FEATURED = 3;
  10. public static $_values = array(
  11. 0 => self::NONE,
  12. 1 => self::POPULAR,
  13. 2 => self::NEWEST,
  14. 3 => self::FEATURED,
  15. );
  16. public static function toString($value) {
  17. if (is_null($value)) return null;
  18. if (array_key_exists($value, self::$_values))
  19. return self::$_values[$value];
  20. return 'UNKNOWN';
  21. }
  22. }
  23. // enum AppsRequest.ViewType
  24. class AppsRequest_ViewType {
  25. const ALL = 0;
  26. const FREE = 1;
  27. const PAID = 2;
  28. public static $_values = array(
  29. 0 => self::ALL,
  30. 1 => self::FREE,
  31. 2 => self::PAID,
  32. );
  33. public static function toString($value) {
  34. if (is_null($value)) return null;
  35. if (array_key_exists($value, self::$_values))
  36. return self::$_values[$value];
  37. return 'UNKNOWN';
  38. }
  39. }
  40. // message AppsRequest
  41. class AppsRequest {
  42. private $_unknown;
  43. function __construct($in = NULL, &$limit = PHP_INT_MAX) {
  44. if($in !== NULL) {
  45. if (is_string($in)) {
  46. $fp = fopen('php://memory', 'r+b');
  47. fwrite($fp, $in);
  48. rewind($fp);
  49. } else if (is_resource($in)) {
  50. $fp = $in;
  51. } else {
  52. throw new Exception('Invalid in parameter');
  53. }
  54. $this->read($fp, $limit);
  55. }
  56. }
  57. function read($fp, &$limit = PHP_INT_MAX) {
  58. while(!feof($fp) && $limit > 0) {
  59. $tag = Protobuf::read_varint($fp, $limit);
  60. if ($tag === false) break;
  61. $wire = $tag & 0x07;
  62. $field = $tag >> 3;
  63. //var_dump("AppsRequest: Found $field type " . Protobuf::get_wiretype($wire) . " $limit bytes left");
  64. switch($field) {
  65. case 1:
  66. ASSERT('$wire == 0');
  67. $tmp = Protobuf::read_varint($fp, $limit);
  68. if ($tmp === false)
  69. throw new Exception('Protobuf::read_varint returned false');
  70. $this->appType_ = $tmp;
  71. break;
  72. case 2:
  73. ASSERT('$wire == 2');
  74. $len = Protobuf::read_varint($fp, $limit);
  75. if ($len === false)
  76. throw new Exception('Protobuf::read_varint returned false');
  77. if ($len > 0)
  78. $tmp = fread($fp, $len);
  79. else
  80. $tmp = '';
  81. if ($tmp === false)
  82. throw new Exception("fread($len) returned false");
  83. $this->query_ = $tmp;
  84. $limit-=$len;
  85. break;
  86. case 3:
  87. ASSERT('$wire == 2');
  88. $len = Protobuf::read_varint($fp, $limit);
  89. if ($len === false)
  90. throw new Exception('Protobuf::read_varint returned false');
  91. if ($len > 0)
  92. $tmp = fread($fp, $len);
  93. else
  94. $tmp = '';
  95. if ($tmp === false)
  96. throw new Exception("fread($len) returned false");
  97. $this->categoryId_ = $tmp;
  98. $limit-=$len;
  99. break;
  100. case 4:
  101. ASSERT('$wire == 2');
  102. $len = Protobuf::read_varint($fp, $limit);
  103. if ($len === false)
  104. throw new Exception('Protobuf::read_varint returned false');
  105. if ($len > 0)
  106. $tmp = fread($fp, $len);
  107. else
  108. $tmp = '';
  109. if ($tmp === false)
  110. throw new Exception("fread($len) returned false");
  111. $this->appId_ = $tmp;
  112. $limit-=$len;
  113. break;
  114. case 6:
  115. ASSERT('$wire == 0');
  116. $tmp = Protobuf::read_varint($fp, $limit);
  117. if ($tmp === false)
  118. throw new Exception('Protobuf::read_varint returned false');
  119. $this->withExtendedInfo_ = $tmp > 0 ? true : false;
  120. break;
  121. case 7:
  122. ASSERT('$wire == 0');
  123. $tmp = Protobuf::read_varint($fp, $limit);
  124. if ($tmp === false)
  125. throw new Exception('Protobuf::read_varint returned false');
  126. $this->orderType_ = $tmp;
  127. break;
  128. case 8:
  129. ASSERT('$wire == 0');
  130. $tmp = Protobuf::read_varint($fp, $limit);
  131. if ($tmp === false)
  132. throw new Exception('Protobuf::read_varint returned false');
  133. $this->startIndex_ = $tmp;
  134. break;
  135. case 9:
  136. ASSERT('$wire == 0');
  137. $tmp = Protobuf::read_varint($fp, $limit);
  138. if ($tmp === false)
  139. throw new Exception('Protobuf::read_varint returned false');
  140. $this->entriesCount_ = $tmp;
  141. break;
  142. case 10:
  143. ASSERT('$wire == 0');
  144. $tmp = Protobuf::read_varint($fp, $limit);
  145. if ($tmp === false)
  146. throw new Exception('Protobuf::read_varint returned false');
  147. $this->viewType_ = $tmp;
  148. break;
  149. default:
  150. $this->_unknown[$field . '-' . Protobuf::get_wiretype($wire)][] = Protobuf::read_field($fp, $wire, $limit);
  151. }
  152. }
  153. if (!$this->validateRequired())
  154. throw new Exception('Required fields are missing');
  155. }
  156. function write($fp) {
  157. if (!$this->validateRequired())
  158. throw new Exception('Required fields are missing');
  159. if (!is_null($this->appType_)) {
  160. fwrite($fp, "\x08");
  161. Protobuf::write_varint($fp, $this->appType_);
  162. }
  163. if (!is_null($this->query_)) {
  164. fwrite($fp, "\x12");
  165. Protobuf::write_varint($fp, strlen($this->query_));
  166. fwrite($fp, $this->query_);
  167. }
  168. if (!is_null($this->categoryId_)) {
  169. fwrite($fp, "\x1a");
  170. Protobuf::write_varint($fp, strlen($this->categoryId_));
  171. fwrite($fp, $this->categoryId_);
  172. }
  173. if (!is_null($this->appId_)) {
  174. fwrite($fp, "\"");
  175. Protobuf::write_varint($fp, strlen($this->appId_));
  176. fwrite($fp, $this->appId_);
  177. }
  178. if (!is_null($this->withExtendedInfo_)) {
  179. fwrite($fp, "0");
  180. Protobuf::write_varint($fp, $this->withExtendedInfo_ ? 1 : 0);
  181. }
  182. if (!is_null($this->orderType_)) {
  183. fwrite($fp, "8");
  184. Protobuf::write_varint($fp, $this->orderType_);
  185. }
  186. if (!is_null($this->startIndex_)) {
  187. fwrite($fp, "@");
  188. Protobuf::write_varint($fp, $this->startIndex_);
  189. }
  190. if (!is_null($this->entriesCount_)) {
  191. fwrite($fp, "H");
  192. Protobuf::write_varint($fp, $this->entriesCount_);
  193. }
  194. if (!is_null($this->viewType_)) {
  195. fwrite($fp, "P");
  196. Protobuf::write_varint($fp, $this->viewType_);
  197. }
  198. }
  199. public function size() {
  200. $size = 0;
  201. if (!is_null($this->appType_)) {
  202. $size += 1 + Protobuf::size_varint($this->appType_);
  203. }
  204. if (!is_null($this->query_)) {
  205. $l = strlen($this->query_);
  206. $size += 1 + Protobuf::size_varint($l) + $l;
  207. }
  208. if (!is_null($this->categoryId_)) {
  209. $l = strlen($this->categoryId_);
  210. $size += 1 + Protobuf::size_varint($l) + $l;
  211. }
  212. if (!is_null($this->appId_)) {
  213. $l = strlen($this->appId_);
  214. $size += 1 + Protobuf::size_varint($l) + $l;
  215. }
  216. if (!is_null($this->withExtendedInfo_)) {
  217. $size += 2;
  218. }
  219. if (!is_null($this->orderType_)) {
  220. $size += 1 + Protobuf::size_varint($this->orderType_);
  221. }
  222. if (!is_null($this->startIndex_)) {
  223. $size += 1 + Protobuf::size_varint($this->startIndex_);
  224. }
  225. if (!is_null($this->entriesCount_)) {
  226. $size += 1 + Protobuf::size_varint($this->entriesCount_);
  227. }
  228. if (!is_null($this->viewType_)) {
  229. $size += 1 + Protobuf::size_varint($this->viewType_);
  230. }
  231. return $size;
  232. }
  233. public function validateRequired() {
  234. return true;
  235. }
  236. public function __toString() {
  237. return ''
  238. . Protobuf::toString('unknown', $this->_unknown)
  239. . Protobuf::toString('appType_', AppType::toString($this->appType_))
  240. . Protobuf::toString('query_', $this->query_)
  241. . Protobuf::toString('categoryId_', $this->categoryId_)
  242. . Protobuf::toString('appId_', $this->appId_)
  243. . Protobuf::toString('withExtendedInfo_', $this->withExtendedInfo_)
  244. . Protobuf::toString('orderType_', AppsRequest_OrderType::toString($this->orderType_))
  245. . Protobuf::toString('startIndex_', $this->startIndex_)
  246. . Protobuf::toString('entriesCount_', $this->entriesCount_)
  247. . Protobuf::toString('viewType_', AppsRequest_ViewType::toString($this->viewType_));
  248. }
  249. // optional .AppType appType = 1;
  250. private $appType_ = null;
  251. public function clearAppType() { $this->appType_ = null; }
  252. public function hasAppType() { return $this->appType_ !== null; }
  253. public function getAppType() { if($this->appType_ === null) return AppType::NONE; else return $this->appType_; }
  254. public function setAppType($value) { $this->appType_ = $value; }
  255. // optional string query = 2;
  256. private $query_ = null;
  257. public function clearQuery() { $this->query_ = null; }
  258. public function hasQuery() { return $this->query_ !== null; }
  259. public function getQuery() { if($this->query_ === null) return ""; else return $this->query_; }
  260. public function setQuery($value) { $this->query_ = $value; }
  261. // optional string categoryId = 3;
  262. private $categoryId_ = null;
  263. public function clearCategoryId() { $this->categoryId_ = null; }
  264. public function hasCategoryId() { return $this->categoryId_ !== null; }
  265. public function getCategoryId() { if($this->categoryId_ === null) return ""; else return $this->categoryId_; }
  266. public function setCategoryId($value) { $this->categoryId_ = $value; }
  267. // optional string appId = 4;
  268. private $appId_ = null;
  269. public function clearAppId() { $this->appId_ = null; }
  270. public function hasAppId() { return $this->appId_ !== null; }
  271. public function getAppId() { if($this->appId_ === null) return ""; else return $this->appId_; }
  272. public function setAppId($value) { $this->appId_ = $value; }
  273. // optional bool withExtendedInfo = 6;
  274. private $withExtendedInfo_ = null;
  275. public function clearWithExtendedInfo() { $this->withExtendedInfo_ = null; }
  276. public function hasWithExtendedInfo() { return $this->withExtendedInfo_ !== null; }
  277. public function getWithExtendedInfo() { if($this->withExtendedInfo_ === null) return false; else return $this->withExtendedInfo_; }
  278. public function setWithExtendedInfo($value) { $this->withExtendedInfo_ = $value; }
  279. // optional .AppsRequest.OrderType orderType = 7 [default = NONE];
  280. private $orderType_ = null;
  281. public function clearOrderType() { $this->orderType_ = null; }
  282. public function hasOrderType() { return $this->orderType_ !== null; }
  283. public function getOrderType() { if($this->orderType_ === null) return AppsRequest_OrderType::NONE; else return $this->orderType_; }
  284. public function setOrderType($value) { $this->orderType_ = $value; }
  285. // optional uint64 startIndex = 8;
  286. private $startIndex_ = null;
  287. public function clearStartIndex() { $this->startIndex_ = null; }
  288. public function hasStartIndex() { return $this->startIndex_ !== null; }
  289. public function getStartIndex() { if($this->startIndex_ === null) return 0; else return $this->startIndex_; }
  290. public function setStartIndex($value) { $this->startIndex_ = $value; }
  291. // optional int32 entriesCount = 9;
  292. private $entriesCount_ = null;
  293. public function clearEntriesCount() { $this->entriesCount_ = null; }
  294. public function hasEntriesCount() { return $this->entriesCount_ !== null; }
  295. public function getEntriesCount() { if($this->entriesCount_ === null) return 0; else return $this->entriesCount_; }
  296. public function setEntriesCount($value) { $this->entriesCount_ = $value; }
  297. // optional .AppsRequest.ViewType viewType = 10 [default = ALL];
  298. private $viewType_ = null;
  299. public function clearViewType() { $this->viewType_ = null; }
  300. public function hasViewType() { return $this->viewType_ !== null; }
  301. public function getViewType() { if($this->viewType_ === null) return AppsRequest_ViewType::ALL; else return $this->viewType_; }
  302. public function setViewType($value) { $this->viewType_ = $value; }
  303. // @@protoc_insertion_point(class_scope:AppsRequest)
  304. }
  305. // message AppsResponse
  306. class AppsResponse {
  307. private $_unknown;
  308. function __construct($in = NULL, &$limit = PHP_INT_MAX) {
  309. if($in !== NULL) {
  310. if (is_string($in)) {
  311. $fp = fopen('php://memory', 'r+b');
  312. fwrite($fp, $in);
  313. rewind($fp);
  314. } else if (is_resource($in)) {
  315. $fp = $in;
  316. } else {
  317. throw new Exception('Invalid in parameter');
  318. }
  319. $this->read($fp, $limit);
  320. }
  321. }
  322. function read($fp, &$limit = PHP_INT_MAX) {
  323. while(!feof($fp) && $limit > 0) {
  324. $tag = Protobuf::read_varint($fp, $limit);
  325. if ($tag === false) break;
  326. $wire = $tag & 0x07;
  327. $field = $tag >> 3;
  328. //var_dump("AppsResponse: Found $field type " . Protobuf::get_wiretype($wire) . " $limit bytes left");
  329. switch($field) {
  330. case 1:
  331. ASSERT('$wire == 2');
  332. $len = Protobuf::read_varint($fp, $limit);
  333. if ($len === false)
  334. throw new Exception('Protobuf::read_varint returned false');
  335. $limit-=$len;
  336. $this->app_[] = new App($fp, $len);
  337. ASSERT('$len == 0');
  338. break;
  339. case 2:
  340. ASSERT('$wire == 0');
  341. $tmp = Protobuf::read_varint($fp, $limit);
  342. if ($tmp === false)
  343. throw new Exception('Protobuf::read_varint returned false');
  344. $this->entriesCount_ = $tmp;
  345. break;
  346. default:
  347. $this->_unknown[$field . '-' . Protobuf::get_wiretype($wire)][] = Protobuf::read_field($fp, $wire, $limit);
  348. }
  349. }
  350. if (!$this->validateRequired())
  351. throw new Exception('Required fields are missing');
  352. }
  353. function write($fp) {
  354. if (!$this->validateRequired())
  355. throw new Exception('Required fields are missing');
  356. if (!is_null($this->app_))
  357. foreach($this->app_ as $v) {
  358. fwrite($fp, "\x0a");
  359. Protobuf::write_varint($fp, $v->size()); // message
  360. $v->write($fp);
  361. }
  362. if (!is_null($this->entriesCount_)) {
  363. fwrite($fp, "\x10");
  364. Protobuf::write_varint($fp, $this->entriesCount_);
  365. }
  366. }
  367. public function size() {
  368. $size = 0;
  369. if (!is_null($this->app_))
  370. foreach($this->app_ as $v) {
  371. $l = $v->size();
  372. $size += 1 + Protobuf::size_varint($l) + $l;
  373. }
  374. if (!is_null($this->entriesCount_)) {
  375. $size += 1 + Protobuf::size_varint($this->entriesCount_);
  376. }
  377. return $size;
  378. }
  379. public function validateRequired() {
  380. return true;
  381. }
  382. public function __toString() {
  383. return ''
  384. . Protobuf::toString('unknown', $this->_unknown)
  385. . Protobuf::toString('app_', $this->app_)
  386. . Protobuf::toString('entriesCount_', $this->entriesCount_);
  387. }
  388. // repeated .App app = 1;
  389. private $app_ = null;
  390. public function clearApp() { $this->app_ = null; }
  391. public function getAppCount() { if ($this->app_ === null ) return 0; else return count($this->app_); }
  392. public function getApp($index) { return $this->app_[$index]; }
  393. public function getAppArray() { if ($this->app_ === null ) return array(); else return $this->app_; }
  394. public function setApp($index, $value) {$this->app_[$index] = $value; }
  395. public function addApp($value) { $this->app_[] = $value; }
  396. public function addAllApp(array $values) { foreach($values as $value) {$this->app_[] = $value;} }
  397. // optional int32 entriesCount = 2;
  398. private $entriesCount_ = null;
  399. public function clearEntriesCount() { $this->entriesCount_ = null; }
  400. public function hasEntriesCount() { return $this->entriesCount_ !== null; }
  401. public function getEntriesCount() { if($this->entriesCount_ === null) return 0; else return $this->entriesCount_; }
  402. public function setEntriesCount($value) { $this->entriesCount_ = $value; }
  403. // @@protoc_insertion_point(class_scope:AppsResponse)
  404. }
  405. // message Category
  406. class Category {
  407. private $_unknown;
  408. function __construct($in = NULL, &$limit = PHP_INT_MAX) {
  409. if($in !== NULL) {
  410. if (is_string($in)) {
  411. $fp = fopen('php://memory', 'r+b');
  412. fwrite($fp, $in);
  413. rewind($fp);
  414. } else if (is_resource($in)) {
  415. $fp = $in;
  416. } else {
  417. throw new Exception('Invalid in parameter');
  418. }
  419. $this->read($fp, $limit);
  420. }
  421. }
  422. function read($fp, &$limit = PHP_INT_MAX) {
  423. while(!feof($fp) && $limit > 0) {
  424. $tag = Protobuf::read_varint($fp, $limit);
  425. if ($tag === false) break;
  426. $wire = $tag & 0x07;
  427. $field = $tag >> 3;
  428. //var_dump("Category: Found $field type " . Protobuf::get_wiretype($wire) . " $limit bytes left");
  429. switch($field) {
  430. case 2:
  431. ASSERT('$wire == 0');
  432. $tmp = Protobuf::read_varint($fp, $limit);
  433. if ($tmp === false)
  434. throw new Exception('Protobuf::read_varint returned false');
  435. $this->appType_ = $tmp;
  436. break;
  437. case 4:
  438. ASSERT('$wire == 2');
  439. $len = Protobuf::read_varint($fp, $limit);
  440. if ($len === false)
  441. throw new Exception('Protobuf::read_varint returned false');
  442. if ($len > 0)
  443. $tmp = fread($fp, $len);
  444. else
  445. $tmp = '';
  446. if ($tmp === false)
  447. throw new Exception("fread($len) returned false");
  448. $this->title_ = $tmp;
  449. $limit-=$len;
  450. break;
  451. case 3:
  452. ASSERT('$wire == 2');
  453. $len = Protobuf::read_varint($fp, $limit);
  454. if ($len === false)
  455. throw new Exception('Protobuf::read_varint returned false');
  456. if ($len > 0)
  457. $tmp = fread($fp, $len);
  458. else
  459. $tmp = '';
  460. if ($tmp === false)
  461. throw new Exception("fread($len) returned false");
  462. $this->categoryId_ = $tmp;
  463. $limit-=$len;
  464. break;
  465. case 5:
  466. ASSERT('$wire == 2');
  467. $len = Protobuf::read_varint($fp, $limit);
  468. if ($len === false)
  469. throw new Exception('Protobuf::read_varint returned false');
  470. if ($len > 0)
  471. $tmp = fread($fp, $len);
  472. else
  473. $tmp = '';
  474. if ($tmp === false)
  475. throw new Exception("fread($len) returned false");
  476. $this->subtitle_ = $tmp;
  477. $limit-=$len;
  478. break;
  479. case 8:
  480. ASSERT('$wire == 2');
  481. $len = Protobuf::read_varint($fp, $limit);
  482. if ($len === false)
  483. throw new Exception('Protobuf::read_varint returned false');
  484. $limit-=$len;
  485. $this->subCategories_[] = new Category($fp, $len);
  486. ASSERT('$len == 0');
  487. break;
  488. default:
  489. $this->_unknown[$field . '-' . Protobuf::get_wiretype($wire)][] = Protobuf::read_field($fp, $wire, $limit);
  490. }
  491. }
  492. if (!$this->validateRequired())
  493. throw new Exception('Required fields are missing');
  494. }
  495. function write($fp) {
  496. if (!$this->validateRequired())
  497. throw new Exception('Required fields are missing');
  498. if (!is_null($this->appType_)) {
  499. fwrite($fp, "\x10");
  500. Protobuf::write_varint($fp, $this->appType_);
  501. }
  502. if (!is_null($this->title_)) {
  503. fwrite($fp, "\"");
  504. Protobuf::write_varint($fp, strlen($this->title_));
  505. fwrite($fp, $this->title_);
  506. }
  507. if (!is_null($this->categoryId_)) {
  508. fwrite($fp, "\x1a");
  509. Protobuf::write_varint($fp, strlen($this->categoryId_));
  510. fwrite($fp, $this->categoryId_);
  511. }
  512. if (!is_null($this->subtitle_)) {
  513. fwrite($fp, "*");
  514. Protobuf::write_varint($fp, strlen($this->subtitle_));
  515. fwrite($fp, $this->subtitle_);
  516. }
  517. if (!is_null($this->subCategories_))
  518. foreach($this->subCategories_ as $v) {
  519. fwrite($fp, "B");
  520. Protobuf::write_varint($fp, $v->size()); // message
  521. $v->write($fp);
  522. }
  523. }
  524. public function size() {
  525. $size = 0;
  526. if (!is_null($this->appType_)) {
  527. $size += 1 + Protobuf::size_varint($this->appType_);
  528. }
  529. if (!is_null($this->title_)) {
  530. $l = strlen($this->title_);
  531. $size += 1 + Protobuf::size_varint($l) + $l;
  532. }
  533. if (!is_null($this->categoryId_)) {
  534. $l = strlen($this->categoryId_);
  535. $size += 1 + Protobuf::size_varint($l) + $l;
  536. }
  537. if (!is_null($this->subtitle_)) {
  538. $l = strlen($this->subtitle_);
  539. $size += 1 + Protobuf::size_varint($l) + $l;
  540. }
  541. if (!is_null($this->subCategories_))
  542. foreach($this->subCategories_ as $v) {
  543. $l = $v->size();
  544. $size += 1 + Protobuf::size_varint($l) + $l;
  545. }
  546. return $size;
  547. }
  548. public function validateRequired() {
  549. return true;
  550. }
  551. public function __toString() {
  552. return ''
  553. . Protobuf::toString('unknown', $this->_unknown)
  554. . Protobuf::toString('appType_', $this->appType_)
  555. . Protobuf::toString('title_', $this->title_)
  556. . Protobuf::toString('categoryId_', $this->categoryId_)
  557. . Protobuf::toString('subtitle_', $this->subtitle_)
  558. . Protobuf::toString('subCategories_', $this->subCategories_);
  559. }
  560. // optional int32 appType = 2;
  561. private $appType_ = null;
  562. public function clearAppType() { $this->appType_ = null; }
  563. public function hasAppType() { return $this->appType_ !== null; }
  564. public function getAppType() { if($this->appType_ === null) return 0; else return $this->appType_; }
  565. public function setAppType($value) { $this->appType_ = $value; }
  566. // optional string title = 4;
  567. private $title_ = null;
  568. public function clearTitle() { $this->title_ = null; }
  569. public function hasTitle() { return $this->title_ !== null; }
  570. public function getTitle() { if($this->title_ === null) return ""; else return $this->title_; }
  571. public function setTitle($value) { $this->title_ = $value; }
  572. // optional string categoryId = 3;
  573. private $categoryId_ = null;
  574. public function clearCategoryId() { $this->categoryId_ = null; }
  575. public function hasCategoryId() { return $this->categoryId_ !== null; }
  576. public function getCategoryId() { if($this->categoryId_ === null) return ""; else return $this->categoryId_; }
  577. public function setCategoryId($value) { $this->categoryId_ = $value; }
  578. // optional string subtitle = 5;
  579. private $subtitle_ = null;
  580. public function clearSubtitle() { $this->subtitle_ = null; }
  581. public function hasSubtitle() { return $this->subtitle_ !== null; }
  582. public function getSubtitle() { if($this->subtitle_ === null) return ""; else return $this->subtitle_; }
  583. public function setSubtitle($value) { $this->subtitle_ = $value; }
  584. // repeated .Category subCategories = 8;
  585. private $subCategories_ = null;
  586. public function clearSubCategories() { $this->subCategories_ = null; }
  587. public function getSubCategoriesCount() { if ($this->subCategories_ === null ) return 0; else return count($this->subCategories_); }
  588. public function getSubCategories($index) { return $this->subCategories_[$index]; }
  589. public function getSubCategoriesArray() { if ($this->subCategories_ === null ) return array(); else return $this->subCategories_; }
  590. public function setSubCategories($index, $value) {$this->subCategories_[$index] = $value; }
  591. public function addSubCategories($value) { $this->subCategories_[] = $value; }
  592. public function addAllSubCategories(array $values) { foreach($values as $value) {$this->subCategories_[] = $value;} }
  593. // @@protoc_insertion_point(class_scope:Category)
  594. }
  595. // message CommentsRequest
  596. class CommentsRequest {
  597. private $_unknown;
  598. function __construct($in = NULL, &$limit = PHP_INT_MAX) {
  599. if($in !== NULL) {
  600. if (is_string($in)) {
  601. $fp = fopen('php://memory', 'r+b');
  602. fwrite($fp, $in);
  603. rewind($fp);
  604. } else if (is_resource($in)) {
  605. $fp = $in;
  606. } else {
  607. throw new Exception('Invalid in parameter');
  608. }
  609. $this->read($fp, $limit);
  610. }
  611. }
  612. function read($fp, &$limit = PHP_INT_MAX) {
  613. while(!feof($fp) && $limit > 0) {
  614. $tag = Protobuf::read_varint($fp, $limit);
  615. if ($tag === false) break;
  616. $wire = $tag & 0x07;
  617. $field = $tag >> 3;
  618. //var_dump("CommentsRequest: Found $field type " . Protobuf::get_wiretype($wire) . " $limit bytes left");
  619. switch($field) {
  620. case 1:
  621. ASSERT('$wire == 2');
  622. $len = Protobuf::read_varint($fp, $limit);
  623. if ($len === false)
  624. throw new Exception('Protobuf::read_varint returned false');
  625. if ($len > 0)
  626. $tmp = fread($fp, $len);
  627. else
  628. $tmp = '';
  629. if ($tmp === false)
  630. throw new Exception("fread($len) returned false");
  631. $this->appId_ = $tmp;
  632. $limit-=$len;
  633. break;
  634. case 2:
  635. ASSERT('$wire == 0');
  636. $tmp = Protobuf::read_varint($fp, $limit);
  637. if ($tmp === false)
  638. throw new Exception('Protobuf::read_varint returned false');
  639. $this->startIndex_ = $tmp;
  640. break;
  641. case 3:
  642. ASSERT('$wire == 0');
  643. $tmp = Protobuf::read_varint($fp, $limit);
  644. if ($tmp === false)
  645. throw new Exception('Protobuf::read_varint returned false');
  646. $this->entriesCount_ = $tmp;
  647. break;
  648. default:
  649. $this->_unknown[$field . '-' . Protobuf::get_wiretype($wire)][] = Protobuf::read_field($fp, $wire, $limit);
  650. }
  651. }
  652. if (!$this->validateRequired())
  653. throw new Exception('Required fields are missing');
  654. }
  655. function write($fp) {
  656. if (!$this->validateRequired())
  657. throw new Exception('Required fields are missing');
  658. if (!is_null($this->appId_)) {
  659. fwrite($fp, "\x0a");
  660. Protobuf::write_varint($fp, strlen($this->appId_));
  661. fwrite($fp, $this->appId_);
  662. }
  663. if (!is_null($this->startIndex_)) {
  664. fwrite($fp, "\x10");
  665. Protobuf::write_varint($fp, $this->startIndex_);
  666. }
  667. if (!is_null($this->entriesCount_)) {
  668. fwrite($fp, "\x18");
  669. Protobuf::write_varint($fp, $this->entriesCount_);
  670. }
  671. }
  672. public function size() {
  673. $size = 0;
  674. if (!is_null($this->appId_)) {
  675. $l = strlen($this->appId_);
  676. $size += 1 + Protobuf::size_varint($l) + $l;
  677. }
  678. if (!is_null($this->startIndex_)) {
  679. $size += 1 + Protobuf::size_varint($this->startIndex_);
  680. }
  681. if (!is_null($this->entriesCount_)) {
  682. $size += 1 + Protobuf::size_varint($this->entriesCount_);
  683. }
  684. return $size;
  685. }
  686. public function validateRequired() {
  687. return true;
  688. }
  689. public function __toString() {
  690. return ''
  691. . Protobuf::toString('unknown', $this->_unknown)
  692. . Protobuf::toString('appId_', $this->appId_)
  693. . Protobuf::toString('startIndex_', $this->startIndex_)
  694. . Protobuf::toString('entriesCount_', $this->entriesCount_);
  695. }
  696. // optional string appId = 1;
  697. private $appId_ = null;
  698. public function clearAppId() { $this->appId_ = null; }
  699. public function hasAppId() { return $this->appId_ !== null; }
  700. public function getAppId() { if($this->appId_ === null) return ""; else return $this->appId_; }
  701. public function setAppId($value) { $this->appId_ = $value; }
  702. // optional int32 startIndex = 2;
  703. private $startIndex_ = null;
  704. public function clearStartIndex() { $this->startIndex_ = null; }
  705. public function hasStartIndex() { return $this->startIndex_ !== null; }
  706. public function getStartIndex() { if($this->startIndex_ === null) return 0; else return $this->startIndex_; }
  707. public function setStartIndex($value) { $this->startIndex_ = $value; }
  708. // optional int32 entriesCount = 3;
  709. private $entriesCount_ = null;
  710. public function clearEntriesCount() { $this->entriesCount_ = null; }
  711. public function hasEntriesCount() { return $this->entriesCount_ !== null; }
  712. public function getEntriesCount() { if($this->entriesCount_ === null) return 0; else return $this->entriesCount_; }
  713. public function setEntriesCount($value) { $this->entriesCount_ = $value; }
  714. // @@protoc_insertion_point(class_scope:CommentsRequest)
  715. }
  716. // message CommentsResponse
  717. class CommentsResponse {
  718. private $_unknown;
  719. function __construct($in = NULL, &$limit = PHP_INT_MAX) {
  720. if($in !== NULL) {
  721. if (is_string($in)) {
  722. $fp = fopen('php://memory', 'r+b');
  723. fwrite($fp, $in);
  724. rewind($fp);
  725. } else if (is_resource($in)) {
  726. $fp = $in;
  727. } else {
  728. throw new Exception('Invalid in parameter');
  729. }
  730. $this->read($fp, $limit);
  731. }
  732. }
  733. function read($fp, &$limit = PHP_INT_MAX) {
  734. while(!feof($fp) && $limit > 0) {
  735. $tag = Protobuf::read_varint($fp, $limit);
  736. if ($tag === false) break;
  737. $wire = $tag & 0x07;
  738. $field = $tag >> 3;
  739. //var_dump("CommentsResponse: Found $field type " . Protobuf::get_wiretype($wire) . " $limit bytes left");
  740. switch($field) {
  741. case 1:
  742. ASSERT('$wire == 2');
  743. $len = Protobuf::read_varint($fp, $limit);
  744. if ($len === false)
  745. throw new Exception('Protobuf::read_varint returned false');
  746. $limit-=$len;
  747. $this->comments_[] = new Comment($fp, $len);
  748. ASSERT('$len == 0');
  749. break;
  750. case 2:
  751. ASSERT('$wire == 0');
  752. $tmp = Protobuf::read_varint($fp, $limit);
  753. if ($tmp === false)
  754. throw new Exception('Protobuf::read_varint returned false');
  755. $this->entriesCount_ = $tmp;
  756. break;
  757. default:
  758. $this->_unknown[$field . '-' . Protobuf::get_wiretype($wire)][] = Protobuf::read_field($fp, $wire, $limit);
  759. }
  760. }
  761. if (!$this->validateRequired())
  762. throw new Exception('Required fields are missing');
  763. }
  764. function write($fp) {
  765. if (!$this->validateRequired())
  766. throw new Exception('Required fields are missing');
  767. if (!is_null($this->comments_))
  768. foreach($this->comments_ as $v) {
  769. fwrite($fp, "\x0a");
  770. Protobuf::write_varint($fp, $v->size()); // message
  771. $v->write($fp);
  772. }
  773. if (!is_null($this->entriesCount_)) {
  774. fwrite($fp, "\x10");
  775. Protobuf::write_varint($fp, $this->entriesCount_);
  776. }
  777. }
  778. public function size() {
  779. $size = 0;
  780. if (!is_null($this->comments_))
  781. foreach($this->comments_ as $v) {
  782. $l = $v->size();
  783. $size += 1 + Protobuf::size_varint($l) + $l;
  784. }
  785. if (!is_null($this->entriesCount_)) {
  786. $size += 1 + Protobuf::size_varint($this->entriesCount_);
  787. }
  788. return $size;
  789. }
  790. public function validateRequired() {
  791. return true;
  792. }
  793. public function __toString() {
  794. return ''
  795. . Protobuf::toString('unknown', $this->_unknown)
  796. . Protobuf::toString('comments_', $this->comments_)
  797. . Protobuf::toString('entriesCount_', $this->entriesCount_);
  798. }
  799. // repeated .Comment comments = 1;
  800. private $comments_ = null;
  801. public function clearComments() { $this->comments_ = null; }
  802. public function getCommentsCount() { if ($this->comments_ === null ) return 0; else return count($this->comments_); }
  803. public function getComments($index) { return $this->comments_[$index]; }
  804. public function getCommentsArray() { if ($this->comments_ === null ) return array(); else return $this->comments_; }
  805. public function setComments($index, $value) {$this->comments_[$index] = $value; }
  806. public function addComments($value) { $this->comments_[] = $value; }
  807. public function addAllComments(array $values) { foreach($values as $value) {$this->comments_[] = $value;} }
  808. // optional int32 entriesCount = 2;
  809. private $entriesCount_ = null;
  810. public function clearEntriesCount() { $this->entriesCount_ = null; }
  811. public function hasEntriesCount() { return $this->entriesCount_ !== null; }
  812. public function getEntriesCount() { if($this->entriesCount_ === null) return 0; else return $this->entriesCount_; }
  813. public function setEntriesCount($value) { $this->entriesCount_ = $value; }
  814. // @@protoc_insertion_point(class_scope:CommentsResponse)
  815. }
  816. // group App.ExtendedInfo
  817. class App_ExtendedInfo {
  818. private $_unknown;
  819. function __construct($in = NULL, &$limit = PHP_INT_MAX) {
  820. if($in !== NULL) {
  821. if (is_string($in)) {
  822. $fp = fopen('php://memory', 'r+b');
  823. fwrite($fp, $in);
  824. rewind($fp);
  825. } else if (is_resource($in)) {
  826. $fp = $in;
  827. } else {
  828. throw new Exception('Invalid in parameter');
  829. }
  830. $this->read($fp, $limit);
  831. }
  832. }
  833. function read($fp, &$limit = PHP_INT_MAX) {
  834. while(!feof($fp) && $limit > 0) {
  835. $tag = Protobuf::read_varint($fp, $limit);
  836. if ($tag === false) break;
  837. $wire = $tag & 0x07;
  838. $field = $tag >> 3;
  839. //var_dump("App_ExtendedInfo: Found $field type " . Protobuf::get_wiretype($wire) . " $limit bytes left");
  840. switch($field) {
  841. case 12:
  842. ASSERT('$wire == 4');
  843. break 2;
  844. case 13:
  845. ASSERT('$wire == 2');
  846. $len = Protobuf::read_varint($fp, $limit);
  847. if ($len === false)
  848. throw new Exception('Protobuf::read_varint returned false');
  849. if ($len > 0)
  850. $tmp = fread($fp, $len);
  851. else
  852. $tmp = '';
  853. if ($tmp === false)
  854. throw new Exception("fread($len) returned false");
  855. $this->description_ = $tmp;
  856. $limit-=$len;
  857. break;
  858. case 14:
  859. ASSERT('$wire == 0');
  860. $tmp = Protobuf::read_varint($fp, $limit);
  861. if ($tmp === false)
  862. throw new Exception('Protobuf::read_varint returned false');
  863. $this->downloadsCount_ = $tmp;
  864. break;
  865. case 15:
  866. ASSERT('$wire == 2');
  867. $len = Protobuf::read_varint($fp, $limit);
  868. if ($len === false)
  869. throw new Exception('Protobuf::read_varint returned false');
  870. if ($len > 0)
  871. $tmp = fread($fp, $len);
  872. else
  873. $tmp = '';
  874. if ($tmp === false)
  875. throw new Exception("fread($len) returned false");
  876. $this->permissionId_[] = $tmp;
  877. $limit-=$len;
  878. break;
  879. case 16:
  880. ASSERT('$wire == 0');
  881. $tmp = Protobuf::read_varint($fp, $limit);
  882. if ($tmp === false)
  883. throw new Exception('Protobuf::read_varint returned false');
  884. $this->installSize_ = $tmp;
  885. break;
  886. case 17:
  887. ASSERT('$wire == 2');
  888. $len = Protobuf::read_varint($fp, $limit);
  889. if ($len === false)
  890. throw new Exception('Protobuf::read_varint returned false');
  891. if ($len > 0)
  892. $tmp = fread($fp, $len);
  893. else
  894. $tmp = '';
  895. if ($tmp === false)
  896. throw new Exception("fread($len) returned false");
  897. $this->packageName_ = $tmp;
  898. $limit-=$len;
  899. break;
  900. case 18:
  901. ASSERT('$wire == 2');
  902. $len = Protobuf::read_varint($fp, $limit);
  903. if ($len === false)
  904. throw new Exception('Protobuf::read_varint returned false');
  905. if ($len > 0)
  906. $tmp = fread($fp, $len);
  907. else
  908. $tmp = '';
  909. if ($tmp === false)
  910. throw new Exception("fread($len) returned false");
  911. $this->category_ = $tmp;
  912. $limit-=$len;
  913. break;
  914. case 20:
  915. ASSERT('$wire == 2');
  916. $len = Protobuf::read_varint($fp, $limit);
  917. if ($len === false)
  918. throw new Exception('Protobuf::read_varint returned false');
  919. if ($len > 0)
  920. $tmp = fread($fp, $len);
  921. else
  922. $tmp = '';
  923. if ($tmp === false)
  924. throw new Exception("fread($len) returned false");
  925. $this->contactEmail_ = $tmp;
  926. $limit-=$len;
  927. break;
  928. case 23:
  929. ASSERT('$wire == 2');
  930. $len = Protobuf::read_varint($fp, $limit);
  931. if ($len === false)
  932. throw new Exception('Protobuf::read_varint returned false');
  933. if ($len > 0)
  934. $tmp = fread($fp, $len);
  935. else
  936. $tmp = '';
  937. if ($tmp === false)
  938. throw new Exception("fread($len) returned false");
  939. $this->downloadsCountText_ = $tmp;
  940. $limit-=$len;
  941. break;
  942. case 26:
  943. ASSERT('$wire == 2');
  944. $len = Protobuf::read_varint($fp, $limit);
  945. if ($len === false)
  946. throw new Exception('Protobuf::read_varint returned false');
  947. if ($len > 0)
  948. $tmp = fread($fp, $len);
  949. else
  950. $tmp = '';
  951. if ($tmp === false)
  952. throw new Exception("fread($len) returned false");
  953. $this->contactPhone_ = $tmp;
  954. $limit-=$len;
  955. break;
  956. case 27:
  957. ASSERT('$wire == 2');
  958. $len = Protobuf::read_varint($fp, $limit);
  959. if ($len === false)
  960. throw new Exception('Protobuf::read_varint returned false');
  961. if ($len > 0)
  962. $tmp = fread($fp, $len);
  963. else
  964. $tmp = '';
  965. if ($tmp === false)
  966. throw new Exception("fread($len) returned false");
  967. $this->contactWebsite_ = $tmp;
  968. $limit-=$len;
  969. break;
  970. case 30:
  971. ASSERT('$wire == 0');
  972. $tmp = Protobuf::read_varint($fp, $limit);
  973. if ($tmp === false)
  974. throw new Exception('Protobuf::read_varint returned false');
  975. $this->screenshotsCount_ = $tmp;
  976. break;
  977. case 31:
  978. ASSERT('$wire == 2');
  979. $len = Protobuf::read_varint($fp, $limit);
  980. if ($len === false)
  981. throw new Exception('Protobuf::read_varint returned false');
  982. if ($len > 0)
  983. $tmp = fread($fp, $len);
  984. else
  985. $tmp = '';
  986. if ($tmp === false)
  987. throw new Exception("fread($len) returned false");
  988. $this->promoText_ = $tmp;
  989. $limit-=$len;
  990. break;
  991. case 38:
  992. ASSERT('$wire == 2');
  993. $len = Protobuf::read_varint($fp, $limit);
  994. if ($len === false)
  995. throw new Exception('Protobuf::read_varint returned false');
  996. if ($len > 0)
  997. $tmp = fread($fp, $len);
  998. else
  999. $tmp = '';
  1000. if ($tmp === false)
  1001. throw new Exception("fread($len) returned false");
  1002. $this->recentChanges_ = $tmp;
  1003. $limit-=$len;
  1004. break;
  1005. case 43:
  1006. ASSERT('$wire == 2');
  1007. $len = Protobuf::read_varint($fp, $limit);
  1008. if ($len === false)
  1009. throw new Exception('Protobuf::read_varint returned false');
  1010. if ($len > 0)
  1011. $tmp = fread($fp, $len);
  1012. else
  1013. $tmp = '';
  1014. if ($tmp === false)
  1015. throw new Exception("fread($len) returned false");
  1016. $this->promotionalVideo_ = $tmp;
  1017. $limit-=$len;
  1018. break;
  1019. default:
  1020. $this->_unknown[$field . '-' . Protobuf::get_wiretype($wire)][] = Protobuf::read_field($fp, $wire, $limit);
  1021. }
  1022. }
  1023. if (!$this->validateRequired())
  1024. throw new Exception('Required fields are missing');
  1025. }
  1026. function write($fp) {
  1027. if (!$this->validateRequired())
  1028. throw new Exception('Required fields are missing');
  1029. if (!is_null($this->description_)) {
  1030. fwrite($fp, "j");
  1031. Protobuf::write_varint($fp, strlen($this->description_));
  1032. fwrite($fp, $this->description_);
  1033. }
  1034. if (!is_null($this->downloadsCount_)) {
  1035. fwrite($fp, "p");
  1036. Protobuf::write_varint($fp, $this->downloadsCount_);
  1037. }
  1038. if (!is_null($this->permissionId_))
  1039. foreach($this->permissionId_ as $v) {
  1040. fwrite($fp, "z");
  1041. Protobuf::write_varint($fp, strlen($v));
  1042. fwrite($fp, $v);
  1043. }
  1044. if (!is_null($this->installSize_)) {
  1045. fwrite($fp, "\x80\x01");
  1046. Protobuf::write_varint($fp, $this->installSize_);
  1047. }
  1048. if (!is_null($this->packageName_)) {
  1049. fwrite($fp, "\x8a\x01");
  1050. Protobuf::write_varint($fp, strlen($this->packageName_));
  1051. fwrite($fp, $this->packageName_);
  1052. }
  1053. if (!is_null($this->category_)) {
  1054. fwrite($fp, "\x92\x01");
  1055. Protobuf::write_varint($fp, strlen($this->category_));
  1056. fwrite($fp, $this->category_);
  1057. }
  1058. if (!is_null($this->contactEmail_)) {
  1059. fwrite($fp, "\xa2\x01");
  1060. Protobuf::write_varint($fp, strlen($this->contactEmail_));
  1061. fwrite($fp, $this->contactEmail_);
  1062. }
  1063. if (!is_null($this->downloadsCountText_)) {
  1064. fwrite($fp, "\xba\x01");
  1065. Protobuf::write_varint($fp, strlen($this->downloadsCountText_));
  1066. fwrite($fp, $this->downloadsCountText_);
  1067. }
  1068. if (!is_null($this->contactPhone_)) {
  1069. fwrite($fp, "\xd2\x01");
  1070. Protobuf::write_varint($fp, strlen($this->contactPhone_));
  1071. fwrite($fp, $this->contactPhone_);
  1072. }
  1073. if (!is_null($this->contactWebsite_)) {
  1074. fwrite($fp, "\xda\x01");
  1075. Protobuf::write_varint($fp, strlen($this->contactWebsite_));
  1076. fwrite($fp, $this->contactWebsite_);
  1077. }
  1078. if (!is_null($this->screenshotsCount_)) {
  1079. fwrite($fp, "\xf0\x01");
  1080. Protobuf::write_varint($fp, $this->screenshotsCount_);
  1081. }
  1082. if (!is_null($this->promoText_)) {
  1083. fwrite($fp, "\xfa\x01");
  1084. Protobuf::write_varint($fp, strlen($this->promoText_));
  1085. fwrite($fp, $this->promoText_);
  1086. }
  1087. if (!is_null($this->recentChanges_)) {
  1088. fwrite($fp, "\xb2\x02");
  1089. Protobuf::write_varint($fp, strlen($this->recentChanges_));
  1090. fwrite($fp, $this->recentChanges_);
  1091. }
  1092. if (!is_null($this->promotionalVideo_)) {
  1093. fwrite($fp, "\xda\x02");
  1094. Protobuf::write_varint($fp, strlen($this->promotionalVideo_));
  1095. fwrite($fp, $this->promotionalVideo_);
  1096. }
  1097. }
  1098. public function size() {
  1099. $size = 0;
  1100. if (!is_null($this->description_)) {
  1101. $l = strlen($this->description_);
  1102. $size += 1 + Protobuf::size_varint($l) + $l;
  1103. }
  1104. if (!is_null($this->downloadsCount_)) {
  1105. $size += 1 + Protobuf::size_varint($this->downloadsCount_);
  1106. }
  1107. if (!is_null($this->permissionId_))
  1108. foreach($this->permissionId_ as $v) {
  1109. $l = strlen($v);
  1110. $size += 1 + Protobuf::size_varint($l) + $l;
  1111. }
  1112. if (!is_null($this->installSize_)) {
  1113. $size += 2 + Protobuf::size_varint($this->installSize_);
  1114. }
  1115. if (!is_null($this->packageName_)) {
  1116. $l = strlen($this->packageName_);
  1117. $size += 2 + Protobuf::size_varint($l) + $l;
  1118. }
  1119. if (!is_null($this->category_)) {
  1120. $l = strlen($this->category_);
  1121. $size += 2 + Protobuf::size_varint($l) + $l;
  1122. }
  1123. if (!is_null($this->contactEmail_)) {
  1124. $l = strlen($this->contactEmail_);
  1125. $size += 2 + Protobuf::size_varint($l) + $l;
  1126. }
  1127. if (!is_null($this->downloadsCountText_)) {
  1128. $l = strlen($this->downloadsCountText_);
  1129. $size += 2 + Protobuf::size_varint($l) + $l;
  1130. }
  1131. if (!is_null($this->contactPhone_)) {
  1132. $l = strlen($this->contactPhone_);
  1133. $size += 2 + Protobuf::size_varint($l) + $l;
  1134. }
  1135. if (!is_null($this->contactWebsite_)) {
  1136. $l = strlen($this->contactWebsite_);
  1137. $size += 2 + Protobuf::size_varint($l) + $l;
  1138. }
  1139. if (!is_null($this->screenshotsCount_)) {
  1140. $size += 2 + Protobuf::size_varint($this->screenshotsCount_);
  1141. }
  1142. if (!is_null($this->promoText_)) {
  1143. $l = strlen($this->promoText_);
  1144. $size += 2 + Protobuf::size_varint($l) + $l;
  1145. }
  1146. if (!is_null($this->recentChanges_)) {
  1147. $l = strlen($this->recentChanges_);
  1148. $size += 2 + Protobuf::size_varint($l) + $l;
  1149. }
  1150. if (!is_null($this->promotionalVideo_)) {
  1151. $l = strlen($this->promotionalVideo_);
  1152. $size += 2 + Protobuf::size_varint($l) + $l;
  1153. }
  1154. return $size;
  1155. }
  1156. public function validateRequired() {
  1157. return true;
  1158. }
  1159. public function __toString() {
  1160. return ''
  1161. . Protobuf::toString('unknown', $this->_unknown)
  1162. . Protobuf::toString('description_', $this->description_)
  1163. . Protobuf::toString('downloadsCount_', $this->downloadsCount_)
  1164. . Protobuf::toString('permissionId_', $this->permissionId_)
  1165. . Protobuf::toString('installSize_', $this->installSize_)
  1166. . Protobuf::toString('packageName_', $this->packageName_)
  1167. . Protobuf::toString('category_', $this->category_)
  1168. . Protobuf::toString('contactEmail_', $this->contactEmail_)
  1169. . Protobuf::toString('downloadsCountText_', $this->downloadsCountText_)
  1170. . Protobuf::toString('contactPhone_', $this->contactPhone_)
  1171. . Protobuf::toString('contactWebsite_', $this->contactWebsite_)
  1172. . Protobuf::toString('screenshotsCount_', $this->screenshotsCount_)
  1173. . Protobuf::toString('promoText_', $this->promoText_)
  1174. . Protobuf::toString('recentChanges_', $this->recentChanges_)
  1175. . Protobuf::toString('promotionalVideo_', $this->promotionalVideo_);
  1176. }
  1177. // optional string description = 13;
  1178. private $description_ = null;
  1179. public function clearDescription() { $this->description_ = null; }
  1180. public function hasDescription() { return $this->description_ !== null; }
  1181. public function getDescription() { if($this->description_ === null) return ""; else return $this->description_; }
  1182. public function setDescription($value) { $this->description_ = $value; }
  1183. // optional int32 downloadsCount = 14;
  1184. private $downloadsCount_ = null;
  1185. public function clearDownloadsCount() { $this->downloadsCount_ = null; }
  1186. public function hasDownloadsCount() { return $this->downloadsCount_ !== null; }
  1187. public function getDownloadsCount() { if($this->downloadsCount_ === null) return 0; else return $this->downloadsCount_; }
  1188. public function setDownloadsCount($value) { $this->downloadsCount_ = $value; }
  1189. // repeated string permissionId = 15;
  1190. private $permissionId_ = null;
  1191. public function clearPermissionId() { $this->permissionId_ = null; }
  1192. public function getPermissionIdCount() { if ($this->permissionId_ === null ) return 0; else return count($this->permissionId_); }
  1193. public function getPermissionId($index) { return $this->permissionId_[$index]; }
  1194. public function getPermissionIdArray() { if ($this->permissionId_ === null ) return array(); else return $this->permissionId_; }
  1195. public function setPermissionId($index, $value) {$this->permissionId_[$index] = $value; }
  1196. public function addPermissionId($value) { $this->permissionId_[] = $value; }
  1197. public function addAllPermissionId(array $values) { foreach($values as $value) {$this->permissionId_[] = $value;} }
  1198. // optional int32 installSize = 16;
  1199. private $installSize_ = null;
  1200. public function clearInstallSize() { $this->installSize_ = null; }
  1201. public function hasInstallSize() { return $this->installSize_ !== null; }
  1202. public function getInstallSize() { if($this->installSize_ === null) return 0; else return $this->installSize_; }
  1203. public function setInstallSize($value) { $this->installSize_ = $value; }
  1204. // optional string packageName = 17;
  1205. private $packageName_ = null;
  1206. public function clearPackageName() { $this->packageName_ = null; }
  1207. public function hasPackageName() { return $this->packageName_ !== null; }
  1208. public function getPackageName() { if($this->packageName_ === null) return ""; else return $this->packageName_; }
  1209. public function setPackageName($value) { $this->packageName_ = $value; }
  1210. // optional string category = 18;
  1211. private $category_ = null;
  1212. public function clearCategory() { $this->category_ = null; }
  1213. public function hasCategory() { return $this->category_ !== null; }
  1214. public function getCategory() { if($this->category_ === null) return ""; else return $this->category_; }
  1215. public function setCategory($value) { $this->category_ = $value; }
  1216. // optional string contactEmail = 20;
  1217. private $contactEmail_ = null;
  1218. public function clearContactEmail() { $this->contactEmail_ = null; }
  1219. public function hasContactEmail() { return $this->contactEmail_ !== null; }
  1220. public function getContactEmail() { if($this->contactEmail_ === null) return ""; else return $this->contactEmail_; }
  1221. public function setContactEmail($value) { $this->contactEmail_ = $value; }
  1222. // optional string downloadsCountText = 23;
  1223. private $downloadsCountText_ = null;
  1224. public function clearDownloadsCountText() { $this->downloadsCountText_ = null; }
  1225. public function hasDownloadsCountText() { return $this->downloadsCountText_ !== null; }
  1226. public function getDownloadsCountText() { if($this->downloadsCountText_ === null) return ""; else return $this->downloadsCountText_; }
  1227. public function setDownloadsCountText($value) { $this->downloadsCountText_ = $value; }
  1228. // optional string contactPhone = 26;
  1229. private $contactPhone_ = null;
  1230. public function clearContactPhone() { $this->contactPhone_ = null; }
  1231. public function hasContactPhone() { return $this->contactPhone_ !== null; }
  1232. public function getContactPhone() { if($this->contactPhone_ === null) return ""; else return $this->contactPhone_; }
  1233. public function setContactPhone($value) { $this->contactPhone_ = $value; }
  1234. // optional string contactWebsite = 27;
  1235. private $contactWebsite_ = null;
  1236. public function clearContactWebsite() { $this->contactWebsite_ = null; }
  1237. public function hasContactWebsite() { return $this->contactWebsite_ !== null; }
  1238. public function getContactWebsite() { if($this->contactWebsite_ === null) return ""; else return $this->contactWebsite_; }
  1239. public function setContactWebsite($value) { $this->contactWebsite_ = $value; }
  1240. // optional int32 screenshotsCount = 30;
  1241. private $screenshotsCount_ = null;
  1242. public function clearScreenshotsCount() { $this->screenshotsCount_ = null; }
  1243. public function hasScreenshotsCount() { return $this->screenshotsCount_ !== null; }
  1244. public function getScreenshotsCount() { if($this->screenshotsCount_ === null) return 0; else return $this->screenshotsCount_; }
  1245. public function setScreenshotsCount($value) { $this->screenshotsCount_ = $value; }
  1246. //