ListTopicsResponse.php 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374
  1. <?php
  2. /**
  3. * Copyright (C) Alibaba Cloud Computing
  4. * All rights reserved
  5. */
  6. require_once realpath(dirname(__FILE__) . '/Response.php');
  7. /**
  8. * The response of the ListTopics API from log service.
  9. *
  10. * @author log service dev
  11. */
  12. class Aliyun_Log_Models_ListTopicsResponse extends Aliyun_Log_Models_Response {
  13. /**
  14. * @var integer the number of all the topics from the response
  15. */
  16. private $count;
  17. /**
  18. * @var array topics list
  19. */
  20. private $topics;
  21. /**
  22. * @var string/null the next token from the response. If there is no more topic to list, it will return None
  23. */
  24. private $nextToken;
  25. /**
  26. * Aliyun_Log_Models_ListTopicsResponse constructor
  27. *
  28. * @param array $resp
  29. * ListTopics HTTP response body
  30. * @param array $header
  31. * ListTopics HTTP response header
  32. */
  33. public function __construct($resp, $header) {
  34. parent::__construct ( $header );
  35. $this->count = $header['x-log-count'];
  36. $this->topics = $resp ;
  37. $this->nextToken = isset ( $header['x-log-nexttoken'] ) ? $header['x-log-nexttoken'] : NULL;
  38. }
  39. /**
  40. * Get the number of all the topics from the response
  41. *
  42. * @return integer the number of all the topics from the response
  43. */
  44. public function getCount() {
  45. return $this->count;
  46. }
  47. /**
  48. * Get all the topics from the response
  49. *
  50. * @return array topics list
  51. */
  52. public function getTopics() {
  53. return $this->topics;
  54. }
  55. /**
  56. * Return the next token from the response. If there is no more topic to list, it will return None
  57. *
  58. * @return string/null next token used to list more topics
  59. */
  60. public function getNextToken() {
  61. return $this->nextToken;
  62. }
  63. }